linkage.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #ifndef __ASM_LINKAGE_H
  9. #define __ASM_LINKAGE_H
  10. #include <asm/dwarf.h>
  11. #ifdef __ASSEMBLY__
  12. #define ASM_NL ` /* use '`' to mark new line in macro */
  13. #define __ALIGN .align 4
  14. #define __ALIGN_STR __stringify(__ALIGN)
  15. /* annotation for data we want in DCCM - if enabled in .config */
  16. .macro ARCFP_DATA nm
  17. #ifdef CONFIG_ARC_HAS_DCCM
  18. .section .data.arcfp
  19. #else
  20. .section .data
  21. #endif
  22. .global \nm
  23. .endm
  24. /* annotation for data we want in DCCM - if enabled in .config */
  25. .macro ARCFP_CODE
  26. #ifdef CONFIG_ARC_HAS_ICCM
  27. .section .text.arcfp, "ax",@progbits
  28. #else
  29. .section .text, "ax",@progbits
  30. #endif
  31. .endm
  32. #define ENTRY_CFI(name) \
  33. .globl name ASM_NL \
  34. ALIGN ASM_NL \
  35. name: ASM_NL \
  36. CFI_STARTPROC ASM_NL
  37. #define END_CFI(name) \
  38. CFI_ENDPROC ASM_NL \
  39. .size name, .-name
  40. #else /* !__ASSEMBLY__ */
  41. #ifdef CONFIG_ARC_HAS_ICCM
  42. #define __arcfp_code __attribute__((__section__(".text.arcfp")))
  43. #else
  44. #define __arcfp_code __attribute__((__section__(".text")))
  45. #endif
  46. #ifdef CONFIG_ARC_HAS_DCCM
  47. #define __arcfp_data __attribute__((__section__(".data.arcfp")))
  48. #else
  49. #define __arcfp_data __attribute__((__section__(".data")))
  50. #endif
  51. #endif /* __ASSEMBLY__ */
  52. #endif