1*2cf5e996Smatt/* $NetBSD: compat_sigprocmask.S,v 1.3 2013/08/19 22:11:50 matt Exp $ */ 2b638db2cSchristos 3b638db2cSchristos/*- 4b638db2cSchristos * Copyright (c) 1990 The Regents of the University of California. 5b638db2cSchristos * All rights reserved. 6b638db2cSchristos * 7b638db2cSchristos * Redistribution and use in source and binary forms, with or without 8b638db2cSchristos * modification, are permitted provided that the following conditions 9b638db2cSchristos * are met: 10b638db2cSchristos * 1. Redistributions of source code must retain the above copyright 11b638db2cSchristos * notice, this list of conditions and the following disclaimer. 12b638db2cSchristos * 2. Redistributions in binary form must reproduce the above copyright 13b638db2cSchristos * notice, this list of conditions and the following disclaimer in the 14b638db2cSchristos * documentation and/or other materials provided with the distribution. 15b638db2cSchristos * 3. Neither the name of the University nor the names of its contributors 16b638db2cSchristos * may be used to endorse or promote products derived from this software 17b638db2cSchristos * without specific prior written permission. 18b638db2cSchristos * 19b638db2cSchristos * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20b638db2cSchristos * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21b638db2cSchristos * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22b638db2cSchristos * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23b638db2cSchristos * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24b638db2cSchristos * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25b638db2cSchristos * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26b638db2cSchristos * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27b638db2cSchristos * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28b638db2cSchristos * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29b638db2cSchristos * SUCH DAMAGE. 30b638db2cSchristos * 31b638db2cSchristos * from: @(#)sigprocmask.s 5.2 (Berkeley) 12/17/90 32b638db2cSchristos */ 33b638db2cSchristos 34b638db2cSchristos#include "SYS.h" 35b638db2cSchristos 36b638db2cSchristosWARN_REFERENCES(sigprocmask, \ 37b638db2cSchristos "warning: reference to compatibility sigprocmask(); include <signal.h> for correct reference") 38b638db2cSchristos 39b638db2cSchristosENTRY(sigprocmask) 40*2cf5e996Smatt cmp r1, #0 41*2cf5e996Smatt#if defined(_ARM_ARCH_7) || !defined(__thumb__) 42*2cf5e996Smatt#ifdef __thumb__ 43*2cf5e996Smatt itte eq 44*2cf5e996Smatt#endif 45*2cf5e996Smatt moveq r0, #1 46*2cf5e996Smatt moveq r1, #0 47b638db2cSchristos ldrne r1, [r1] 48*2cf5e996Smatt#else 49*2cf5e996Smatt bne 1f 50*2cf5e996Smatt movs r0, #1 51*2cf5e996Smatt movs r1, #0 52*2cf5e996Smatt b 2f 53*2cf5e996Smatt1: ldr r1, [r1] 54*2cf5e996Smatt2: 55*2cf5e996Smatt#endif 56b638db2cSchristos SYSTRAP(compat_13_sigprocmask13) 57*2cf5e996Smatt _INVOKE_CERROR() 58*2cf5e996Smatt cmp r2, #0 59*2cf5e996Smatt#if defined(_ARM_ARCH_7) || !defined(__thumb__) 60*2cf5e996Smatt#ifdef __thumb__ 61*2cf5e996Smatt it ne 62*2cf5e996Smatt#endif 63b638db2cSchristos strne r0, [r2] 64*2cf5e996Smatt#else 65*2cf5e996Smatt beq 3f 66*2cf5e996Smatt str r0, [r2] 67*2cf5e996Smatt3: 68*2cf5e996Smatt#endif 69*2cf5e996Smatt movs r0, #0 70b638db2cSchristos RET 71*2cf5e996SmattEND(sigprocmask) 72