| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <assert.h> | 5 #include <assert.h> |
| 6 #include <stdarg.h> | 6 #include <stdarg.h> |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_X64 | 9 #if V8_TARGET_ARCH_X64 |
| 10 | 10 |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 break; | 612 break; |
| 613 case OPERAND_QUADWORD_SIZE: | 613 case OPERAND_QUADWORD_SIZE: |
| 614 value = *reinterpret_cast<int32_t*>(data); | 614 value = *reinterpret_cast<int32_t*>(data); |
| 615 count = 4; | 615 count = 4; |
| 616 break; | 616 break; |
| 617 default: | 617 default: |
| 618 UNREACHABLE(); | 618 UNREACHABLE(); |
| 619 value = 0; // Initialize variables on all paths to satisfy the compiler. | 619 value = 0; // Initialize variables on all paths to satisfy the compiler. |
| 620 count = 0; | 620 count = 0; |
| 621 } | 621 } |
| 622 AppendToBuffer("%" V8PRIxPTR, value); | 622 AppendToBuffer("%" PRIx64, value); |
| 623 return count; | 623 return count; |
| 624 } | 624 } |
| 625 | 625 |
| 626 | 626 |
| 627 int DisassemblerX64::PrintRightOperand(byte* modrmp) { | 627 int DisassemblerX64::PrintRightOperand(byte* modrmp) { |
| 628 return PrintRightOperandHelper(modrmp, | 628 return PrintRightOperandHelper(modrmp, |
| 629 &DisassemblerX64::NameOfCPURegister); | 629 &DisassemblerX64::NameOfCPURegister); |
| 630 } | 630 } |
| 631 | 631 |
| 632 | 632 |
| (...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2328 value = *reinterpret_cast<uint32_t*>(data + 1); | 2328 value = *reinterpret_cast<uint32_t*>(data + 1); |
| 2329 data += 5; | 2329 data += 5; |
| 2330 break; | 2330 break; |
| 2331 case OPERAND_QUADWORD_SIZE: | 2331 case OPERAND_QUADWORD_SIZE: |
| 2332 value = *reinterpret_cast<int32_t*>(data + 1); | 2332 value = *reinterpret_cast<int32_t*>(data + 1); |
| 2333 data += 5; | 2333 data += 5; |
| 2334 break; | 2334 break; |
| 2335 default: | 2335 default: |
| 2336 UNREACHABLE(); | 2336 UNREACHABLE(); |
| 2337 } | 2337 } |
| 2338 AppendToBuffer("test%c rax,0x%" V8PRIxPTR, operand_size_code(), value); | 2338 AppendToBuffer("test%c rax,0x%" PRIx64, operand_size_code(), value); |
| 2339 break; | 2339 break; |
| 2340 } | 2340 } |
| 2341 case 0xD1: // fall through | 2341 case 0xD1: // fall through |
| 2342 case 0xD3: // fall through | 2342 case 0xD3: // fall through |
| 2343 case 0xC1: | 2343 case 0xC1: |
| 2344 data += ShiftInstruction(data); | 2344 data += ShiftInstruction(data); |
| 2345 break; | 2345 break; |
| 2346 case 0xD0: // fall through | 2346 case 0xD0: // fall through |
| 2347 case 0xD2: // fall through | 2347 case 0xD2: // fall through |
| 2348 case 0xC0: | 2348 case 0xC0: |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2501 for (int i = 6 - static_cast<int>(pc - prev_pc); i >= 0; i--) { | 2501 for (int i = 6 - static_cast<int>(pc - prev_pc); i >= 0; i--) { |
| 2502 fprintf(f, " "); | 2502 fprintf(f, " "); |
| 2503 } | 2503 } |
| 2504 fprintf(f, " %s\n", buffer.start()); | 2504 fprintf(f, " %s\n", buffer.start()); |
| 2505 } | 2505 } |
| 2506 } | 2506 } |
| 2507 | 2507 |
| 2508 } // namespace disasm | 2508 } // namespace disasm |
| 2509 | 2509 |
| 2510 #endif // V8_TARGET_ARCH_X64 | 2510 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |