linkage.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. /* annotation for data we want in DCCM - if enabled in .config */
  14. .macro ARCFP_DATA nm
  15. #ifdef CONFIG_ARC_HAS_DCCM
  16. .section .data.arcfp
  17. #else
  18. .section .data
  19. #endif
  20. .global \nm
  21. .endm
  22. /* annotation for data we want in DCCM - if enabled in .config */
  23. .macro ARCFP_CODE
  24. #ifdef CONFIG_ARC_HAS_ICCM
  25. .section .text.arcfp, "ax",@progbits
  26. #else
  27. .section .text, "ax",@progbits
  28. #endif
  29. .endm
  30. #define ENTRY_CFI(name) \
  31. .globl name ASM_NL \
  32. ALIGN ASM_NL \
  33. name: ASM_NL \
  34. CFI_STARTPROC ASM_NL
  35. #define END_CFI(name) \
  36. CFI_ENDPROC ASM_NL \
  37. .size name, .-name
  38. #else /* !__ASSEMBLY__ */
  39. #ifdef CONFIG_ARC_HAS_ICCM
  40. #define __arcfp_code __attribute__((__section__(".text.arcfp")))
  41. #else
  42. #define __arcfp_code __attribute__((__section__(".text")))
  43. #endif
  44. #ifdef CONFIG_ARC_HAS_DCCM
  45. #define __arcfp_data __attribute__((__section__(".data.arcfp")))
  46. #else
  47. #define __arcfp_data __attribute__((__section__(".data")))
  48. #endif
  49. #endif /* __ASSEMBLY__ */
  50. #endif