setjmp.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* Define the machine-dependent type `jmp_buf'. RISC-V version.
  2. Copyright (C) 2011-2018 Free Software Foundation, Inc.
  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 _RISCV_BITS_SETJMP_H
  15. #define _RISCV_BITS_SETJMP_H
  16. typedef struct __jmp_buf_internal_tag
  17. {
  18. /* Program counter. */
  19. long int __pc;
  20. /* Callee-saved registers. */
  21. long int __regs[12];
  22. /* Stack pointer. */
  23. long int __sp;
  24. /* Callee-saved floating point registers. */
  25. #if defined __riscv_float_abi_double
  26. double __fpregs[12];
  27. #elif !defined __riscv_float_abi_soft
  28. # error unsupported FLEN
  29. #endif
  30. } __jmp_buf[1];
  31. #endif /* _RISCV_BITS_SETJMP_H */