asm.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* Copyright (C) 2013-2019 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. The GNU C Library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Lesser General Public
  5. License as published by the Free Software Foundation; either
  6. version 2.1 of the License, or (at your option) any later version.
  7. The GNU C Library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public
  12. License along with the GNU C Library. If not, see
  13. <http://www.gnu.org/licenses/>. */
  14. #ifndef _SYS_ASM_H
  15. #include_next <sys/asm.h>
  16. # ifndef _ISOMAC
  17. # undef __mips_cfi_startproc
  18. # define __mips_cfi_startproc cfi_startproc
  19. # undef __mips_cfi_endproc
  20. # define __mips_cfi_endproc cfi_endproc
  21. # if _MIPS_SIM == _ABIO32
  22. # define SETUP_GP64_REG_CFI(a)
  23. # define SETUP_GP64_REG(a, b)
  24. # define SETUP_GP64_STACK_CFI(a)
  25. # define SETUP_GP64_STACK(a, b)
  26. # define RESTORE_GP64_REG
  27. # define RESTORE_GP64_STACK
  28. # else
  29. # define SETUP_GP64_REG_CFI(gpsavereg) \
  30. cfi_register (gp, gpsavereg)
  31. # define SETUP_GP64_REG(gpsavereg, proc) \
  32. SETUP_GP64 (gpsavereg, proc); \
  33. SETUP_GP64_REG_CFI (gpsavereg)
  34. # define SETUP_GP64_STACK_CFI(gpoffset) \
  35. cfi_rel_offset (gp, gpoffset)
  36. # define SETUP_GP64_STACK(gpoffset, proc) \
  37. SETUP_GP64 (gpoffset, proc); \
  38. SETUP_GP64_STACK_CFI (gpoffset)
  39. # define RESTORE_GP64_REG \
  40. RESTORE_GP64; \
  41. cfi_restore (gp)
  42. # define RESTORE_GP64_STACK \
  43. RESTORE_GP64; \
  44. cfi_restore (gp)
  45. # endif
  46. # endif /* _ISOMAC */
  47. #endif /* sys/asm.h */