| 1 | /* |
| 2 | * ========== Copyright Header Begin ========================================== |
| 3 | * |
| 4 | * OpenSPARC T2 Processor File: rstf_deprecated.h |
| 5 | * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved. |
| 6 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES. |
| 7 | * |
| 8 | * The above named program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public |
| 10 | * License version 2 as published by the Free Software Foundation. |
| 11 | * |
| 12 | * The above named program is distributed in the hope that it will be |
| 13 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | * General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public |
| 18 | * License along with this work; if not, write to the Free Software |
| 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. |
| 20 | * |
| 21 | * ========== Copyright Header End ============================================ |
| 22 | */ |
| 23 | #ifndef _rstf_deprecated_h |
| 24 | #define _rstf_deprecated_h |
| 25 | |
| 26 | // |
| 27 | // Deprecated code from rstf.h |
| 28 | // |
| 29 | |
| 30 | #define RSTF_USE_DEPRECATED // enable deprecated values in rstf.h |
| 31 | |
| 32 | enum { |
| 33 | ASI_T = 4, // (DEPRECATED) change in ASI |
| 34 | CONTEXT_T = 17, // historic name CONTEXT_T (DEPRECATED), use PREG_T |
| 35 | |
| 36 | RSTF_DEPRECATED_LAST_T = 0 // dummy marker |
| 37 | }; |
| 38 | |
| 39 | typedef rstf_pregT rstf_contextT; |
| 40 | |
| 41 | /* **************************************************************** |
| 42 | * **************************************************************** |
| 43 | * **************************************************************** |
| 44 | * **************************************************************** |
| 45 | * Here are some older, common record formats. |
| 46 | * We provide them for various tools such as tfmtconv |
| 47 | * which converts from the various formats. |
| 48 | * |
| 49 | * I (RQ) personally do not use these types. |
| 50 | * **************************************************************** |
| 51 | * **************************************************************** |
| 52 | * **************************************************************** |
| 53 | * **************************************************************** |
| 54 | * **************************************************************** |
| 55 | */ |
| 56 | |
| 57 | /* |
| 58 | * Special instruction format for "the" TPC-C Sybase DB trace. |
| 59 | * This format is not used for anything else (!) |
| 60 | * |
| 61 | * In particular, Blaze creates standard shade traces of |
| 62 | * type "struct Trace" defined in trace.h |
| 63 | */ |
| 64 | typedef struct { |
| 65 | uint32_t tr_i; |
| 66 | uint32_t tr_pc; |
| 67 | uint32_t tr_ea; |
| 68 | uint16_t tr_ih; |
| 69 | uint16_t tr_misc; |
| 70 | } rtf99_trace_t; |
| 71 | |
| 72 | /* |
| 73 | * Minimal Shade V5 trace record. |
| 74 | */ |
| 75 | typedef struct { |
| 76 | uint32_t tr_pc; /* instruction address */ |
| 77 | uint32_t tr_i; /* instruction text, Instr = uint32_t */ |
| 78 | uint8_t tr_annulled; /* instruction annulled? */ |
| 79 | uint8_t tr_taken; /* true if branch, trap taken, cond-move/st executed */ |
| 80 | uint16_t tr_ih; /* ihash() value (opcode) */ |
| 81 | |
| 82 | // For DCTI: Target address (NOT the fall thru PC+8 for untaken branches). |
| 83 | // for loads, stores, traps: rs1+(rs2 or simm13) |
| 84 | uint32_t tr_ea; |
| 85 | } shadeV5_trace_t; |
| 86 | |
| 87 | /* |
| 88 | * Minimal Shade V6 32 bit trace record. |
| 89 | */ |
| 90 | typedef struct { |
| 91 | unsigned tr_ih : 16; |
| 92 | unsigned tr_shade_reserved0 : 5; |
| 93 | unsigned tr_annulled : 1; |
| 94 | unsigned tr_taken : 1; |
| 95 | unsigned tr_iwstart : 1; |
| 96 | unsigned tr_shade_reserved1 : 8; |
| 97 | unsigned tr_tid; |
| 98 | uint32_t tr_pc; |
| 99 | uint32_t tr_ea; |
| 100 | uint32_t tr_i; |
| 101 | unsigned tr_reserved1; |
| 102 | } shadeV6_32bit_trace_t; |
| 103 | |
| 104 | /* |
| 105 | * Minimal Shade V6 64 bit trace record, V9 trace. |
| 106 | */ |
| 107 | typedef struct { |
| 108 | unsigned tr_ih : 16; |
| 109 | unsigned tr_shade_reserved0 : 5; |
| 110 | unsigned tr_annulled : 1; |
| 111 | unsigned tr_taken : 1; |
| 112 | unsigned tr_iwstart : 1; |
| 113 | unsigned tr_shade_reserved1 : 8; |
| 114 | unsigned tr_tid; |
| 115 | uint64_t tr_pc; |
| 116 | uint64_t tr_ea; |
| 117 | uint32_t tr_i; |
| 118 | unsigned tr_reserved1; |
| 119 | } shadeV6_64bit_trace_t; |
| 120 | |
| 121 | /* |
| 122 | * Proposed master format. All types of fields likely to be recorded. |
| 123 | * Used for internal trace conversion. (I do not use this) |
| 124 | */ |
| 125 | typedef struct { |
| 126 | unsigned tr_reserved0 : 8; /* unused bits */ |
| 127 | unsigned tr_userdefined : 1; /* unused bits */ |
| 128 | unsigned tr_va_valid : 1; /* got a trap */ |
| 129 | unsigned tr_got_trap : 1; /* got a trap */ |
| 130 | unsigned tr_asi_change : 1; /* change to ASI reg */ |
| 131 | unsigned tr_privmode : 1; /* priviledge mode */ |
| 132 | unsigned tr_taken : 1; /* branch taken */ |
| 133 | unsigned tr_annulled : 1; /* this instr is annulled */ |
| 134 | unsigned tr_iwstart : 1; /* wide instruction */ |
| 135 | unsigned tr_ih : 16; /* ihash value */ |
| 136 | uint32_t tr_i; /* instruction word */ |
| 137 | uint64_t tr_pc_va; /* VA */ |
| 138 | uint64_t tr_ea_va; /* VA */ |
| 139 | uint32_t tr_tid; /* thread id */ |
| 140 | unsigned tr_reserved1; /* not used */ |
| 141 | uint64_t tr_pc_pa; /* PA */ |
| 142 | uint64_t tr_ea_pa; /* PA */ |
| 143 | uint32_t tr_context; /* context/processid */ |
| 144 | uint8_t tr_asi; /* ASI */ |
| 145 | /* ... */ |
| 146 | } master_64bit_trace_t; |
| 147 | |
| 148 | typedef shadeV6_64bit_trace_t Tshade6x64; |
| 149 | typedef shadeV6_32bit_trace_t Tshade6x32; |
| 150 | typedef shadeV5_trace_t Tshade5; |
| 151 | typedef rtf99_trace_t Trtf99; |
| 152 | typedef master_64bit_trace_t Tmaster64; |
| 153 | |
| 154 | #endif /* _rstf_deprecated_h */ |