Index: runtime/vm/instructions_x64.cc |
=================================================================== |
--- runtime/vm/instructions_x64.cc (revision 19723) |
+++ runtime/vm/instructions_x64.cc (working copy) |
@@ -5,6 +5,7 @@ |
#include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
#if defined(TARGET_ARCH_X64) |
+#include "vm/cpu.h" |
#include "vm/instructions.h" |
#include "vm/object.h" |
@@ -32,6 +33,7 @@ |
void CallOrJumpPattern::SetTargetAddress(uword target) const { |
ASSERT(IsValid()); |
*reinterpret_cast<uword*>(start() + 2) = target; |
+ CPU::FlushICache(start() + 2, kWordSize); |
} |
@@ -56,6 +58,7 @@ |
void ShortCallPattern::SetTargetAddress(uword target) const { |
ASSERT(IsValid()); |
*reinterpret_cast<uint32_t*>(start() + 1) = target - start() - kLengthInBytes; |
+ CPU::FlushICache(start() + 1, kWordSize); |
} |