Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Unified Diff: src/arm/macro-assembler-arm.cc

Issue 2816703002: [arm] Remove embedded constant pool support. (Closed)
Patch Set: [arm] Remove embedded constant pool support. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/builtins/arm/builtins-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/macro-assembler-arm.cc
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc
index f451ba5d3f55c5f581207a7b5909136a02255d69..7a3aa0e021b91c879b19883803b7a03cba1a5d25 100644
--- a/src/arm/macro-assembler-arm.cc
+++ b/src/arm/macro-assembler-arm.cc
@@ -770,59 +770,36 @@ void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
void MacroAssembler::PushCommonFrame(Register marker_reg) {
if (marker_reg.is_valid()) {
- if (FLAG_enable_embedded_constant_pool) {
- if (marker_reg.code() > pp.code()) {
- stm(db_w, sp, pp.bit() | fp.bit() | lr.bit());
- add(fp, sp, Operand(kPointerSize));
- Push(marker_reg);
- } else {
- stm(db_w, sp, marker_reg.bit() | pp.bit() | fp.bit() | lr.bit());
- add(fp, sp, Operand(2 * kPointerSize));
- }
+ if (marker_reg.code() > fp.code()) {
+ stm(db_w, sp, fp.bit() | lr.bit());
+ mov(fp, Operand(sp));
+ Push(marker_reg);
} else {
- if (marker_reg.code() > fp.code()) {
- stm(db_w, sp, fp.bit() | lr.bit());
- mov(fp, Operand(sp));
- Push(marker_reg);
- } else {
- stm(db_w, sp, marker_reg.bit() | fp.bit() | lr.bit());
- add(fp, sp, Operand(kPointerSize));
- }
+ stm(db_w, sp, marker_reg.bit() | fp.bit() | lr.bit());
+ add(fp, sp, Operand(kPointerSize));
}
} else {
- stm(db_w, sp, (FLAG_enable_embedded_constant_pool ? pp.bit() : 0) |
- fp.bit() | lr.bit());
- add(fp, sp, Operand(FLAG_enable_embedded_constant_pool ? kPointerSize : 0));
+ stm(db_w, sp, fp.bit() | lr.bit());
+ mov(fp, sp);
}
}
void MacroAssembler::PopCommonFrame(Register marker_reg) {
if (marker_reg.is_valid()) {
- if (FLAG_enable_embedded_constant_pool) {
- if (marker_reg.code() > pp.code()) {
- pop(marker_reg);
- ldm(ia_w, sp, pp.bit() | fp.bit() | lr.bit());
- } else {
- ldm(ia_w, sp, marker_reg.bit() | pp.bit() | fp.bit() | lr.bit());
- }
+ if (marker_reg.code() > fp.code()) {
+ pop(marker_reg);
+ ldm(ia_w, sp, fp.bit() | lr.bit());
} else {
- if (marker_reg.code() > fp.code()) {
- pop(marker_reg);
- ldm(ia_w, sp, fp.bit() | lr.bit());
- } else {
- ldm(ia_w, sp, marker_reg.bit() | fp.bit() | lr.bit());
- }
+ ldm(ia_w, sp, marker_reg.bit() | fp.bit() | lr.bit());
}
} else {
- ldm(ia_w, sp, (FLAG_enable_embedded_constant_pool ? pp.bit() : 0) |
- fp.bit() | lr.bit());
+ ldm(ia_w, sp, fp.bit() | lr.bit());
}
}
void MacroAssembler::PushStandardFrame(Register function_reg) {
DCHECK(!function_reg.is_valid() || function_reg.code() < cp.code());
stm(db_w, sp, (function_reg.is_valid() ? function_reg.bit() : 0) | cp.bit() |
- (FLAG_enable_embedded_constant_pool ? pp.bit() : 0) |
fp.bit() | lr.bit());
int offset = -StandardFrameConstants::kContextOffset;
offset += function_reg.is_valid() ? kPointerSize : 0;
@@ -833,11 +810,7 @@ void MacroAssembler::PushStandardFrame(Register function_reg) {
// Push and pop all registers that can hold pointers.
void MacroAssembler::PushSafepointRegisters() {
// Safepoints expect a block of contiguous register values starting with r0.
- // except when FLAG_enable_embedded_constant_pool, which omits pp.
- DCHECK(kSafepointSavedRegisters ==
- (FLAG_enable_embedded_constant_pool
- ? ((1 << (kNumSafepointSavedRegisters + 1)) - 1) & ~pp.bit()
- : (1 << kNumSafepointSavedRegisters) - 1));
+ DCHECK(kSafepointSavedRegisters == (1 << kNumSafepointSavedRegisters) - 1);
// Safepoints expect a block of kNumSafepointRegisters values on the
// stack, so adjust the stack for unsaved registers.
const int num_unsaved = kNumSafepointRegisters - kNumSafepointSavedRegisters;
@@ -867,10 +840,6 @@ void MacroAssembler::LoadFromSafepointRegisterSlot(Register dst, Register src) {
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.
- if (FLAG_enable_embedded_constant_pool && reg_code > pp.code()) {
- // RegList omits pp.
- reg_code -= 1;
- }
DCHECK(reg_code >= 0 && reg_code < kNumSafepointRegisters);
return reg_code;
}
@@ -1399,29 +1368,9 @@ void MacroAssembler::AsrPair(Register dst_low, Register dst_high,
}
}
-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);
-}
-
void MacroAssembler::StubPrologue(StackFrame::Type type) {
mov(ip, Operand(StackFrame::TypeToMarker(type)));
PushCommonFrame(ip);
- if (FLAG_enable_embedded_constant_pool) {
- LoadConstantPoolPointerRegister();
- set_constant_pool_available(true);
- }
}
void MacroAssembler::Prologue(bool code_pre_aging) {
@@ -1440,10 +1389,6 @@ void MacroAssembler::Prologue(bool code_pre_aging) {
nop(ip.code());
}
}
- if (FLAG_enable_embedded_constant_pool) {
- LoadConstantPoolPointerRegister();
- set_constant_pool_available(true);
- }
}
void MacroAssembler::EmitLoadFeedbackVector(Register vector) {
@@ -1458,9 +1403,6 @@ void MacroAssembler::EnterFrame(StackFrame::Type type,
// r0-r3: preserved
mov(ip, Operand(StackFrame::TypeToMarker(type)));
PushCommonFrame(ip);
- if (FLAG_enable_embedded_constant_pool && load_constant_pool_pointer_reg) {
- LoadConstantPoolPointerRegister();
- }
if (type == StackFrame::INTERNAL) {
mov(ip, Operand(CodeObject()));
push(ip);
@@ -1474,18 +1416,10 @@ int MacroAssembler::LeaveFrame(StackFrame::Type type) {
// r2: preserved
// 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).
- int frame_ends;
- 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());
- } else {
- mov(sp, fp);
- frame_ends = pc_offset();
- ldm(ia_w, sp, fp.bit() | lr.bit());
- }
+ // the caller frame pointer and return address.
+ mov(sp, fp);
+ int frame_ends = pc_offset();
+ ldm(ia_w, sp, fp.bit() | lr.bit());
return frame_ends;
}
@@ -1519,9 +1453,6 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space,
mov(ip, Operand::Zero());
str(ip, MemOperand(fp, ExitFrameConstants::kSPOffset));
}
- if (FLAG_enable_embedded_constant_pool) {
- str(pp, MemOperand(fp, ExitFrameConstants::kConstantPoolOffset));
- }
mov(ip, Operand(CodeObject()));
str(ip, MemOperand(fp, ExitFrameConstants::kCodeOffset));
@@ -1537,8 +1468,7 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space,
// Note that d0 will be accessible at
// 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.
+ // since the sp slot and code slot were pushed after the fp.
}
// Reserve place for the return address and stack space and align the frame
@@ -1603,9 +1533,6 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles, Register argument_count,
#endif
// Tear down the exit frame, pop the arguments, and return.
- if (FLAG_enable_embedded_constant_pool) {
- ldr(pp, MemOperand(fp, ExitFrameConstants::kConstantPoolOffset));
- }
mov(sp, Operand(fp));
ldm(ia_w, sp, fp.bit() | lr.bit());
if (argument_count.is_valid()) {
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/builtins/arm/builtins-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698