2 * Copyright (c) 2007 Apple Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
32 * The contents of this file are subject to the terms of the
33 * Common Development and Distribution License, Version 1.0 only
34 * (the "License"). You may not use this file except in compliance
37 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
38 * or http://www.opensolaris.org/os/licensing.
39 * See the License for the specific language governing permissions
40 * and limitations under the License.
42 * When distributing Covered Code, include this CDDL HEADER in each
43 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
44 * If applicable, add the following below this CDDL HEADER, with the
45 * fields enclosed by brackets "[]" replaced with your own identifying
46 * information: Portions Copyright [yyyy] [name of copyright owner]
51 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
52 * Use is subject to license terms.
55 #ifndef _FASTTRAP_ISA_H
56 #define _FASTTRAP_ISA_H
58 /* #pragma ident "@(#)fasttrap_isa.h 1.4 05/06/08 SMI" */
60 #include <sys/types.h>
61 #if defined(__APPLE__)
69 typedef uint32_t fasttrap_instr_t
;
71 typedef struct fasttrap_machtp
{
72 fasttrap_instr_t ftmt_instr
; /* Original instruction */
73 int32_t ftmt_trgt
; /* Offset or absolute address */
74 uint8_t ftmt_type
; /* Emulation function type */
81 uint8_t ftmt_bo
; /* Branch options */
82 uint8_t ftmt_bi
; /* Condition bit */
83 uint8_t ftmt_flgs
; /* Flags */
88 #define ftt_instr ftt_mtp.ftmt_instr
89 #define ftt_trgt ftt_mtp.ftmt_trgt
90 #define ftt_type ftt_mtp.ftmt_type
91 #define ftt_bo ftt_mtp.ftmt_bo
92 #define ftt_bi ftt_mtp.ftmt_bi
93 #define ftt_flgs ftt_mtp.ftmt_flgs
95 #define FASTTRAP_INSTR 0x0FFFDDDD
96 #define T_DTRACE_RET (0x2E * 4)
98 #define FASTTRAP_RETURN_AFRAMES 7
99 #define FASTTRAP_ENTRY_AFRAMES 7
100 #define FASTTRAP_OFFSET_AFRAMES 6
106 #endif /* _FASTTRAP_ISA_H */