sigsetjmp.S revision 1.7
11.7Suwe/* $NetBSD: sigsetjmp.S,v 1.7 2005/09/15 22:44:58 uwe 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.6Sagc * 3. Neither the name of the University nor the names of its contributors 191.1Smsaitoh * may be used to endorse or promote products derived from this software 201.1Smsaitoh * without specific prior written permission. 211.1Smsaitoh * 221.1Smsaitoh * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 231.1Smsaitoh * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 241.1Smsaitoh * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 251.1Smsaitoh * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 261.1Smsaitoh * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 271.1Smsaitoh * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 281.1Smsaitoh * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 291.1Smsaitoh * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 301.1Smsaitoh * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 311.1Smsaitoh * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 321.1Smsaitoh * SUCH DAMAGE. 331.1Smsaitoh * 341.7Suwe * from: @(#)setjmp.s 5.1 (Berkeley) 4/23/90 351.1Smsaitoh */ 361.1Smsaitoh 371.1Smsaitoh#include <machine/asm.h> 381.1Smsaitoh#if defined(LIBC_SCCS) 391.7Suwe RCSID("$NetBSD: sigsetjmp.S,v 1.7 2005/09/15 22:44:58 uwe Exp $") 401.1Smsaitoh#endif 411.1Smsaitoh 421.7SuweENTRY(__sigsetjmp14) 431.1Smsaitoh tst r5, r5 441.1Smsaitoh bt 1f 451.4Smsaitoh 461.1Smsaitoh sts.l pr, @-r15 471.1Smsaitoh mov.l r4, @-r15 481.7Suwe mov.l r5, @-r15 491.7Suwe mov r4, r6 501.7Suwe mov #1, r4 /* SIG_BLOCK */ 511.7Suwe mov #0, r5 521.7Suwe add #4*10, r6 /* &sigmask */ 531.7Suwe 541.5Smarcus#ifdef PIC 551.7Suwe mov.l L__sigprocmask14r1, r0 561.5Smarcus bsrf r0 571.5Smarcus nop 581.7SuweL__sigprocmask14o1: 591.5Smarcus#else 601.7Suwe mov.l L__sigprocmask14, r0 611.1Smsaitoh jsr @r0 621.1Smsaitoh nop 631.5Smarcus#endif 641.7Suwe 651.7Suwe mov.l @r15+, r5 661.1Smsaitoh mov.l @r15+, r4 671.1Smsaitoh lds.l @r15+, pr 681.1Smsaitoh 691.1Smsaitoh1: 701.7Suwe add #4*10, r4 711.7Suwe mov.l r5, @-r4 721.1Smsaitoh mov.l r15, @-r4 731.1Smsaitoh mov.l r14, @-r4 741.1Smsaitoh mov.l r13, @-r4 751.1Smsaitoh mov.l r12, @-r4 761.1Smsaitoh mov.l r11, @-r4 771.1Smsaitoh mov.l r10, @-r4 781.1Smsaitoh mov.l r9, @-r4 791.1Smsaitoh mov.l r8, @-r4 801.1Smsaitoh sts.l pr, @-r4 811.1Smsaitoh rts 821.1Smsaitoh xor r0, r0 831.1Smsaitoh 841.7SuweENTRY(__siglongjmp14) 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.7Suwe mov r4, r5 941.7Suwe mov #3, r4 /* SIG_SETMASK */ 951.7Suwe add #4*10, r5 /* &sigmask */ 961.7Suwe mov #0, r6 971.5Smarcus#ifdef PIC 981.7Suwe mov.l L__sigprocmask14r2, r0 991.5Smarcus bsrf r0 1001.5Smarcus nop 1011.7SuweL__sigprocmask14o2: 1021.5Smarcus#else 1031.7Suwe mov.l L__sigprocmask14, r0 1041.1Smsaitoh jsr @r0 1051.1Smsaitoh nop 1061.5Smarcus#endif 1071.1Smsaitoh mov.l @r15+, r5 1081.1Smsaitoh mov.l @r15+, r4 1091.1Smsaitoh 1101.4Smsaitoh1: 1111.1Smsaitoh lds.l @r4+, pr 1121.1Smsaitoh mov.l @r4+, r8 1131.1Smsaitoh mov.l @r4+, r9 1141.1Smsaitoh mov.l @r4+, r10 1151.1Smsaitoh mov.l @r4+, r11 1161.1Smsaitoh mov.l @r4+, r12 1171.1Smsaitoh mov.l @r4+, r13 1181.1Smsaitoh mov.l @r4+, r14 1191.1Smsaitoh mov.l @r4+, r15 1201.7Suwe 1211.7Suwe mov r5, r0 1221.1Smsaitoh tst r0, r0 1231.1Smsaitoh bf .L0 1241.1Smsaitoh add #1, r0 1251.1Smsaitoh.L0: 1261.1Smsaitoh rts 1271.1Smsaitoh nop 1281.1Smsaitoh 1291.4Smsaitoh .align 2 1301.5Smarcus#ifdef PIC 1311.7SuweL__sigprocmask14r1: 1321.7Suwe .long _C_LABEL(__sigprocmask14)-L__sigprocmask14o1 1331.7SuweL__sigprocmask14r2: 1341.7Suwe .long _C_LABEL(__sigprocmask14)-L__sigprocmask14o2 1351.5Smarcus#else 1361.7SuweL__sigprocmask14: 1371.7Suwe .long _C_LABEL(__sigprocmask14) 1381.5Smarcus#endif 139