(root)/
glibc-2.38/
sysdeps/
aarch64/
jmpbuf-offsets.h
       1  /* Copyright (C) 2006-2023 Free Software Foundation, Inc.
       2  
       3     This file is part of the GNU C Library.
       4  
       5     The GNU C Library is free software; you can redistribute it and/or
       6     modify it under the terms of the GNU Lesser General Public License as
       7     published by the Free Software Foundation; either version 2.1 of the
       8     License, or (at your option) any later version.
       9  
      10     The GNU C Library is distributed in the hope that it will be useful,
      11     but WITHOUT ANY WARRANTY; without even the implied warranty of
      12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      13     Lesser General Public License for more details.
      14  
      15     You should have received a copy of the GNU Lesser General Public
      16     License along with the GNU C Library.  If not, see
      17     <https://www.gnu.org/licenses/>.  */
      18  
      19  #define JB_X19            0
      20  #define JB_X20            1
      21  #define JB_X21            2
      22  #define JB_X22            3
      23  #define JB_X23            4
      24  #define JB_X24            5
      25  #define JB_X25            6
      26  #define JB_X26            7
      27  #define JB_X27            8
      28  #define JB_X28            9
      29  #define JB_X29           10
      30  #define JB_LR            11
      31  #define JB_SP		 13
      32  
      33  #define JB_D8		 14
      34  #define JB_D9		 15
      35  #define JB_D10		 16
      36  #define JB_D11		 17
      37  #define JB_D12		 18
      38  #define JB_D13		 19
      39  #define JB_D14		 20
      40  #define JB_D15		 21
      41  
      42  #ifndef  __ASSEMBLER__
      43  #include <setjmp.h>
      44  #include <stdint.h>
      45  #include <sysdep.h>
      46  #include <pointer_guard.h>
      47  
      48  static inline uintptr_t __attribute__ ((unused))
      49  _jmpbuf_sp (__jmp_buf jmpbuf)
      50  {
      51    uintptr_t sp = jmpbuf[JB_SP];
      52    PTR_DEMANGLE (sp);
      53    return sp;
      54  }
      55  #endif
      56  
      57  /* Helper for generic ____longjmp_chk(). */
      58  #define JB_FRAME_ADDRESS(buf) \
      59    ((void *) _jmpbuf_sp (buf))