jmpbuf-offsets.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* Copyright (C) 2011-2018 Free Software Foundation, Inc.
  2. The GNU C Library is free software; you can redistribute it and/or
  3. modify it under the terms of the GNU Lesser General Public
  4. License as published by the Free Software Foundation; either
  5. version 2.1 of the License, or (at your option) any later version.
  6. The GNU C Library is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  9. Lesser General Public License for more details.
  10. You should have received a copy of the GNU Lesser General Public
  11. License along with the GNU C Library. If not, see
  12. <http://www.gnu.org/licenses/>. */
  13. /* We don't use most of these symbols; they are here for documentation. */
  14. #define JB_R30 0
  15. #define JB_R31 1
  16. #define JB_R32 2
  17. #define JB_R33 3
  18. #define JB_R34 4
  19. #define JB_R35 5
  20. #define JB_R36 6
  21. #define JB_R37 7
  22. #define JB_R38 8
  23. #define JB_R39 9
  24. #define JB_R40 10
  25. #define JB_R41 11
  26. #define JB_R42 12
  27. #define JB_R43 13
  28. #define JB_R44 14
  29. #define JB_R45 15
  30. #define JB_R46 16
  31. #define JB_R47 17
  32. #define JB_R48 18
  33. #define JB_R49 19
  34. #define JB_R50 20
  35. #define JB_R51 21
  36. #define JB_FP 22 /* r52 */
  37. #define JB_TP 23 /* r53 */
  38. #define JB_SP 24 /* r54 */
  39. #define JB_PC 25 /* normally LR, r55 */
  40. #define JB_ICS 26 /* interrupt critical section bit */
  41. /* We save space for some extra state to accommodate future changes. */
  42. #define JB_LEN 32 /* number of words */
  43. #define JB_SIZE (JB_LEN * REGSIZE)
  44. /* Helper macro used by all the setjmp/longjmp assembly code. */
  45. #define FOR_EACH_CALLEE_SAVED_REG(f) \
  46. .no_require_canonical_reg_names; f(r30); f(r31); \
  47. f(r32); f(r33); f(r34); f(r35); f(r36); f(r37); f(r38); f(r39); \
  48. f(r40); f(r41); f(r42); f(r43); f(r44); f(r45); f(r46); f(r47); \
  49. f(r48); f(r49); f(r50); f(r51); f(r52); f(r53); f(r54); f(r55)
  50. /* Helper for generic ____longjmp_chk(). */
  51. #define JB_FRAME_ADDRESS(buf) \
  52. ((void *) (unsigned long) (buf[JB_SP]))