linkage.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. #ifdef __ASSEMBLY__
  11. #define ASM_NL ` /* use '`' to mark new line in macro */
  12. /* annotation for data we want in DCCM - if enabled in .config */
  13. .macro ARCFP_DATA nm
  14. #ifdef CONFIG_ARC_HAS_DCCM
  15. .section .data.arcfp
  16. #else
  17. .section .data
  18. #endif
  19. .global \nm
  20. .endm
  21. /* annotation for data we want in DCCM - if enabled in .config */
  22. .macro ARCFP_CODE
  23. #ifdef CONFIG_ARC_HAS_ICCM
  24. .section .text.arcfp, "ax",@progbits
  25. #else
  26. .section .text, "ax",@progbits
  27. #endif
  28. .endm
  29. #else /* !__ASSEMBLY__ */
  30. #ifdef CONFIG_ARC_HAS_ICCM
  31. #define __arcfp_code __attribute__((__section__(".text.arcfp")))
  32. #else
  33. #define __arcfp_code __attribute__((__section__(".text")))
  34. #endif
  35. #ifdef CONFIG_ARC_HAS_DCCM
  36. #define __arcfp_data __attribute__((__section__(".data.arcfp")))
  37. #else
  38. #define __arcfp_data __attribute__((__section__(".data")))
  39. #endif
  40. #endif /* __ASSEMBLY__ */
  41. #endif