OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/disassembler.h" | 5 #include "vm/disassembler.h" |
6 | 6 |
7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. | 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
8 #if defined(TARGET_ARCH_X64) | 8 #if defined(TARGET_ARCH_X64) |
9 #include "platform/utils.h" | 9 #include "platform/utils.h" |
10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
11 #include "vm/heap.h" | 11 #include "vm/heap.h" |
12 #include "vm/os.h" | 12 #include "vm/os.h" |
13 #include "vm/stack_frame.h" | 13 #include "vm/stack_frame.h" |
14 #include "vm/stub_code.h" | 14 #include "vm/stub_code.h" |
15 | 15 |
16 namespace dart { | 16 namespace dart { |
17 | 17 |
| 18 #ifndef PRODUCT |
18 | 19 |
19 enum OperandType { | 20 enum OperandType { |
20 UNSET_OP_ORDER = 0, | 21 UNSET_OP_ORDER = 0, |
21 // Operand size decides between 16, 32 and 64 bit operands. | 22 // Operand size decides between 16, 32 and 64 bit operands. |
22 REG_OPER_OP_ORDER = 1, // Register destination, operand source. | 23 REG_OPER_OP_ORDER = 1, // Register destination, operand source. |
23 OPER_REG_OP_ORDER = 2, // Operand destination, register source. | 24 OPER_REG_OP_ORDER = 2, // Operand destination, register source. |
24 // Fixed 8-bit operands. | 25 // Fixed 8-bit operands. |
25 BYTE_SIZE_OPERAND_FLAG = 4, | 26 BYTE_SIZE_OPERAND_FLAG = 4, |
26 BYTE_REG_OPER_OP_ORDER = REG_OPER_OP_ORDER | BYTE_SIZE_OPERAND_FLAG, | 27 BYTE_REG_OPER_OP_ORDER = REG_OPER_OP_ORDER | BYTE_SIZE_OPERAND_FLAG, |
27 BYTE_OPER_REG_OP_ORDER = OPER_REG_OP_ORDER | BYTE_SIZE_OPERAND_FLAG | 28 BYTE_OPER_REG_OP_ORDER = OPER_REG_OP_ORDER | BYTE_SIZE_OPERAND_FLAG |
(...skipping 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1940 OS::SNPrint(&hex_buffer[hex_index], remaining_size, "%02x", pc_ptr[i]); | 1941 OS::SNPrint(&hex_buffer[hex_index], remaining_size, "%02x", pc_ptr[i]); |
1941 hex_index += 2; | 1942 hex_index += 2; |
1942 remaining_size -= 2; | 1943 remaining_size -= 2; |
1943 } | 1944 } |
1944 hex_buffer[hex_index] = '\0'; | 1945 hex_buffer[hex_index] = '\0'; |
1945 if (out_instr_len) { | 1946 if (out_instr_len) { |
1946 *out_instr_len = instruction_length; | 1947 *out_instr_len = instruction_length; |
1947 } | 1948 } |
1948 } | 1949 } |
1949 | 1950 |
| 1951 #endif // !PRODUCT |
| 1952 |
1950 } // namespace dart | 1953 } // namespace dart |
1951 | 1954 |
1952 #endif // defined TARGET_ARCH_X64 | 1955 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |