Chromium Code Reviews| Index: src/arm/macro-assembler-arm.cc |
| diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
| index 12108a00404f5764727e272e69daa3d3adf10de3..0d8a2fc95fa780fde180aedc86c4e77b0fca35a6 100644 |
| --- a/src/arm/macro-assembler-arm.cc |
| +++ b/src/arm/macro-assembler-arm.cc |
| @@ -691,21 +691,17 @@ void MacroAssembler::RememberedSetHelper(Register object, // For debug tests. |
| void MacroAssembler::PushFixedFrame(Register marker_reg) { |
| DCHECK(!marker_reg.is_valid() || marker_reg.code() < cp.code()); |
| - stm(db_w, sp, (marker_reg.is_valid() ? marker_reg.bit() : 0) | |
| - cp.bit() | |
| - (FLAG_enable_ool_constant_pool ? pp.bit() : 0) | |
| - fp.bit() | |
| - lr.bit()); |
| + stm(db_w, sp, (marker_reg.is_valid() ? marker_reg.bit() : 0) | cp.bit() | |
| + (FLAG_enable_embedded_constant_pool ? pp.bit() : 0) | |
| + fp.bit() | lr.bit()); |
| } |
| void MacroAssembler::PopFixedFrame(Register marker_reg) { |
| DCHECK(!marker_reg.is_valid() || marker_reg.code() < cp.code()); |
| - ldm(ia_w, sp, (marker_reg.is_valid() ? marker_reg.bit() : 0) | |
| - cp.bit() | |
| - (FLAG_enable_ool_constant_pool ? pp.bit() : 0) | |
| - fp.bit() | |
| - lr.bit()); |
| + ldm(ia_w, sp, (marker_reg.is_valid() ? marker_reg.bit() : 0) | cp.bit() | |
| + (FLAG_enable_embedded_constant_pool ? pp.bit() : 0) | |
| + fp.bit() | lr.bit()); |
| } |
| @@ -985,13 +981,18 @@ void MacroAssembler::VmovLow(DwVfpRegister dst, Register src) { |
| } |
| +void MacroAssembler::LoadTargetConstantPoolPointerRegister(Register target) { |
|
rmcilroy
2015/05/20 14:32:10
/s/LoadTargetConstantPoolPointerRegister/LoadConst
MTBrandyberry
2015/05/20 22:28:22
Done.
|
| + DCHECK(FLAG_enable_embedded_constant_pool); |
| + ldr(pp, MemOperand(target, Code::kConstantPoolOffset - Code::kHeaderSize)); |
| + add(pp, pp, target); |
| +} |
| + |
| + |
| void MacroAssembler::LoadConstantPoolPointerRegister() { |
| - if (FLAG_enable_ool_constant_pool) { |
| - int constant_pool_offset = Code::kConstantPoolOffset - Code::kHeaderSize - |
| - pc_offset() - Instruction::kPCReadOffset; |
| - DCHECK(ImmediateFitsAddrMode2Instruction(constant_pool_offset)); |
| - ldr(pp, MemOperand(pc, constant_pool_offset)); |
| - } |
| + DCHECK(FLAG_enable_embedded_constant_pool); |
| + int entry_offset = pc_offset() + Instruction::kPCReadOffset; |
| + sub(ip, pc, Operand(entry_offset)); |
| + LoadTargetConstantPoolPointerRegister(ip); |
| } |
| @@ -1000,9 +1001,9 @@ void MacroAssembler::StubPrologue() { |
| Push(Smi::FromInt(StackFrame::STUB)); |
| // Adjust FP to point to saved FP. |
| add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); |
| - if (FLAG_enable_ool_constant_pool) { |
| + if (FLAG_enable_embedded_constant_pool) { |
| LoadConstantPoolPointerRegister(); |
| - set_ool_constant_pool_available(true); |
| + set_constant_pool_available(true); |
| } |
| } |
| @@ -1025,9 +1026,9 @@ void MacroAssembler::Prologue(bool code_pre_aging) { |
| add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); |
| } |
| } |
| - if (FLAG_enable_ool_constant_pool) { |
| + if (FLAG_enable_embedded_constant_pool) { |
| LoadConstantPoolPointerRegister(); |
| - set_ool_constant_pool_available(true); |
| + set_constant_pool_available(true); |
| } |
| } |
| @@ -1036,7 +1037,7 @@ void MacroAssembler::EnterFrame(StackFrame::Type type, |
| bool load_constant_pool_pointer_reg) { |
| // r0-r3: preserved |
| PushFixedFrame(); |
| - if (FLAG_enable_ool_constant_pool && load_constant_pool_pointer_reg) { |
| + if (FLAG_enable_embedded_constant_pool && load_constant_pool_pointer_reg) { |
| LoadConstantPoolPointerRegister(); |
| } |
| mov(ip, Operand(Smi::FromInt(type))); |
| @@ -1056,9 +1057,9 @@ int MacroAssembler::LeaveFrame(StackFrame::Type type) { |
| // Drop the execution stack down to the frame pointer and restore |
| // the caller frame pointer, return address and constant pool pointer |
| - // (if FLAG_enable_ool_constant_pool). |
| + // (if FLAG_enable_embedded_constant_pool). |
| int frame_ends; |
| - if (FLAG_enable_ool_constant_pool) { |
| + if (FLAG_enable_embedded_constant_pool) { |
| add(sp, fp, Operand(StandardFrameConstants::kConstantPoolOffset)); |
| frame_ends = pc_offset(); |
| ldm(ia_w, sp, pp.bit() | fp.bit() | lr.bit()); |
| @@ -1084,7 +1085,7 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space) { |
| mov(ip, Operand::Zero()); |
| str(ip, MemOperand(fp, ExitFrameConstants::kSPOffset)); |
| } |
| - if (FLAG_enable_ool_constant_pool) { |
| + if (FLAG_enable_embedded_constant_pool) { |
| str(pp, MemOperand(fp, ExitFrameConstants::kConstantPoolOffset)); |
| } |
| mov(ip, Operand(CodeObject())); |
| @@ -1103,7 +1104,7 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space) { |
| // fp - ExitFrameConstants::kFrameSize - |
| // DwVfpRegister::kMaxNumRegisters * kDoubleSize, |
| // since the sp slot, code slot and constant pool slot (if |
| - // FLAG_enable_ool_constant_pool) were pushed after the fp. |
| + // FLAG_enable_embedded_constant_pool) were pushed after the fp. |
| } |
| // Reserve place for the return address and stack space and align the frame |
| @@ -1183,7 +1184,7 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles, Register argument_count, |
| #endif |
| // Tear down the exit frame, pop the arguments, and return. |
| - if (FLAG_enable_ool_constant_pool) { |
| + if (FLAG_enable_embedded_constant_pool) { |
| ldr(pp, MemOperand(fp, ExitFrameConstants::kConstantPoolOffset)); |
| } |
| mov(sp, Operand(fp)); |
| @@ -3401,7 +3402,7 @@ void MacroAssembler::GetRelocatedValueLocation(Register ldr_location, |
| Label small_constant_pool_load, load_result; |
| ldr(result, MemOperand(ldr_location)); |
| - if (FLAG_enable_ool_constant_pool) { |
| + if (FLAG_enable_embedded_constant_pool) { |
| // Check if this is an extended constant pool load. |
| and_(scratch, result, Operand(GetConsantPoolLoadMask())); |
| teq(scratch, Operand(GetConsantPoolLoadPattern())); |
| @@ -3455,7 +3456,7 @@ void MacroAssembler::GetRelocatedValueLocation(Register ldr_location, |
| bind(&load_result); |
| // Get the address of the constant. |
| - if (FLAG_enable_ool_constant_pool) { |
| + if (FLAG_enable_embedded_constant_pool) { |
| add(result, pp, Operand(result)); |
| } else { |
| add(result, ldr_location, Operand(result)); |