sysdep.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /* Copyright (C) 2000-2019 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, see
  14. <http://www.gnu.org/licenses/>. */
  15. #include <sysdeps/generic/sysdep.h>
  16. #ifdef __ASSEMBLER__
  17. /* Macros to help writing .prologue directives in assembly code. */
  18. #define ASM_UNW_PRLG_RP 0x8
  19. #define ASM_UNW_PRLG_PFS 0x4
  20. #define ASM_UNW_PRLG_PSP 0x2
  21. #define ASM_UNW_PRLG_PR 0x1
  22. #define ASM_UNW_PRLG_GRSAVE(ninputs) (32+(ninputs))
  23. #define ENTRY(name) \
  24. .text; \
  25. .align 32; \
  26. .proc C_SYMBOL_NAME(name); \
  27. .global C_SYMBOL_NAME(name); \
  28. C_LABEL(name) \
  29. CALL_MCOUNT
  30. #define LOCAL_ENTRY(name) \
  31. .text; \
  32. .align 32; \
  33. .proc C_SYMBOL_NAME(name); \
  34. C_LABEL(name) \
  35. CALL_MCOUNT
  36. #define LEAF(name) \
  37. .text; \
  38. .align 32; \
  39. .proc C_SYMBOL_NAME(name); \
  40. .global name; \
  41. C_LABEL(name)
  42. #define LOCAL_LEAF(name) \
  43. .text; \
  44. .align 32; \
  45. .proc C_SYMBOL_NAME(name); \
  46. C_LABEL(name)
  47. /* Mark the end of function SYM. */
  48. #undef END
  49. #define END(sym) .endp C_SYMBOL_NAME(sym)
  50. #endif /* ASSEMBLER */