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

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

Issue 10185001: Fix target address decoding in ia32 disassembler for CALL_JUMP_INSTR instructions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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_IA32) 8 #if defined(TARGET_ARCH_IA32)
9 #include "platform/utils.h" 9 #include "platform/utils.h"
10 #include "vm/allocation.h" 10 #include "vm/allocation.h"
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 uword addr = *reinterpret_cast<uword*>(*data+1); 1006 uword addr = *reinterpret_cast<uword*>(*data+1);
1007 Print("mov "); 1007 Print("mov ");
1008 PrintCPURegister(**data & 0x07), 1008 PrintCPURegister(**data & 0x07),
1009 Print(","); 1009 Print(",");
1010 PrintAddress(addr); 1010 PrintAddress(addr);
1011 (*data) += 5; 1011 (*data) += 5;
1012 return true; 1012 return true;
1013 } 1013 }
1014 1014
1015 case CALL_JUMP_INSTR: { 1015 case CALL_JUMP_INSTR: {
1016 uword addr = reinterpret_cast<uword>(data) + 1016 uword addr = reinterpret_cast<uword>(*data) +
1017 *reinterpret_cast<uword*>(*data+1) + 5; 1017 *reinterpret_cast<uword*>(*data+1) + 5;
1018 Print(idesc.mnem); 1018 Print(idesc.mnem);
1019 Print(" "); 1019 Print(" ");
1020 PrintAddress(addr); 1020 PrintAddress(addr);
1021 (*data) += 5; 1021 (*data) += 5;
1022 return true; 1022 return true;
1023 } 1023 }
1024 1024
1025 case SHORT_IMMEDIATE_INSTR: { 1025 case SHORT_IMMEDIATE_INSTR: {
1026 uword addr = *reinterpret_cast<uword*>(*data+1); 1026 uword addr = *reinterpret_cast<uword*>(*data+1);
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
1593 human_buffer, 1593 human_buffer,
1594 sizeof(human_buffer), 1594 sizeof(human_buffer),
1595 pc); 1595 pc);
1596 pc += instruction_length; 1596 pc += instruction_length;
1597 } 1597 }
1598 } 1598 }
1599 1599
1600 } // namespace dart 1600 } // namespace dart
1601 1601
1602 #endif // defined TARGET_ARCH_IA32 1602 #endif // defined TARGET_ARCH_IA32
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