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_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 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 Print(comment); | 779 Print(comment); |
780 } | 780 } |
781 return 6; // includes 0x0F | 781 return 6; // includes 0x0F |
782 } | 782 } |
783 | 783 |
784 | 784 |
785 // Returns number of bytes used, including *data. | 785 // Returns number of bytes used, including *data. |
786 int X86Decoder::JumpConditionalShort(uint8_t* data, const char* comment) { | 786 int X86Decoder::JumpConditionalShort(uint8_t* data, const char* comment) { |
787 uint8_t cond = *data & 0x0F; | 787 uint8_t cond = *data & 0x0F; |
788 uint8_t b = *(data+1); | 788 uint8_t b = *(data+1); |
789 word dest = reinterpret_cast<uword>(data) + static_cast<int8_t>(b) + 2; | 789 uword dest = reinterpret_cast<uword>(data) + static_cast<int8_t>(b) + 2; |
790 const char* mnem = jump_conditional_mnem[cond]; | 790 const char* mnem = jump_conditional_mnem[cond]; |
791 Print(mnem); | 791 Print(mnem); |
792 Print(" "); | 792 Print(" "); |
793 PrintAddress(dest); | 793 PrintAddress(dest); |
794 if (comment != NULL) { | 794 if (comment != NULL) { |
795 Print(", "); | 795 Print(", "); |
796 Print(comment); | 796 Print(comment); |
797 } | 797 } |
798 return 2; | 798 return 2; |
799 } | 799 } |
(...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1876 pc); | 1876 pc); |
1877 pc += instruction_length; | 1877 pc += instruction_length; |
1878 } | 1878 } |
1879 | 1879 |
1880 return; | 1880 return; |
1881 } | 1881 } |
1882 | 1882 |
1883 } // namespace dart | 1883 } // namespace dart |
1884 | 1884 |
1885 #endif // defined TARGET_ARCH_IA32 | 1885 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |