1*2fe8fb19SBen Gras/* $NetBSD: __sigtramp3.S,v 1.1 2003/09/30 19:05:41 matt Exp $ */ 2*2fe8fb19SBen Gras 3*2fe8fb19SBen Gras/* 4*2fe8fb19SBen Gras * Copyright (c) 2003 Matt Thomas <matt@3am-software.com> 5*2fe8fb19SBen Gras * All rights reserved. 6*2fe8fb19SBen Gras * 7*2fe8fb19SBen Gras * Redistribution and use in source and binary forms, with or without 8*2fe8fb19SBen Gras * modification, are permitted provided that the following conditions 9*2fe8fb19SBen Gras * are met: 10*2fe8fb19SBen Gras * 1. Redistributions of source code must retain the above copyright 11*2fe8fb19SBen Gras * notice, this list of conditions and the following disclaimer. 12*2fe8fb19SBen Gras * 2. Redistributions in binary form must reproduce the above copyright 13*2fe8fb19SBen Gras * notice, this list of conditions and the following disclaimer in the 14*2fe8fb19SBen Gras * documentation and/or other materials provided with the distribution. 15*2fe8fb19SBen Gras * 3. The name of the author may not be used to endorse or promote products 16*2fe8fb19SBen Gras * derived from this software without specific prior written permission 17*2fe8fb19SBen Gras * 18*2fe8fb19SBen Gras * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 19*2fe8fb19SBen Gras * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 20*2fe8fb19SBen Gras * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21*2fe8fb19SBen Gras * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 22*2fe8fb19SBen Gras * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23*2fe8fb19SBen Gras * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24*2fe8fb19SBen Gras * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25*2fe8fb19SBen Gras * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26*2fe8fb19SBen Gras * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27*2fe8fb19SBen Gras * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28*2fe8fb19SBen Gras */ 29*2fe8fb19SBen Gras 30*2fe8fb19SBen Gras/* 31*2fe8fb19SBen Gras * Signal trampoline; registers when called: 32*2fe8fb19SBen Gras * pc, psl - obvious 33*2fe8fb19SBen Gras * sp, ap - points to argument list 34*2fe8fb19SBen Gras * 4(ap) -- signo 35*2fe8fb19SBen Gras * 8(ap) -- pointer to siginfo 36*2fe8fb19SBen Gras * 12(ap) -- pointer to ucontext 37*2fe8fb19SBen Gras * fp - address of signal handler 38*2fe8fb19SBen Gras */ 39*2fe8fb19SBen Gras 40*2fe8fb19SBen Gras#include "SYS.h" 41*2fe8fb19SBen Gras 42*2fe8fb19SBen Gras .text 43*2fe8fb19SBen Gras _ALIGN_TEXT 44*2fe8fb19SBen Gras 45*2fe8fb19SBen Gras .globl _C_LABEL(__sigtramp_siginfo_3) 46*2fe8fb19SBen Gras_C_LABEL(__sigtramp_siginfo_3): 47*2fe8fb19SBen Gras callg (%ap),(%fp) # use global arg list 48*2fe8fb19SBen Gras addl2 $8,%ap # arg is pointer to ucontext 49*2fe8fb19SBen Gras SYSTRAP(setcontext) # exit from here 50*2fe8fb19SBen Gras halt # illegal insn 51