Chromium Code Reviews| Index: src/arm/macro-assembler-arm.cc |
| =================================================================== |
| --- src/arm/macro-assembler-arm.cc (revision 12826) |
| +++ src/arm/macro-assembler-arm.cc (working copy) |
| @@ -422,6 +422,17 @@ |
| void MacroAssembler::LoadRoot(Register destination, |
| Heap::RootListIndex index, |
| Condition cond) { |
| + if (CpuFeatures::IsSupported(MOVW_MOVT_IMMEDIATE_LOADS)) { |
| + Handle<Object> root(isolate()->heap()->roots_array_start()[index]); |
| + if (root->IsOddball() || root->IsMap() || |
|
danno
2012/10/29 15:05:39
Can you phrase this test as checking against a bla
|
| + index == Heap::kEmptyFixedArrayRootIndex || |
| + index == Heap::kSingleCharacterStringCacheRootIndex) { |
| + // The CPU supports fast immediate values, and this root will never |
| + // change. We will load it as a relocatable immediate value. |
| + mov(destination, Operand(root), LeaveCC, cond); |
| + return; |
| + } |
| + } |
| ldr(destination, MemOperand(kRootRegister, index << kPointerSizeLog2), cond); |
| } |