Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 415 bind(&done); | 415 bind(&done); |
| 416 } else { | 416 } else { |
| 417 usat(dst, satpos, src, cond); | 417 usat(dst, satpos, src, cond); |
| 418 } | 418 } |
| 419 } | 419 } |
| 420 | 420 |
| 421 | 421 |
| 422 void MacroAssembler::LoadRoot(Register destination, | 422 void MacroAssembler::LoadRoot(Register destination, |
| 423 Heap::RootListIndex index, | 423 Heap::RootListIndex index, |
| 424 Condition cond) { | 424 Condition cond) { |
| 425 if (CpuFeatures::IsSupported(MOVW_MOVT_IMMEDIATE_LOADS)) { | |
| 426 Handle<Object> root(isolate()->heap()->roots_array_start()[index]); | |
| 427 if (root->IsOddball() || root->IsMap() || | |
|
danno
2012/10/29 15:05:39
Can you phrase this test as checking against a bla
| |
| 428 index == Heap::kEmptyFixedArrayRootIndex || | |
| 429 index == Heap::kSingleCharacterStringCacheRootIndex) { | |
| 430 // The CPU supports fast immediate values, and this root will never | |
| 431 // change. We will load it as a relocatable immediate value. | |
| 432 mov(destination, Operand(root), LeaveCC, cond); | |
| 433 return; | |
| 434 } | |
| 435 } | |
| 425 ldr(destination, MemOperand(kRootRegister, index << kPointerSizeLog2), cond); | 436 ldr(destination, MemOperand(kRootRegister, index << kPointerSizeLog2), cond); |
| 426 } | 437 } |
| 427 | 438 |
| 428 | 439 |
| 429 void MacroAssembler::StoreRoot(Register source, | 440 void MacroAssembler::StoreRoot(Register source, |
| 430 Heap::RootListIndex index, | 441 Heap::RootListIndex index, |
| 431 Condition cond) { | 442 Condition cond) { |
| 432 str(source, MemOperand(kRootRegister, index << kPointerSizeLog2), cond); | 443 str(source, MemOperand(kRootRegister, index << kPointerSizeLog2), cond); |
| 433 } | 444 } |
| 434 | 445 |
| (...skipping 3432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3867 void CodePatcher::EmitCondition(Condition cond) { | 3878 void CodePatcher::EmitCondition(Condition cond) { |
| 3868 Instr instr = Assembler::instr_at(masm_.pc_); | 3879 Instr instr = Assembler::instr_at(masm_.pc_); |
| 3869 instr = (instr & ~kCondMask) | cond; | 3880 instr = (instr & ~kCondMask) | cond; |
| 3870 masm_.emit(instr); | 3881 masm_.emit(instr); |
| 3871 } | 3882 } |
| 3872 | 3883 |
| 3873 | 3884 |
| 3874 } } // namespace v8::internal | 3885 } } // namespace v8::internal |
| 3875 | 3886 |
| 3876 #endif // V8_TARGET_ARCH_ARM | 3887 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |