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. #ifdef __ASSEMBLY__
  11. #define ASM_NL ` /* use '`' to mark new line in macro */
  12. /* Can't use the ENTRY macro in linux/linkage.h
  13. * gas considers ';' as comment vs. newline
  14. */
  15. .macro ARC_ENTRY name
  16. .global \name
  17. .align 4
  18. \name:
  19. .endm
  20. .macro ARC_EXIT name
  21. #define ASM_PREV_SYM_ADDR(name) .-##name
  22. .size \ name, ASM_PREV_SYM_ADDR(\name)
  23. .endm
  24. /* annotation for data we want in DCCM - if enabled in .config */
  25. .macro ARCFP_DATA nm
  26. #ifdef CONFIG_ARC_HAS_DCCM
  27. .section .data.arcfp
  28. #else
  29. .section .data
  30. #endif
  31. .global \nm
  32. .endm
  33. /* annotation for data we want in DCCM - if enabled in .config */
  34. .macro ARCFP_CODE
  35. #ifdef CONFIG_ARC_HAS_ICCM
  36. .section .text.arcfp, "ax",@progbits
  37. #else
  38. .section .text, "ax",@progbits
  39. #endif
  40. .endm
  41. #else /* !__ASSEMBLY__ */
  42. #ifdef CONFIG_ARC_HAS_ICCM
  43. #define __arcfp_code __attribute__((__section__(".text.arcfp")))
  44. #else
  45. #define __arcfp_code __attribute__((__section__(".text")))
  46. #endif
  47. #ifdef CONFIG_ARC_HAS_DCCM
  48. #define __arcfp_data __attribute__((__section__(".data.arcfp")))
  49. #else
  50. #define __arcfp_data __attribute__((__section__(".data")))
  51. #endif
  52. #endif /* __ASSEMBLY__ */
  53. #endif