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

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

Issue 12038013: Reland r17365. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: replace enter with EnterFrame Created 7 years, 11 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
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 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after
1502 1502
1503 const bool processed = DecodeInstructionType(&data); 1503 const bool processed = DecodeInstructionType(&data);
1504 1504
1505 if (!processed) { 1505 if (!processed) {
1506 switch (*data) { 1506 switch (*data) {
1507 case 0xC2: 1507 case 0xC2:
1508 AppendToBuffer("ret %#x", *reinterpret_cast<uint16_t*>(data + 1)); 1508 AppendToBuffer("ret %#x", *reinterpret_cast<uint16_t*>(data + 1));
1509 data += 3; 1509 data += 3;
1510 break; 1510 break;
1511 1511
1512 case 0xC8:
1513 AppendToBuffer("enter %d, %d",
1514 *reinterpret_cast<uint16_t*>(data + 1),
1515 data[3]);
1516 data += 4;
1517 break;
1518
1512 case 0x69: // fall through 1519 case 0x69: // fall through
1513 case 0x6B: { 1520 case 0x6B: {
1514 int mod, regop, rm; 1521 int mod, regop, rm;
1515 get_modrm(*(data + 1), &mod, &regop, &rm); 1522 get_modrm(*(data + 1), &mod, &regop, &rm);
1516 int32_t imm = *data == 0x6B ? *(data + 2) 1523 int32_t imm = *data == 0x6B ? *(data + 2)
1517 : *reinterpret_cast<int32_t*>(data + 2); 1524 : *reinterpret_cast<int32_t*>(data + 2);
1518 AppendToBuffer("imul%c %s,%s,%#x", 1525 AppendToBuffer("imul%c %s,%s,%#x",
1519 operand_size_code(), 1526 operand_size_code(),
1520 NameOfCPURegister(regop), 1527 NameOfCPURegister(regop),
1521 NameOfCPURegister(rm), imm); 1528 NameOfCPURegister(rm), imm);
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
1866 human_buffer, 1873 human_buffer,
1867 sizeof(human_buffer), 1874 sizeof(human_buffer),
1868 pc); 1875 pc);
1869 pc += instruction_length; 1876 pc += instruction_length;
1870 } 1877 }
1871 } 1878 }
1872 1879
1873 } // namespace dart 1880 } // namespace dart
1874 1881
1875 #endif // defined TARGET_ARCH_X64 1882 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698