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/globals.h" // Needed here to get TARGET_ARCH_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
7 | 7 |
8 #include "vm/cpu.h" | 8 #include "vm/cpu.h" |
9 #include "vm/constants_x64.h" | 9 #include "vm/constants_x64.h" |
10 #include "vm/instructions.h" | 10 #include "vm/instructions.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 COMPILE_ASSERT(THR == R14); | 41 COMPILE_ASSERT(THR == R14); |
42 if (((bytes[0] == 0x49) && (bytes[1] == 0x8b) && (bytes[2] == 0x86)) || | 42 if (((bytes[0] == 0x49) && (bytes[1] == 0x8b) && (bytes[2] == 0x86)) || |
43 ((bytes[0] == 0x49) && (bytes[1] == 0x8b) && (bytes[2] == 0xb6)) || | 43 ((bytes[0] == 0x49) && (bytes[1] == 0x8b) && (bytes[2] == 0xb6)) || |
44 ((bytes[0] == 0x49) && (bytes[1] == 0x8b) && (bytes[2] == 0x96)) || | 44 ((bytes[0] == 0x49) && (bytes[1] == 0x8b) && (bytes[2] == 0x96)) || |
45 ((bytes[0] == 0x49) && (bytes[1] == 0x8b) && (bytes[2] == 0x9e)) || | 45 ((bytes[0] == 0x49) && (bytes[1] == 0x8b) && (bytes[2] == 0x9e)) || |
46 ((bytes[0] == 0x4d) && (bytes[1] == 0x8b) && (bytes[2] == 0x9e)) || | 46 ((bytes[0] == 0x4d) && (bytes[1] == 0x8b) && (bytes[2] == 0x9e)) || |
47 ((bytes[0] == 0x4d) && (bytes[1] == 0x8b) && (bytes[2] == 0xa6))) { | 47 ((bytes[0] == 0x4d) && (bytes[1] == 0x8b) && (bytes[2] == 0xa6))) { |
48 int32_t offset = *reinterpret_cast<int32_t*>(pc + 3); | 48 int32_t offset = *reinterpret_cast<int32_t*>(pc + 3); |
49 return Thread::ObjectAtOffset(offset, obj); | 49 return Thread::ObjectAtOffset(offset, obj); |
50 } | 50 } |
51 if (((bytes[0] == 0x4d) && (bytes[1] == 0x8b) && (bytes[2] == 0x5e)) || | 51 if (((bytes[0] == 0x41) && (bytes[1] == 0xff) && (bytes[2] == 0x76)) || |
| 52 ((bytes[0] == 0x49) && (bytes[1] == 0x3b) && (bytes[2] == 0x66)) || |
| 53 ((bytes[0] == 0x49) && (bytes[1] == 0x8b) && (bytes[2] == 0x46)) || |
| 54 ((bytes[0] == 0x4d) && (bytes[1] == 0x8b) && (bytes[2] == 0x5e)) || |
| 55 ((bytes[0] == 0x4d) && (bytes[1] == 0x8b) && (bytes[2] == 0x66)) || |
52 ((bytes[0] == 0x4d) && (bytes[1] == 0x8b) && (bytes[2] == 0x6e))) { | 56 ((bytes[0] == 0x4d) && (bytes[1] == 0x8b) && (bytes[2] == 0x6e))) { |
53 uint8_t offset = *reinterpret_cast<uint8_t*>(pc + 3); | 57 uint8_t offset = *reinterpret_cast<uint8_t*>(pc + 3); |
54 return Thread::ObjectAtOffset(offset, obj); | 58 return Thread::ObjectAtOffset(offset, obj); |
55 } | 59 } |
56 | 60 |
57 return false; | 61 return false; |
58 } | 62 } |
59 | 63 |
60 } // namespace dart | 64 } // namespace dart |
61 | 65 |
62 #endif // defined TARGET_ARCH_X64 | 66 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |