1*4d12bfcdSjoerg/* $NetBSD: _resumecontext.S,v 1.4 2013/09/12 15:36:15 joerg Exp $ */ 256371a56Schs 356371a56Schs/*- 456371a56Schs * Copyright (c) 2001 The NetBSD Foundation, Inc. 556371a56Schs * All rights reserved. 656371a56Schs * 756371a56Schs * This code is derived from software contributed to The NetBSD Foundation 856371a56Schs * by Wayne Knowles. 956371a56Schs * 1056371a56Schs * Redistribution and use in source and binary forms, with or without 1156371a56Schs * modification, are permitted provided that the following conditions 1256371a56Schs * are met: 1356371a56Schs * 1. Redistributions of source code must retain the above copyright 1456371a56Schs * notice, this list of conditions and the following disclaimer. 1556371a56Schs * 2. Redistributions in binary form must reproduce the above copyright 1656371a56Schs * notice, this list of conditions and the following disclaimer in the 1756371a56Schs * documentation and/or other materials provided with the distribution. 1856371a56Schs * 1956371a56Schs * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 2056371a56Schs * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2156371a56Schs * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2256371a56Schs * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 2356371a56Schs * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2456371a56Schs * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2556371a56Schs * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2656371a56Schs * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2756371a56Schs * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2856371a56Schs * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2956371a56Schs * POSSIBILITY OF SUCH DAMAGE. 3056371a56Schs */ 3156371a56Schs 3256371a56Schs#include "SYS.h" 3381907114Sskrll 3481907114Sskrll#include <machine/asm.h> 3556371a56Schs#include <machine/mcontext.h> 3656371a56Schs 3756371a56Schs#if defined(SYSLIBC_SCCS) && !defined(lint) 38*4d12bfcdSjoerg RCSID("$NetBSD: _resumecontext.S,v 1.4 2013/09/12 15:36:15 joerg Exp $") 3956371a56Schs#endif /* SYSLIBC_SCCS && !lint */ 4056371a56Schs 4156371a56Schs .import _resumecontext, code 4256371a56Schs 4381907114SskrllLEAF_ENTRY_NOPROFILE(__resumecontext) 44*4d12bfcdSjoerg#ifdef __PIC__ 4556371a56Schs ldw HPPA_FRAME_EDP(%sp), %r19 4656371a56Schs addil LT%_C_LABEL(_resumecontext), %r19 4756371a56Schs ldw RT%_C_LABEL(_resumecontext)(%r1), %r1 4856371a56Schs#else 4956371a56Schs ldil L%_C_LABEL(_resumecontext), %r1 5056371a56Schs ldo R%_C_LABEL(_resumecontext)(%r1), %r1 5156371a56Schs#endif 5256371a56Schs bv,n %r0(%r1) 5356371a56SchsEXIT(__resumecontext) 5456371a56Schs .end 55