Index: runtime/vm/instructions_x64.cc |
diff --git a/runtime/vm/instructions_x64.cc b/runtime/vm/instructions_x64.cc |
index 51128dd23901b88e6fcec7c2b64b5a5b046c8ad4..58322927d16a88ce2614ea1f18467ad3daba3193 100644 |
--- a/runtime/vm/instructions_x64.cc |
+++ b/runtime/vm/instructions_x64.cc |
@@ -36,25 +36,34 @@ bool InstructionPattern::TestBytesWith(const int* data, int num_bytes) const { |
} |
-uword JumpPattern::TargetAddress() const { |
+RawCode* JumpPattern::TargetCode() const { |
ASSERT(IsValid()); |
int index = InstructionPattern::IndexFromPPLoad(start() + 3); |
- return object_pool_.RawValueAt(index); |
+ Code& code = Code::Handle(); |
+ code ^= object_pool_.ObjectAt(index); |
+ return code.raw(); |
} |
-void JumpPattern::SetTargetAddress(uword target) const { |
+void JumpPattern::SetTargetCode(const Code& target) const { |
ASSERT(IsValid()); |
int index = InstructionPattern::IndexFromPPLoad(start() + 3); |
- object_pool_.SetRawValueAt(index, target); |
+ object_pool_.SetObjectAt(index, target); |
// No need to flush the instruction cache, since the code is not modified. |
} |
const int* JumpPattern::pattern() const { |
- // 07: 41 ff a7 imm32 jmpq [reg + off] |
+ // 0: 4d 8b a5 imm32 movq CR, [PP + offs] |
+ // 7: 4d 8b 5c 24 07 movq TMP, [CR + insns_offs] |
+ // 12: 49 83 c3 1f addq TMP, entry_offs |
+ // 16: 41 ff e3 jmp TMP |
+ // 19: |
static const int kJumpPattern[kLengthInBytes] = |
- {0x41, 0xFF, -1, -1, -1, -1, -1}; |
+ {0x4d, 0x8b, -1, -1, -1, -1, -1, |
+ 0x4d, 0x8b, 0x5c, 0x24, 0x07, |
+ 0x49, 0x83, 0xc3, 0x1f, |
+ 0x41, 0xff, 0xe3}; |
return kJumpPattern; |
} |