Index: src/x64/deoptimizer-x64.cc |
diff --git a/src/x64/deoptimizer-x64.cc b/src/x64/deoptimizer-x64.cc |
index b45e9663e2a10c074178e0802aca949c3164f207..bf1e7bd82f47ed57f22c8f4a3a2806bb377095ae 100644 |
--- a/src/x64/deoptimizer-x64.cc |
+++ b/src/x64/deoptimizer-x64.cc |
@@ -83,7 +83,13 @@ void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { |
static const byte kJnsInstruction = 0x79; |
+#if V8_USE_31_BIT_SMI_VALUE |
+// The Smi::FromInt(reset_value) could be embedded as 4-byte in the generated |
+// instruction stream from FullCodeGenerator::EmitProfilingCounterReset. |
+static const byte kJnsOffset = 0x19; |
+#else |
static const byte kJnsOffset = 0x1d; |
+#endif |
static const byte kCallInstruction = 0xe8; |
static const byte kNopByteOne = 0x66; |
static const byte kNopByteTwo = 0x90; |