1*0a6a1f1dSLionel Sambuc/* $NetBSD: __sigtramp2.S,v 1.6 2014/05/22 15:01:57 uebayasi Exp $ */ 22fe8fb19SBen Gras 32fe8fb19SBen Gras/* 42fe8fb19SBen Gras * Copyright (c) 2001 Wasabi Systems, Inc. 52fe8fb19SBen Gras * All rights reserved. 62fe8fb19SBen Gras * 72fe8fb19SBen Gras * Written by Frank van der Linden for Wasabi Systems, Inc. 82fe8fb19SBen Gras * 92fe8fb19SBen Gras * Redistribution and use in source and binary forms, with or without 102fe8fb19SBen Gras * modification, are permitted provided that the following conditions 112fe8fb19SBen Gras * are met: 122fe8fb19SBen Gras * 1. Redistributions of source code must retain the above copyright 132fe8fb19SBen Gras * notice, this list of conditions and the following disclaimer. 142fe8fb19SBen Gras * 2. Redistributions in binary form must reproduce the above copyright 152fe8fb19SBen Gras * notice, this list of conditions and the following disclaimer in the 162fe8fb19SBen Gras * documentation and/or other materials provided with the distribution. 172fe8fb19SBen Gras * 3. All advertising materials mentioning features or use of this software 182fe8fb19SBen Gras * must display the following acknowledgement: 192fe8fb19SBen Gras * This product includes software developed for the NetBSD Project by 202fe8fb19SBen Gras * Wasabi Systems, Inc. 212fe8fb19SBen Gras * 4. The name of Wasabi Systems, Inc. may not be used to endorse 222fe8fb19SBen Gras * or promote products derived from this software without specific prior 232fe8fb19SBen Gras * written permission. 242fe8fb19SBen Gras * 252fe8fb19SBen Gras * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND 262fe8fb19SBen Gras * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 272fe8fb19SBen Gras * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 282fe8fb19SBen Gras * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC 292fe8fb19SBen Gras * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 302fe8fb19SBen Gras * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 312fe8fb19SBen Gras * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 322fe8fb19SBen Gras * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 332fe8fb19SBen Gras * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 342fe8fb19SBen Gras * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 352fe8fb19SBen Gras * POSSIBILITY OF SUCH DAMAGE. 362fe8fb19SBen Gras */ 372fe8fb19SBen Gras 382fe8fb19SBen Gras#include "SYS.h" 392fe8fb19SBen Gras 402fe8fb19SBen Gras/* 412fe8fb19SBen Gras * The x86-64 signal trampoline is invoked only to return from 422fe8fb19SBen Gras * the signal; the kernel calls the signal handler directly. 432fe8fb19SBen Gras */ 442fe8fb19SBen GrasNENTRY(__sigtramp_siginfo_2) 452fe8fb19SBen Gras movq %r15,%rdi 462fe8fb19SBen Gras movq $SYS_setcontext, %rax 472fe8fb19SBen Gras syscall 482fe8fb19SBen Gras movq $-1,%rdi /* if we return here, something is wrong */ 492fe8fb19SBen Gras movq $SYS_exit, %rax 502fe8fb19SBen Gras syscall 51*0a6a1f1dSLionel SambucEND(__sigtramp_siginfo_2) 52