1*e415d488SLionel Sambuc/* $NetBSD: __sigtramp3.S,v 1.2 2011/01/25 02:38:15 matt Exp $ */ 22fe8fb19SBen Gras 32fe8fb19SBen Gras/* 42fe8fb19SBen Gras * Copyright (c) 2003 Matt Thomas <matt@3am-software.com> 52fe8fb19SBen Gras * All rights reserved. 62fe8fb19SBen Gras * 72fe8fb19SBen Gras * Redistribution and use in source and binary forms, with or without 82fe8fb19SBen Gras * modification, are permitted provided that the following conditions 92fe8fb19SBen Gras * are met: 102fe8fb19SBen Gras * 1. Redistributions of source code must retain the above copyright 112fe8fb19SBen Gras * notice, this list of conditions and the following disclaimer. 122fe8fb19SBen Gras * 2. Redistributions in binary form must reproduce the above copyright 132fe8fb19SBen Gras * notice, this list of conditions and the following disclaimer in the 142fe8fb19SBen Gras * documentation and/or other materials provided with the distribution. 152fe8fb19SBen Gras * 3. The name of the author may not be used to endorse or promote products 162fe8fb19SBen Gras * derived from this software without specific prior written permission 172fe8fb19SBen Gras * 182fe8fb19SBen Gras * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 192fe8fb19SBen Gras * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 202fe8fb19SBen Gras * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 212fe8fb19SBen Gras * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 222fe8fb19SBen Gras * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 232fe8fb19SBen Gras * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 242fe8fb19SBen Gras * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 252fe8fb19SBen Gras * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 262fe8fb19SBen Gras * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 272fe8fb19SBen Gras * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 282fe8fb19SBen Gras */ 292fe8fb19SBen Gras 302fe8fb19SBen Gras/* 312fe8fb19SBen Gras * Signal trampoline; registers when called: 322fe8fb19SBen Gras * pc, psl - obvious 332fe8fb19SBen Gras * sp, ap - points to argument list 342fe8fb19SBen Gras * 4(ap) -- signo 352fe8fb19SBen Gras * 8(ap) -- pointer to siginfo 362fe8fb19SBen Gras * 12(ap) -- pointer to ucontext 372fe8fb19SBen Gras * fp - address of signal handler 382fe8fb19SBen Gras */ 392fe8fb19SBen Gras 402fe8fb19SBen Gras#include "SYS.h" 412fe8fb19SBen Gras 42*e415d488SLionel Sambuc#ifdef SYSLIBC_SCCS 43*e415d488SLionel SambucRCSID("$NetBSD: __sigtramp3.S,v 1.2 2011/01/25 02:38:15 matt Exp $") 44*e415d488SLionel Sambuc#endif 45*e415d488SLionel Sambuc 462fe8fb19SBen Gras .text 472fe8fb19SBen Gras _ALIGN_TEXT 482fe8fb19SBen Gras 492fe8fb19SBen Gras .globl _C_LABEL(__sigtramp_siginfo_3) 502fe8fb19SBen Gras_C_LABEL(__sigtramp_siginfo_3): 51*e415d488SLionel Sambuc nop; nop 522fe8fb19SBen Gras callg (%ap),(%fp) # use global arg list 532fe8fb19SBen Gras addl2 $8,%ap # arg is pointer to ucontext 542fe8fb19SBen Gras SYSTRAP(setcontext) # exit from here 552fe8fb19SBen Gras halt # illegal insn 56