Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index 61b59edf868c08b11cd80ef246550d679f2df753..31d2f7335264fc5b47b8e3385c95edaa229a1f09 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -691,17 +691,21 @@ |
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_embedded_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_ool_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_embedded_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_ool_constant_pool ? pp.bit() : 0) | |
+ fp.bit() | |
+ lr.bit()); |
} |
@@ -981,20 +985,13 @@ |
} |
-void MacroAssembler::LoadConstantPoolPointerRegisterFromCodeTargetAddress( |
- Register code_target_address) { |
- DCHECK(FLAG_enable_embedded_constant_pool); |
- ldr(pp, MemOperand(code_target_address, |
- Code::kConstantPoolOffset - Code::kHeaderSize)); |
- add(pp, pp, code_target_address); |
-} |
- |
- |
void MacroAssembler::LoadConstantPoolPointerRegister() { |
- DCHECK(FLAG_enable_embedded_constant_pool); |
- int entry_offset = pc_offset() + Instruction::kPCReadOffset; |
- sub(ip, pc, Operand(entry_offset)); |
- LoadConstantPoolPointerRegisterFromCodeTargetAddress(ip); |
+ 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)); |
+ } |
} |
@@ -1003,9 +1000,9 @@ |
Push(Smi::FromInt(StackFrame::STUB)); |
// Adjust FP to point to saved FP. |
add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); |
- if (FLAG_enable_embedded_constant_pool) { |
+ if (FLAG_enable_ool_constant_pool) { |
LoadConstantPoolPointerRegister(); |
- set_constant_pool_available(true); |
+ set_ool_constant_pool_available(true); |
} |
} |
@@ -1028,9 +1025,9 @@ |
add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); |
} |
} |
- if (FLAG_enable_embedded_constant_pool) { |
+ if (FLAG_enable_ool_constant_pool) { |
LoadConstantPoolPointerRegister(); |
- set_constant_pool_available(true); |
+ set_ool_constant_pool_available(true); |
} |
} |
@@ -1039,7 +1036,7 @@ |
bool load_constant_pool_pointer_reg) { |
// r0-r3: preserved |
PushFixedFrame(); |
- if (FLAG_enable_embedded_constant_pool && load_constant_pool_pointer_reg) { |
+ if (FLAG_enable_ool_constant_pool && load_constant_pool_pointer_reg) { |
LoadConstantPoolPointerRegister(); |
} |
mov(ip, Operand(Smi::FromInt(type))); |
@@ -1059,9 +1056,9 @@ |
// Drop the execution stack down to the frame pointer and restore |
// the caller frame pointer, return address and constant pool pointer |
- // (if FLAG_enable_embedded_constant_pool). |
+ // (if FLAG_enable_ool_constant_pool). |
int frame_ends; |
- if (FLAG_enable_embedded_constant_pool) { |
+ if (FLAG_enable_ool_constant_pool) { |
add(sp, fp, Operand(StandardFrameConstants::kConstantPoolOffset)); |
frame_ends = pc_offset(); |
ldm(ia_w, sp, pp.bit() | fp.bit() | lr.bit()); |
@@ -1087,7 +1084,7 @@ |
mov(ip, Operand::Zero()); |
str(ip, MemOperand(fp, ExitFrameConstants::kSPOffset)); |
} |
- if (FLAG_enable_embedded_constant_pool) { |
+ if (FLAG_enable_ool_constant_pool) { |
str(pp, MemOperand(fp, ExitFrameConstants::kConstantPoolOffset)); |
} |
mov(ip, Operand(CodeObject())); |
@@ -1106,7 +1103,7 @@ |
// fp - ExitFrameConstants::kFrameSize - |
// DwVfpRegister::kMaxNumRegisters * kDoubleSize, |
// since the sp slot, code slot and constant pool slot (if |
- // FLAG_enable_embedded_constant_pool) were pushed after the fp. |
+ // FLAG_enable_ool_constant_pool) were pushed after the fp. |
} |
// Reserve place for the return address and stack space and align the frame |
@@ -1186,7 +1183,7 @@ |
#endif |
// Tear down the exit frame, pop the arguments, and return. |
- if (FLAG_enable_embedded_constant_pool) { |
+ if (FLAG_enable_ool_constant_pool) { |
ldr(pp, MemOperand(fp, ExitFrameConstants::kConstantPoolOffset)); |
} |
mov(sp, Operand(fp)); |
@@ -3405,7 +3402,7 @@ |
Label small_constant_pool_load, load_result; |
ldr(result, MemOperand(ldr_location)); |
- if (FLAG_enable_embedded_constant_pool) { |
+ if (FLAG_enable_ool_constant_pool) { |
// Check if this is an extended constant pool load. |
and_(scratch, result, Operand(GetConsantPoolLoadMask())); |
teq(scratch, Operand(GetConsantPoolLoadPattern())); |
@@ -3459,7 +3456,7 @@ |
bind(&load_result); |
// Get the address of the constant. |
- if (FLAG_enable_embedded_constant_pool) { |
+ if (FLAG_enable_ool_constant_pool) { |
add(result, pp, Operand(result)); |
} else { |
add(result, ldr_location, Operand(result)); |