linkage.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. /* Can't use the ENTRY macro in linux/linkage.h
  12. * gas considers ';' as comment vs. newline
  13. */
  14. .macro ARC_ENTRY name
  15. .global \name
  16. .align 4
  17. \name:
  18. .endm
  19. .macro ARC_EXIT name
  20. #define ASM_PREV_SYM_ADDR(name) .-##name
  21. .size \ name, ASM_PREV_SYM_ADDR(\name)
  22. .endm
  23. /* annotation for data we want in DCCM - if enabled in .config */
  24. .macro ARCFP_DATA nm
  25. #ifdef CONFIG_ARC_HAS_DCCM
  26. .section .data.arcfp
  27. #else
  28. .section .data
  29. #endif
  30. .global \nm
  31. .endm
  32. /* annotation for data we want in DCCM - if enabled in .config */
  33. .macro ARCFP_CODE
  34. #ifdef CONFIG_ARC_HAS_ICCM
  35. .section .text.arcfp, "ax",@progbits
  36. #else
  37. .section .text, "ax",@progbits
  38. #endif
  39. .endm
  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