sigsetjmp.S revision 1.4
11.4Smsaitoh/* $NetBSD: sigsetjmp.S,v 1.4 2001/05/11 19:58:07 msaitoh Exp $ */ 21.1Smsaitoh 31.1Smsaitoh/*- 41.1Smsaitoh * Copyright (c) 1990 The Regents of the University of California. 51.1Smsaitoh * All rights reserved. 61.1Smsaitoh * 71.1Smsaitoh * This code is derived from software contributed to Berkeley by 81.1Smsaitoh * William Jolitz. 91.1Smsaitoh * 101.1Smsaitoh * Redistribution and use in source and binary forms, with or without 111.1Smsaitoh * modification, are permitted provided that the following conditions 121.1Smsaitoh * are met: 131.1Smsaitoh * 1. Redistributions of source code must retain the above copyright 141.1Smsaitoh * notice, this list of conditions and the following disclaimer. 151.1Smsaitoh * 2. Redistributions in binary form must reproduce the above copyright 161.1Smsaitoh * notice, this list of conditions and the following disclaimer in the 171.1Smsaitoh * documentation and/or other materials provided with the distribution. 181.1Smsaitoh * 3. All advertising materials mentioning features or use of this software 191.1Smsaitoh * must display the following acknowledgement: 201.1Smsaitoh * This product includes software developed by the University of 211.1Smsaitoh * California, Berkeley and its contributors. 221.1Smsaitoh * 4. Neither the name of the University nor the names of its contributors 231.1Smsaitoh * may be used to endorse or promote products derived from this software 241.1Smsaitoh * without specific prior written permission. 251.1Smsaitoh * 261.1Smsaitoh * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 271.1Smsaitoh * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 281.1Smsaitoh * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 291.1Smsaitoh * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 301.1Smsaitoh * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 311.1Smsaitoh * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 321.1Smsaitoh * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 331.1Smsaitoh * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 341.1Smsaitoh * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 351.1Smsaitoh * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 361.1Smsaitoh * SUCH DAMAGE. 371.1Smsaitoh * 381.1Smsaitoh * from: @(#)setjmp.s 5.1 (Berkeley) 4/23/90" 391.1Smsaitoh */ 401.1Smsaitoh 411.1Smsaitoh#include <machine/asm.h> 421.1Smsaitoh#if defined(LIBC_SCCS) 431.4Smsaitoh RCSID("$NetBSD: sigsetjmp.S,v 1.4 2001/05/11 19:58:07 msaitoh Exp $") 441.1Smsaitoh#endif 451.1Smsaitoh 461.1SmsaitohENTRY(sigsetjmp) 471.1Smsaitoh mov r4, r0 481.2Stsubai add #4*9, r0 ! &savemask 491.1Smsaitoh mov.l r5, @r0 501.1Smsaitoh tst r5, r5 511.1Smsaitoh bt 1f 521.4Smsaitoh 531.1Smsaitoh sts.l pr, @-r15 541.1Smsaitoh mov.l r4, @-r15 551.1Smsaitoh mov #0, r4 561.1Smsaitoh mov.l Lsigblock, r0 571.1Smsaitoh jsr @r0 581.1Smsaitoh nop 591.1Smsaitoh mov.l @r15+, r4 601.1Smsaitoh lds.l @r15+, pr 611.1Smsaitoh 621.1Smsaitoh mov r4, r1 631.1Smsaitoh add #4*10, r1 641.1Smsaitoh mov.l r0, @r1 651.4Smsaitoh 661.1Smsaitoh1: 671.1Smsaitoh add #4*9, r4 681.1Smsaitoh mov.l r15, @-r4 691.1Smsaitoh mov.l r14, @-r4 701.1Smsaitoh mov.l r13, @-r4 711.1Smsaitoh mov.l r12, @-r4 721.1Smsaitoh mov.l r11, @-r4 731.1Smsaitoh mov.l r10, @-r4 741.1Smsaitoh mov.l r9, @-r4 751.1Smsaitoh mov.l r8, @-r4 761.1Smsaitoh sts.l pr, @-r4 771.1Smsaitoh rts 781.1Smsaitoh xor r0, r0 791.1Smsaitoh 801.1Smsaitoh .align 2 811.1SmsaitohLsigblock: 821.3Smsaitoh .long _C_LABEL(sigblock) 831.1Smsaitoh 841.1SmsaitohENTRY(siglongjmp) 851.1Smsaitoh mov r4, r0 861.1Smsaitoh add #4*9, r0 871.1Smsaitoh mov.l @r0, r0 881.1Smsaitoh tst r0, r0 891.1Smsaitoh bt 1f 901.1Smsaitoh 911.1Smsaitoh mov.l r4, @-r15 921.1Smsaitoh mov.l r5, @-r15 931.1Smsaitoh mov r4, r0 941.1Smsaitoh add #4*10, r0 951.1Smsaitoh mov.l @r0, r4 961.1Smsaitoh mov.l Lsigsetmask, r0 971.1Smsaitoh jsr @r0 981.1Smsaitoh nop 991.1Smsaitoh mov.l @r15+, r5 1001.1Smsaitoh mov.l @r15+, r4 1011.1Smsaitoh 1021.4Smsaitoh1: 1031.1Smsaitoh mov r5, r0 1041.1Smsaitoh lds.l @r4+, pr 1051.1Smsaitoh mov.l @r4+, r8 1061.1Smsaitoh mov.l @r4+, r9 1071.1Smsaitoh mov.l @r4+, r10 1081.1Smsaitoh mov.l @r4+, r11 1091.1Smsaitoh mov.l @r4+, r12 1101.1Smsaitoh mov.l @r4+, r13 1111.1Smsaitoh mov.l @r4+, r14 1121.1Smsaitoh mov.l @r4+, r15 1131.1Smsaitoh tst r0, r0 1141.1Smsaitoh bf .L0 1151.1Smsaitoh add #1, r0 1161.1Smsaitoh.L0: 1171.1Smsaitoh rts 1181.1Smsaitoh nop 1191.1Smsaitoh 1201.4Smsaitoh .align 2 1211.1SmsaitohLsigsetmask : 1221.3Smsaitoh .long _C_LABEL(sigsetmask) 123