ARM: More micro-optimization of megamorphic lookup.
Review URL: https://chromiumcodereview.appspot.com/9323004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
aa4b77d761
commit
039223af9a
@ -205,8 +205,9 @@ void StubCache::GenerateProbe(MacroAssembler* masm,
|
|||||||
// Mask down the eor argument to the minimum to keep the immediate
|
// Mask down the eor argument to the minimum to keep the immediate
|
||||||
// ARM-encodable.
|
// ARM-encodable.
|
||||||
__ eor(scratch, scratch, Operand(flags & mask));
|
__ eor(scratch, scratch, Operand(flags & mask));
|
||||||
// Prefer ubfx to and_ here because the mask is not ARM-encodable.
|
// Prefer and_ to ubfx here because ubfx takes 2 cycles.
|
||||||
__ Ubfx(scratch, scratch, kHeapObjectTagSize, kPrimaryTableBits);
|
__ and_(scratch, scratch, Operand(mask));
|
||||||
|
__ mov(scratch, Operand(scratch, LSR, 1));
|
||||||
|
|
||||||
// Probe the primary table.
|
// Probe the primary table.
|
||||||
ProbeTable(isolate,
|
ProbeTable(isolate,
|
||||||
@ -215,14 +216,15 @@ void StubCache::GenerateProbe(MacroAssembler* masm,
|
|||||||
kPrimary,
|
kPrimary,
|
||||||
name,
|
name,
|
||||||
scratch,
|
scratch,
|
||||||
kHeapObjectTagSize,
|
1,
|
||||||
extra,
|
extra,
|
||||||
extra2);
|
extra2);
|
||||||
|
|
||||||
// Primary miss: Compute hash for secondary probe.
|
// Primary miss: Compute hash for secondary probe.
|
||||||
__ rsb(scratch, name, Operand(scratch, LSL, kHeapObjectTagSize));
|
__ sub(scratch, scratch, Operand(name, LSR, 1));
|
||||||
__ add(scratch, scratch, Operand(flags));
|
uint32_t mask2 = (kSecondaryTableSize - 1) << (kHeapObjectTagSize - 1);
|
||||||
__ Ubfx(scratch, scratch, kHeapObjectTagSize, kSecondaryTableBits);
|
__ add(scratch, scratch, Operand((flags >> 1) & mask2));
|
||||||
|
__ and_(scratch, scratch, Operand(mask2));
|
||||||
|
|
||||||
// Probe the secondary table.
|
// Probe the secondary table.
|
||||||
ProbeTable(isolate,
|
ProbeTable(isolate,
|
||||||
@ -231,7 +233,7 @@ void StubCache::GenerateProbe(MacroAssembler* masm,
|
|||||||
kSecondary,
|
kSecondary,
|
||||||
name,
|
name,
|
||||||
scratch,
|
scratch,
|
||||||
kHeapObjectTagSize,
|
1,
|
||||||
extra,
|
extra,
|
||||||
extra2);
|
extra2);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user