1/* longjmp for SH. 2 Copyright (C) 1999, 2000 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 Library General Public License as 7 published by the Free Software Foundation; either version 2 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 Library General Public License for more details. 14 15 You should have received a copy of the GNU Library General Public 16 License along with the GNU C Library; see the file COPYING.LIB. If not, 17 see <http://www.gnu.org/licenses/>. */ 18 19#include <features.h> 20 21/* __longjmp(jmpbuf, val) */ 22 23.text 24.align 4 25.type __longjmp,@function 26.globl __longjmp; 27__longjmp: 28 mov.l @r4+, r8 29 mov.l @r4+, r9 30 mov.l @r4+, r10 31 mov.l @r4+, r11 32 mov.l @r4+, r12 33 mov.l @r4+, r13 34 mov.l @r4+, r14 35 mov.l @r4+, r15 36#if defined __UCLIBC_HAS_FLOATS__ && ! defined __UCLIBC_HAS_SOFT_FLOAT__ 37 lds.l @r4+, pr 38 ldc.l @r4+, gbr 39 lds.l @r4+, fpscr 40 fmov.s @r4+, fr12 41 fmov.s @r4+, fr13 42 mov r5, r0 /* get the return value in place */ 43 tst r0, r0 44 bf.s 1f 45 fmov.s @r4+, fr14 46 mov #1,r0 /* can't let setjmp() return zero! */ 471: 48 rts 49 fmov.s @r4+, fr15 50#else 51 mov r5, r0 /* get the return value in place */ 52 tst r0, r0 53 bf.s 1f 54 lds.l @r4+, pr 55 mov #1,r0 /* can't let setjmp() return zero! */ 561: 57 rts 58 ldc.l @r4+, gbr 59#endif 60.size __longjmp,.-__longjmp 61libc_hidden_def(__longjmp) 62