Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Side by Side Diff: runtime/vm/disassembler_x64.cc

Issue 10905120: A third attempt to provide correct conversion specifiers on MacOS. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 break; 552 break;
553 case QUADWORD_SIZE: 553 case QUADWORD_SIZE:
554 value = *reinterpret_cast<int32_t*>(data); 554 value = *reinterpret_cast<int32_t*>(data);
555 count = 4; 555 count = 4;
556 break; 556 break;
557 default: 557 default:
558 UNREACHABLE(); 558 UNREACHABLE();
559 value = 0; // Initialize variables on all paths to satisfy the compiler. 559 value = 0; // Initialize variables on all paths to satisfy the compiler.
560 count = 0; 560 count = 0;
561 } 561 }
562 AppendToBuffer("%#"Px"", value); 562 AppendToBuffer("%#"Px64"", value);
563 return count; 563 return count;
564 } 564 }
565 565
566 566
567 // Returns number of bytes used by machine instruction, including *data byte. 567 // Returns number of bytes used by machine instruction, including *data byte.
568 // Writes immediate instructions to 'tmp_buffer_'. 568 // Writes immediate instructions to 'tmp_buffer_'.
569 int DisassemblerX64::PrintImmediateOp(uint8_t* data) { 569 int DisassemblerX64::PrintImmediateOp(uint8_t* data) {
570 bool byte_size_immediate = (*data & 0x02) != 0; 570 bool byte_size_immediate = (*data & 0x02) != 0;
571 uint8_t modrm = *(data + 1); 571 uint8_t modrm = *(data + 1);
572 int mod, regop, rm; 572 int mod, regop, rm;
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1748 value = *reinterpret_cast<uint32_t*>(data + 1); 1748 value = *reinterpret_cast<uint32_t*>(data + 1);
1749 data += 5; 1749 data += 5;
1750 break; 1750 break;
1751 case QUADWORD_SIZE: 1751 case QUADWORD_SIZE:
1752 value = *reinterpret_cast<int32_t*>(data + 1); 1752 value = *reinterpret_cast<int32_t*>(data + 1);
1753 data += 5; 1753 data += 5;
1754 break; 1754 break;
1755 default: 1755 default:
1756 UNREACHABLE(); 1756 UNREACHABLE();
1757 } 1757 }
1758 AppendToBuffer("test%c rax,%#"Px"", 1758 AppendToBuffer("test%c rax,%#"Px64"",
1759 operand_size_code(), 1759 operand_size_code(),
1760 value); 1760 value);
1761 break; 1761 break;
1762 } 1762 }
1763 case 0xD1: // fall through 1763 case 0xD1: // fall through
1764 case 0xD3: // fall through 1764 case 0xD3: // fall through
1765 case 0xC1: 1765 case 0xC1:
1766 data += ShiftInstruction(data); 1766 data += ShiftInstruction(data);
1767 break; 1767 break;
1768 case 0xD0: // fall through 1768 case 0xD0: // fall through
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
1856 human_buffer, 1856 human_buffer,
1857 sizeof(human_buffer), 1857 sizeof(human_buffer),
1858 pc); 1858 pc);
1859 pc += instruction_length; 1859 pc += instruction_length;
1860 } 1860 }
1861 } 1861 }
1862 1862
1863 } // namespace dart 1863 } // namespace dart
1864 1864
1865 #endif // defined TARGET_ARCH_X64 1865 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698