Index: src/x64/assembler-x64.cc |
diff --git a/src/x64/assembler-x64.cc b/src/x64/assembler-x64.cc |
index f5939c3b7e1f1604d18528fe2cdd5d9481061132..8969d89a6a75db3b8a021ea666db81cffb4c9033 100644 |
--- a/src/x64/assembler-x64.cc |
+++ b/src/x64/assembler-x64.cc |
@@ -164,10 +164,7 @@ void CpuFeatures::Probe() { |
// Patch the code at the current PC with a call to the target address. |
// Additional guard int3 instructions can be added if required. |
void RelocInfo::PatchCodeWithCall(Address target, int guard_bytes) { |
- // Load register with immediate 64 and call through a register instructions |
- // takes up 13 bytes and int3 takes up one byte. |
- static const int kCallCodeSize = 13; |
- int code_size = kCallCodeSize + guard_bytes; |
+ int code_size = Assembler::kCallSequenceLength + guard_bytes; |
// Create a code patcher. |
CodePatcher patcher(pc_, code_size); |
@@ -183,7 +180,7 @@ void RelocInfo::PatchCodeWithCall(Address target, int guard_bytes) { |
patcher.masm()->call(r10); |
// Check that the size of the code generated is as expected. |
- ASSERT_EQ(kCallCodeSize, |
+ ASSERT_EQ(Assembler::kCallSequenceLength, |
patcher.masm()->SizeOfCodeGeneratedSince(&check_codesize)); |
// Add the requested number of int3 instructions after the call. |