1*377714d8Smrg /* $NetBSD: sparc_longjmp.h,v 1.1 2023/09/03 21:41:45 mrg Exp $ */ 2*377714d8Smrg 3*377714d8Smrg /* 4*377714d8Smrg * Copyright (c) 2023 Matthew R. Green 5*377714d8Smrg * All rights reserved. 6*377714d8Smrg * 7*377714d8Smrg * Redistribution and use in source and binary forms, with or without 8*377714d8Smrg * modification, are permitted provided that the following conditions 9*377714d8Smrg * are met: 10*377714d8Smrg * 1. Redistributions of source code must retain the above copyright 11*377714d8Smrg * notice, this list of conditions and the following disclaimer. 12*377714d8Smrg * 2. Redistributions in binary form must reproduce the above copyright 13*377714d8Smrg * notice, this list of conditions and the following disclaimer in the 14*377714d8Smrg * documentation and/or other materials provided with the distribution. 15*377714d8Smrg * 16*377714d8Smrg * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17*377714d8Smrg * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18*377714d8Smrg * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19*377714d8Smrg * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20*377714d8Smrg * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 21*377714d8Smrg * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22*377714d8Smrg * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23*377714d8Smrg * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24*377714d8Smrg * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25*377714d8Smrg * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26*377714d8Smrg * SUCH DAMAGE. 27*377714d8Smrg */ 28*377714d8Smrg 29*377714d8Smrg #ifndef _SPARC_LONGJMP_H_ 30*377714d8Smrg #define _SPARC_LONGJMP_H_ 31*377714d8Smrg 32*377714d8Smrg /* 33*377714d8Smrg * This structure is written in setjmp.S and read by longjmp.c, and is 34*377714d8Smrg * here so that genassym can access it and we can ensure the right offsets 35*377714d8Smrg * are used in the right places. 36*377714d8Smrg */ 37*377714d8Smrg 38*377714d8Smrg struct __jmp_buf_regs_t { 39*377714d8Smrg __greg_t g4; 40*377714d8Smrg __greg_t g7; 41*377714d8Smrg }; 42*377714d8Smrg 43*377714d8Smrg struct __jmp_buf { 44*377714d8Smrg struct sigcontext sc; 45*377714d8Smrg struct __jmp_buf_regs_t regs; 46*377714d8Smrg }; 47*377714d8Smrg 48*377714d8Smrg #endif /* _SPARC_LONGJMP_H_ */ 49