4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
22 /* Portions Copyright 2013 Justin Hibbits */
24 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
25 * Use is subject to license terms.
28 #ifndef _FASTTRAP_ISA_H
29 #define _FASTTRAP_ISA_H
31 #pragma ident "%Z%%M% %I% %E% SMI"
33 #include <sys/types.h>
39 #define FASTTRAP_SUNWDTRACE_SIZE 64
40 #define FASTTRAP_INSTR 0x0FFFDDDD
42 typedef uint32_t fasttrap_instr_t;
44 typedef struct fasttrap_machtp_t {
45 fasttrap_instr_t ftmt_instr; /* original instruction */
46 uintptr_t ftmt_dest; /* branch target */
47 uint8_t ftmt_type; /* emulation type */
48 uint8_t ftmt_flags; /* emulation flags */
49 uint8_t ftmt_bo; /* BO field */
50 uint8_t ftmt_bi; /* BI field (CR bit) */
53 #define ftt_instr ftt_mtp.ftmt_instr
54 #define ftt_dest ftt_mtp.ftmt_dest
55 #define ftt_type ftt_mtp.ftmt_type
56 #define ftt_flags ftt_mtp.ftmt_flags
57 #define ftt_bo ftt_mtp.ftmt_bo
58 #define ftt_bi ftt_mtp.ftmt_bi
60 #define FASTTRAP_T_COMMON 0x00
61 #define FASTTRAP_T_B 0x01
62 #define FASTTRAP_T_BC 0x02
63 #define FASTTRAP_T_BLR 0x03
64 #define FASTTRAP_T_BCTR 0x04
65 #define FASTTRAP_T_NOP 0x05
67 #define FASTTRAP_AFRAMES 3
68 #define FASTTRAP_RETURN_AFRAMES 4
69 #define FASTTRAP_ENTRY_AFRAMES 3
70 #define FASTTRAP_OFFSET_AFRAMES 3
76 #endif /* _FASTTRAP_ISA_H */