1/* setjmp, OpenRISC version. 2 Copyright (C) 2022 Free Software Foundation, Inc. 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 7 License as published by the Free Software Foundation; either 8 version 2.1 of the 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, write to the Free 17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 18 02111-1307 USA. */ 19 20#include <sysdep.h> 21#define _ASM 22#define _SETJMP_H 23#include <bits/setjmp.h> 24 25ENTRY (_setjmp) 26 l.addi r4, r0, 0 /* Set second argument to 0. */ 27 l.j .Local__sigsetjmp 28 l.nop 29END (_setjmp) 30libc_hidden_def (_setjmp) 31 32ENTRY (setjmp) 33 l.addi r4, r0, 1 /* Set second argument to 1. */ 34 l.j .Local__sigsetjmp 35 l.nop 36END (setjmp) 37 38ENTRY (__sigsetjmp) 39.Local__sigsetjmp: 40 l.sw 0(r3), r1 41 l.sw 4(r3), r2 42 l.sw 8(r3), r9 43 l.sw 12(r3), r10 44 l.sw 16(r3), r14 45 l.sw 20(r3), r16 46 l.sw 24(r3), r18 47 l.sw 28(r3), r20 48 l.sw 32(r3), r22 49 l.sw 36(r3), r24 50 l.sw 40(r3), r26 51 l.sw 44(r3), r28 52 l.sw 48(r3), r30 53 l.j __sigjmp_save 54 l.nop 55END (__sigsetjmp) 56hidden_def (__sigsetjmp) 57