1  /* Copyright (C) 2013-2023 Free Software Foundation, Inc.
       2     This file is part of the GNU C Library.
       3  
       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  
       9     The GNU C Library is distributed in the hope that it will be useful,
      10     but WITHOUT ANY WARRANTY; without even the implied warranty of
      11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      12     Lesser General Public License for more details.
      13  
      14     You should have received a copy of the GNU Lesser General Public
      15     License along with the GNU C Library.  If not, see
      16     <https://www.gnu.org/licenses/>.  */
      17  
      18  #ifndef _SYS_ASM_H
      19  #include_next <sys/asm.h>
      20  
      21  # ifndef _ISOMAC
      22  
      23  # undef __mips_cfi_startproc
      24  # define __mips_cfi_startproc cfi_startproc
      25  # undef __mips_cfi_endproc
      26  # define __mips_cfi_endproc cfi_endproc
      27  
      28  # if _MIPS_SIM == _ABIO32
      29  #  define SETUP_GP64_REG_CFI(a)
      30  #  define SETUP_GP64_REG(a, b)
      31  #  define SETUP_GP64_STACK_CFI(a)
      32  #  define SETUP_GP64_STACK(a, b)
      33  #  define RESTORE_GP64_REG
      34  #  define RESTORE_GP64_STACK
      35  # else
      36  #  define SETUP_GP64_REG_CFI(gpsavereg)		\
      37  	cfi_register (gp, gpsavereg)
      38  #  define SETUP_GP64_REG(gpsavereg, proc)	\
      39  	SETUP_GP64 (gpsavereg, proc);		\
      40  	SETUP_GP64_REG_CFI (gpsavereg)
      41  #  define SETUP_GP64_STACK_CFI(gpoffset)	\
      42  	cfi_rel_offset (gp, gpoffset)
      43  #  define SETUP_GP64_STACK(gpoffset, proc)	\
      44  	SETUP_GP64 (gpoffset, proc);		\
      45  	SETUP_GP64_STACK_CFI (gpoffset)
      46  #  define RESTORE_GP64_REG			\
      47  	RESTORE_GP64;				\
      48  	cfi_restore (gp)
      49  #  define RESTORE_GP64_STACK			\
      50  	RESTORE_GP64;				\
      51  	cfi_restore (gp)
      52  # endif
      53  
      54  # endif /* _ISOMAC */
      55  #endif /* sys/asm.h */