| 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 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 948 Print("Unknown FP instruction"); | 948 Print("Unknown FP instruction"); |
| 949 return 2; | 949 return 2; |
| 950 } | 950 } |
| 951 | 951 |
| 952 | 952 |
| 953 // Called when disassembling test eax, 0xXXXXX. | 953 // Called when disassembling test eax, 0xXXXXX. |
| 954 void X86Decoder::CheckPrintStop(uint8_t* data) { | 954 void X86Decoder::CheckPrintStop(uint8_t* data) { |
| 955 // Recognize stop pattern. | 955 // Recognize stop pattern. |
| 956 if (*reinterpret_cast<uint8_t*>(data + 5) == 0xCC) { | 956 if (*reinterpret_cast<uint8_t*>(data + 5) == 0xCC) { |
| 957 Print(" STOP:'"); | 957 Print(" STOP:'"); |
| 958 const char* text = *reinterpret_cast<const char **>(data + 1); | 958 const char* text = *reinterpret_cast<const char**>(data + 1); |
| 959 Print(text); | 959 Print(text); |
| 960 Print("'"); | 960 Print("'"); |
| 961 } | 961 } |
| 962 } | 962 } |
| 963 | 963 |
| 964 const char* X86Decoder::GetBranchPrefix(uint8_t** data) { | 964 const char* X86Decoder::GetBranchPrefix(uint8_t** data) { |
| 965 // We use these two prefixes only with branch prediction | 965 // We use these two prefixes only with branch prediction |
| 966 switch (**data) { | 966 switch (**data) { |
| 967 case 0x3E: // ds | 967 case 0x3E: // ds |
| 968 (*data)++; | 968 (*data)++; |
| (...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1605 human_buffer, | 1605 human_buffer, |
| 1606 sizeof(human_buffer), | 1606 sizeof(human_buffer), |
| 1607 pc); | 1607 pc); |
| 1608 pc += instruction_length; | 1608 pc += instruction_length; |
| 1609 } | 1609 } |
| 1610 } | 1610 } |
| 1611 | 1611 |
| 1612 } // namespace dart | 1612 } // namespace dart |
| 1613 | 1613 |
| 1614 #endif // defined TARGET_ARCH_IA32 | 1614 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |