| 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" |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 mnem = "xor"; | 602 mnem = "xor"; |
| 603 break; | 603 break; |
| 604 case 7: | 604 case 7: |
| 605 mnem = "cmp"; | 605 mnem = "cmp"; |
| 606 break; | 606 break; |
| 607 default: | 607 default: |
| 608 UnimplementedInstruction(); | 608 UnimplementedInstruction(); |
| 609 } | 609 } |
| 610 AppendToBuffer("%s%c ", mnem, operand_size_code()); | 610 AppendToBuffer("%s%c ", mnem, operand_size_code()); |
| 611 int count = PrintRightOperand(data + 1); | 611 int count = PrintRightOperand(data + 1); |
| 612 AppendToBuffer(",0x"); | 612 AppendToBuffer(","); |
| 613 OperandSize immediate_size = byte_size_immediate ? BYTE_SIZE : operand_size(); | 613 OperandSize immediate_size = byte_size_immediate ? BYTE_SIZE : operand_size(); |
| 614 count += PrintImmediate(data + 1 + count, immediate_size); | 614 count += PrintImmediate(data + 1 + count, immediate_size); |
| 615 return 1 + count; | 615 return 1 + count; |
| 616 } | 616 } |
| 617 | 617 |
| 618 | 618 |
| 619 // Returns number of bytes used, including *data. | 619 // Returns number of bytes used, including *data. |
| 620 int DisassemblerX64::F6F7Instruction(uint8_t* data) { | 620 int DisassemblerX64::F6F7Instruction(uint8_t* data) { |
| 621 ASSERT(*data == 0xF7 || *data == 0xF6); | 621 ASSERT(*data == 0xF7 || *data == 0xF6); |
| 622 uint8_t modrm = *(data + 1); | 622 uint8_t modrm = *(data + 1); |
| (...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1864 human_buffer, | 1864 human_buffer, |
| 1865 sizeof(human_buffer), | 1865 sizeof(human_buffer), |
| 1866 pc); | 1866 pc); |
| 1867 pc += instruction_length; | 1867 pc += instruction_length; |
| 1868 } | 1868 } |
| 1869 } | 1869 } |
| 1870 | 1870 |
| 1871 } // namespace dart | 1871 } // namespace dart |
| 1872 | 1872 |
| 1873 #endif // defined TARGET_ARCH_X64 | 1873 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |