| OLD | NEW |
| 1 /* Copyright (c) 2007, Google Inc. | 1 /* Copyright (c) 2007, Google Inc. |
| 2 * All rights reserved. | 2 * All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 OT_SI = 0x0C000000, | 136 OT_SI = 0x0C000000, |
| 137 OT_V = 0x0D000000, | 137 OT_V = 0x0D000000, |
| 138 OT_W = 0x0E000000, | 138 OT_W = 0x0E000000, |
| 139 OT_SD = 0x0F000000, // scalar double-precision floating-point value | 139 OT_SD = 0x0F000000, // scalar double-precision floating-point value |
| 140 OT_PD = 0x10000000, // double-precision floating point | 140 OT_PD = 0x10000000, // double-precision floating point |
| 141 // dummy "operand type" for address mode M - which doesn't specify | 141 // dummy "operand type" for address mode M - which doesn't specify |
| 142 // operand type | 142 // operand type |
| 143 OT_ADDRESS_MODE_M = 0x80000000 | 143 OT_ADDRESS_MODE_M = 0x80000000 |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 // Flag that indicates if an immediate operand is 64-bits. |
| 147 // |
| 148 // The Intel 64 and IA-32 Architecture Software Developer's Manual currently |
| 149 // defines MOV as the only instruction supporting a 64-bit immediate operand. |
| 150 enum ImmediateOperandSize { |
| 151 IOS_MASK = 0x0000F000, |
| 152 IOS_DEFAULT = 0x0, |
| 153 IOS_64 = 0x00001000 |
| 154 }; |
| 155 |
| 146 // Everything that's in an Opcode (see below) except the three | 156 // Everything that's in an Opcode (see below) except the three |
| 147 // alternative opcode structs for different prefixes. | 157 // alternative opcode structs for different prefixes. |
| 148 struct SpecificOpcode { | 158 struct SpecificOpcode { |
| 149 // Index to continuation table, or 0 if this is the last | 159 // Index to continuation table, or 0 if this is the last |
| 150 // byte in the opcode. | 160 // byte in the opcode. |
| 151 int table_index_; | 161 int table_index_; |
| 152 | 162 |
| 153 // The opcode type | 163 // The opcode type |
| 154 InstructionType type_; | 164 InstructionType type_; |
| 155 | 165 |
| 156 // Description of the type of the dest, src and aux operands, | 166 // Description of the type of the dest, src and aux operands, |
| 157 // put together from an enOperandType flag and an enAddressingMethod | 167 // put together from enOperandType, enAddressingMethod and |
| 158 // flag. | 168 // enImmediateOperandSize flags. |
| 159 int flag_dest_; | 169 int flag_dest_; |
| 160 int flag_source_; | 170 int flag_source_; |
| 161 int flag_aux_; | 171 int flag_aux_; |
| 162 | 172 |
| 163 // We indicate the mnemonic for debugging purposes | 173 // We indicate the mnemonic for debugging purposes |
| 164 const char* mnemonic_; | 174 const char* mnemonic_; |
| 165 }; | 175 }; |
| 166 | 176 |
| 167 // The information we keep in our tables about each of the different | 177 // The information we keep in our tables about each of the different |
| 168 // valid instructions recognized by the IA-32 architecture. | 178 // valid instructions recognized by the IA-32 architecture. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 bool use_sib_byte_; | 227 bool use_sib_byte_; |
| 218 | 228 |
| 219 // What is the size of the operand (only important if it's encoded | 229 // What is the size of the operand (only important if it's encoded |
| 220 // in the instruction)? | 230 // in the instruction)? |
| 221 OperandSize operand_size_; | 231 OperandSize operand_size_; |
| 222 }; | 232 }; |
| 223 | 233 |
| 224 }; // namespace sidestep | 234 }; // namespace sidestep |
| 225 | 235 |
| 226 #endif // GOOGLE_PERFTOOLS_MINI_DISASSEMBLER_TYPES_H_ | 236 #endif // GOOGLE_PERFTOOLS_MINI_DISASSEMBLER_TYPES_H_ |
| OLD | NEW |