Index: src/x64/stub-cache-x64.cc |
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc |
index a9433b4f77e6659ed0c0eaeb937677a23f66eba7..6642a14f5265899759bc0b9bcbf45477b1304db4 100644 |
--- a/src/x64/stub-cache-x64.cc |
+++ b/src/x64/stub-cache-x64.cc |
@@ -51,13 +51,14 @@ static void ProbeTable(MacroAssembler* masm, |
Label miss; |
__ movq(kScratchRegister, key_offset); |
+ SmiIndex index = masm->SmiToIndex(offset, offset, kPointerSizeLog2); |
// Check that the key in the entry matches the name. |
- __ cmpl(name, Operand(kScratchRegister, offset, times_4, 0)); |
+ __ cmpl(name, Operand(kScratchRegister, index.reg, index.scale, 0)); |
William Hesse
2009/09/15 10:12:09
Document that offset must be zero-extended in the
Lasse Reichstein
2009/09/15 10:39:08
Fixed in SmiToIndex instead.
I'll document that o
|
__ j(not_equal, &miss); |
// Get the code entry from the cache. |
// Use key_offset + kPointerSize, rather than loading value_offset. |
__ movq(kScratchRegister, |
- Operand(kScratchRegister, offset, times_4, kPointerSize)); |
+ Operand(kScratchRegister, index.reg, index.scale, kPointerSize)); |
// Check that the flags match what we're looking for. |
__ movl(offset, FieldOperand(kScratchRegister, Code::kFlagsOffset)); |
__ and_(offset, Immediate(~Code::kFlagsNotUsedInLookup)); |