188794Sjake/*- 288794Sjake * Copyright (c) 2001 Jake Burkholder. 388794Sjake * All rights reserved. 488794Sjake * 588794Sjake * Redistribution and use in source and binary forms, with or without 688794Sjake * modification, are permitted provided that the following conditions 788794Sjake * are met: 888794Sjake * 1. Redistributions of source code must retain the above copyright 988794Sjake * notice, this list of conditions and the following disclaimer. 1088794Sjake * 2. Redistributions in binary form must reproduce the above copyright 1188794Sjake * notice, this list of conditions and the following disclaimer in the 1288794Sjake * documentation and/or other materials provided with the distribution. 1388794Sjake * 1488794Sjake * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1588794Sjake * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1688794Sjake * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1788794Sjake * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1888794Sjake * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1988794Sjake * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2088794Sjake * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2188794Sjake * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2288794Sjake * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2388794Sjake * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2488794Sjake * SUCH DAMAGE. 2588794Sjake * 2688794Sjake * $FreeBSD: releng/11.0/lib/libc/sparc64/sys/__sparc_utrap_private.h 96492 2002-05-13 04:35:08Z jake $ 2788794Sjake */ 2888794Sjake 2988794Sjake#ifndef ___SPARC_UTRAP_PRIVATE_H_ 3088794Sjake#define ___SPARC_UTRAP_PRIVATE_H_ 3188794Sjake 3288794Sjake#define UF_DONE(uf) do { \ 3388794Sjake uf->uf_pc = uf->uf_npc; \ 3488794Sjake uf->uf_npc = uf->uf_pc + 4; \ 3588794Sjake} while (0) 3688794Sjake 3788794Sjakestruct utrapframe { 3888794Sjake u_long uf_global[8]; 3988794Sjake u_long uf_out[8]; 4088794Sjake u_long uf_pc; 4188794Sjake u_long uf_npc; 4288794Sjake u_long uf_sfar; 4388794Sjake u_long uf_sfsr; 4488794Sjake u_long uf_tar; 4588794Sjake u_long uf_type; 4691159Sjake u_long uf_state; 4791159Sjake u_long uf_fsr; 4888794Sjake}; 4988794Sjake 5088794Sjakeextern char __sparc_utrap_fp_disabled[]; 5188794Sjakeextern char __sparc_utrap_gen[]; 5288794Sjake 5395587Sjakeint __emul_insn(struct utrapframe *uf); 5495587Sjakeu_long __emul_fetch_reg(struct utrapframe *uf, int reg); 5595587Sjakevoid __emul_store_reg(struct utrapframe *uf, int reg, u_long val); 5695587Sjakeu_long __emul_f3_op2(struct utrapframe *uf, u_int insn); 5795587Sjakeu_long __emul_f3_memop_addr(struct utrapframe *uf, u_int insn); 5896492Sjakeint __unaligned_fixup(struct utrapframe *uf); 5995587Sjake 6088794Sjakevoid __sparc_utrap(struct utrapframe *); 6188794Sjake 6295587Sjakevoid __utrap_write(const char *); 6395587Sjakevoid __utrap_kill_self(int); 6495587Sjakevoid __utrap_panic(const char *); 6595587Sjake 6688794Sjake#endif 67