Chromium Code Reviews| Index: src/arm/stub-cache-arm.cc |
| =================================================================== |
| --- src/arm/stub-cache-arm.cc (revision 10591) |
| +++ src/arm/stub-cache-arm.cc (working copy) |
| @@ -205,8 +205,9 @@ |
| // Mask down the eor argument to the minimum to keep the immediate |
| // ARM-encodable. |
| __ eor(scratch, scratch, Operand(flags & mask)); |
| - // Prefer ubfx to and_ here because the mask is not ARM-encodable. |
| - __ Ubfx(scratch, scratch, kHeapObjectTagSize, kPrimaryTableBits); |
| + // Prefer and_ to ubfx here because ubfx takes 2 cycles. |
| + __ and_(scratch, scratch, Operand(mask)); |
| + __ mov(scratch, Operand(scratch, LSR, 1)); |
| // Probe the primary table. |
| ProbeTable(isolate, |
| @@ -215,14 +216,17 @@ |
| kPrimary, |
| name, |
| scratch, |
| - kHeapObjectTagSize, |
| + 1, |
| extra, |
| extra2); |
| // Primary miss: Compute hash for secondary probe. |
|
Michael Starzinger
2012/02/02 15:36:08
Can the following sequence be rewritten like follo
|
| - __ rsb(scratch, name, Operand(scratch, LSL, kHeapObjectTagSize)); |
| + __ rsb(scratch, name, Operand(scratch, LSL, 1)); |
| __ add(scratch, scratch, Operand(flags)); |
| - __ Ubfx(scratch, scratch, kHeapObjectTagSize, kSecondaryTableBits); |
| + __ and_(scratch, |
| + scratch, |
| + Operand((kSecondaryTableSize - 1) << kHeapObjectTagSize)); |
| + __ mov(scratch, Operand(scratch, LSR, 1)); |
| // Probe the secondary table. |
| ProbeTable(isolate, |
| @@ -231,7 +235,7 @@ |
| kSecondary, |
| name, |
| scratch, |
| - kHeapObjectTagSize, |
| + 1, |
| extra, |
| extra2); |