Chromium Code Reviews| Index: src/arm/macro-assembler-arm.cc |
| =================================================================== |
| --- src/arm/macro-assembler-arm.cc (revision 6336) |
| +++ src/arm/macro-assembler-arm.cc (working copy) |
| @@ -485,6 +485,11 @@ |
| PopSafepointRegisters(); |
| } |
| +void MacroAssembler::StoreToSafepointRegisters(Register reg) { |
|
Søren Thygesen Gjesse
2011/01/17 13:18:07
StoreToSafepointRegisters -> StoreToSafepointRegis
Alexandre
2011/01/17 18:06:41
Done.
|
| + str(reg, SafepointRegisterSlot(reg)); |
| +} |
| + |
| + |
| int MacroAssembler::SafepointRegisterStackIndex(int reg_code) { |
| // The registers are pushed starting with the highest encoding, |
| // which means that lowest encodings are closest to the stack pointer. |
| @@ -493,6 +498,11 @@ |
| } |
| +MemOperand MacroAssembler::SafepointRegisterSlot(Register reg) { |
| + return MemOperand(sp, reg.code() * kInstrSize); |
|
Søren Thygesen Gjesse
2011/01/17 13:18:07
reg.code() -> SafepointRegisterStackIndex(reg.code
Alexandre
2011/01/17 18:06:41
Done.
|
| +} |
| + |
| + |
| void MacroAssembler::Ldrd(Register dst1, Register dst2, |
| const MemOperand& src, Condition cond) { |
| ASSERT(src.rm().is(no_reg)); |
| @@ -2185,6 +2195,26 @@ |
| } |
| +void MacroAssembler::GetRelocatedValueLocation(Register ldr_location, |
| + Register result) { |
| + const uint32_t kLdrOffsetMask = (1 << 12) - 1; |
| + const int32_t kPCRegOffset = 2 * kPointerSize; |
| + ldr(result, MemOperand(ldr_location)); |
| + if (FLAG_debug_code) { |
| + // Check that the instruction is a ldr reg, [pc + offset] . |
| + and_(result, result, Operand(kLdrPCPattern)); |
| + cmp(result, Operand(kLdrPCPattern)); |
| + Check(eq, "The instruction to patch should be a load from pc."); |
| + // result was clobbered. Restore it. |
| + ldr(result, MemOperand(ldr_location)); |
| + } |
| + // Get the address of the constant. |
| + and_(result, result, Operand(kLdrOffsetMask)); |
| + add(result, ldr_location, Operand(result)); |
| + add(result, result, Operand(kPCRegOffset)); |
| +} |
| + |
| + |
| #ifdef ENABLE_DEBUGGER_SUPPORT |
| CodePatcher::CodePatcher(byte* address, int instructions) |
| : address_(address), |