[macro-assembler] Remove RememberedSetFinalAction since kFallThroughAtEnd is unused
Bug: Change-Id: I8589ea37ab776d867794125d35e1e51b16d6e9a3 Reviewed-on: https://chromium-review.googlesource.com/707068 Commit-Queue: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Hannes Payer <hpayer@chromium.org> Cr-Commit-Position: refs/heads/master@{#48386}
This commit is contained in:
parent
203776545a
commit
3baf964aeb
@ -962,8 +962,7 @@ void RecordWriteStub::Generate(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
if (remembered_set_action() == EMIT_REMEMBERED_SET) {
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
}
|
||||
__ Ret();
|
||||
|
||||
@ -1002,8 +1001,7 @@ void RecordWriteStub::GenerateIncremental(MacroAssembler* masm, Mode mode) {
|
||||
masm, kUpdateRememberedSetOnNoNeedToInformIncrementalMarker, mode);
|
||||
InformIncrementalMarker(masm);
|
||||
regs_.Restore(masm);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
|
||||
__ bind(&dont_need_remembered_set);
|
||||
}
|
||||
@ -1054,8 +1052,7 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
|
||||
|
||||
regs_.Restore(masm);
|
||||
if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) {
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
} else {
|
||||
__ Ret();
|
||||
}
|
||||
@ -1096,8 +1093,7 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
|
||||
|
||||
regs_.Restore(masm);
|
||||
if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) {
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
} else {
|
||||
__ Ret();
|
||||
}
|
||||
|
@ -694,10 +694,8 @@ void MacroAssembler::RecordWrite(
|
||||
}
|
||||
|
||||
void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
|
||||
Register address,
|
||||
Register scratch,
|
||||
SaveFPRegsMode fp_mode,
|
||||
RememberedSetFinalAction and_then) {
|
||||
Register address, Register scratch,
|
||||
SaveFPRegsMode fp_mode) {
|
||||
Label done;
|
||||
if (emit_debug_code()) {
|
||||
Label ok;
|
||||
@ -719,20 +717,13 @@ void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
|
||||
// Call stub on end of buffer.
|
||||
// Check for end of buffer.
|
||||
tst(scratch, Operand(StoreBuffer::kStoreBufferMask));
|
||||
if (and_then == kFallThroughAtEnd) {
|
||||
b(ne, &done);
|
||||
} else {
|
||||
DCHECK(and_then == kReturnAtEnd);
|
||||
Ret(ne);
|
||||
}
|
||||
Ret(ne);
|
||||
push(lr);
|
||||
StoreBufferOverflowStub store_buffer_overflow(isolate(), fp_mode);
|
||||
CallStub(&store_buffer_overflow);
|
||||
pop(lr);
|
||||
bind(&done);
|
||||
if (and_then == kReturnAtEnd) {
|
||||
Ret();
|
||||
}
|
||||
Ret();
|
||||
}
|
||||
|
||||
void TurboAssembler::PushCommonFrame(Register marker_reg) {
|
||||
|
@ -619,15 +619,12 @@ class MacroAssembler : public TurboAssembler {
|
||||
// ---------------------------------------------------------------------------
|
||||
// GC Support
|
||||
|
||||
enum RememberedSetFinalAction { kReturnAtEnd, kFallThroughAtEnd };
|
||||
|
||||
// Record in the remembered set the fact that we have a pointer to new space
|
||||
// at the address pointed to by the addr register. Only works if addr is not
|
||||
// in new space.
|
||||
void RememberedSetHelper(Register object, // Used for debug code.
|
||||
Register addr, Register scratch,
|
||||
SaveFPRegsMode save_fp,
|
||||
RememberedSetFinalAction and_then);
|
||||
SaveFPRegsMode save_fp);
|
||||
|
||||
// Check if object is in new space. Jumps if the object is not in new space.
|
||||
// The register scratch can be object itself, but scratch will be clobbered.
|
||||
|
@ -965,7 +965,7 @@ void RecordWriteStub::GenerateIncremental(MacroAssembler* masm, Mode mode) {
|
||||
|
||||
__ RememberedSetHelper(object(), address(),
|
||||
value(), // scratch1
|
||||
save_fp_regs_mode(), MacroAssembler::kReturnAtEnd);
|
||||
save_fp_regs_mode());
|
||||
|
||||
__ Bind(&dont_need_remembered_set);
|
||||
}
|
||||
@ -1018,7 +1018,7 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
|
||||
if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) {
|
||||
__ RememberedSetHelper(object(), address(),
|
||||
value(), // scratch1
|
||||
save_fp_regs_mode(), MacroAssembler::kReturnAtEnd);
|
||||
save_fp_regs_mode());
|
||||
} else {
|
||||
__ Ret();
|
||||
}
|
||||
@ -1060,7 +1060,7 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
|
||||
if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) {
|
||||
__ RememberedSetHelper(object(), address(),
|
||||
value(), // scratch1
|
||||
save_fp_regs_mode(), MacroAssembler::kReturnAtEnd);
|
||||
save_fp_regs_mode());
|
||||
} else {
|
||||
__ Ret();
|
||||
}
|
||||
@ -1091,7 +1091,7 @@ void RecordWriteStub::Generate(MacroAssembler* masm) {
|
||||
if (remembered_set_action() == EMIT_REMEMBERED_SET) {
|
||||
__ RememberedSetHelper(object(), address(),
|
||||
value(), // scratch1
|
||||
save_fp_regs_mode(), MacroAssembler::kReturnAtEnd);
|
||||
save_fp_regs_mode());
|
||||
}
|
||||
__ Ret();
|
||||
|
||||
|
@ -2822,10 +2822,8 @@ bool TurboAssembler::AllowThisStubCall(CodeStub* stub) {
|
||||
}
|
||||
|
||||
void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
|
||||
Register address,
|
||||
Register scratch1,
|
||||
SaveFPRegsMode fp_mode,
|
||||
RememberedSetFinalAction and_then) {
|
||||
Register address, Register scratch1,
|
||||
SaveFPRegsMode fp_mode) {
|
||||
DCHECK(!AreAliased(object, address, scratch1));
|
||||
Label done, store_buffer_overflow;
|
||||
if (emit_debug_code()) {
|
||||
@ -2847,13 +2845,8 @@ void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
|
||||
// Call stub on end of buffer.
|
||||
// Check for end of buffer.
|
||||
Tst(scratch1, StoreBuffer::kStoreBufferMask);
|
||||
if (and_then == kFallThroughAtEnd) {
|
||||
B(ne, &done);
|
||||
} else {
|
||||
DCHECK(and_then == kReturnAtEnd);
|
||||
B(eq, &store_buffer_overflow);
|
||||
Ret();
|
||||
}
|
||||
B(eq, &store_buffer_overflow);
|
||||
Ret();
|
||||
|
||||
Bind(&store_buffer_overflow);
|
||||
Push(lr);
|
||||
@ -2862,9 +2855,7 @@ void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
|
||||
Pop(lr);
|
||||
|
||||
Bind(&done);
|
||||
if (and_then == kReturnAtEnd) {
|
||||
Ret();
|
||||
}
|
||||
Ret();
|
||||
}
|
||||
|
||||
|
||||
|
@ -2065,19 +2065,12 @@ class MacroAssembler : public TurboAssembler {
|
||||
// ---------------------------------------------------------------------------
|
||||
// Garbage collector support (GC).
|
||||
|
||||
enum RememberedSetFinalAction {
|
||||
kReturnAtEnd,
|
||||
kFallThroughAtEnd
|
||||
};
|
||||
|
||||
// Record in the remembered set the fact that we have a pointer to new space
|
||||
// at the address pointed to by the addr register. Only works if addr is not
|
||||
// in new space.
|
||||
void RememberedSetHelper(Register object, // Used for debug code.
|
||||
Register addr,
|
||||
Register scratch1,
|
||||
SaveFPRegsMode save_fp,
|
||||
RememberedSetFinalAction and_then);
|
||||
Register addr, Register scratch1,
|
||||
SaveFPRegsMode save_fp);
|
||||
|
||||
// Push and pop the registers that can hold pointers, as defined by the
|
||||
// RegList constant kSafepointSavedRegisters.
|
||||
|
@ -1031,8 +1031,7 @@ void RecordWriteStub::Generate(MacroAssembler* masm) {
|
||||
__ jmp(&skip_to_incremental_compacting, Label::kFar);
|
||||
|
||||
if (remembered_set_action() == EMIT_REMEMBERED_SET) {
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
} else {
|
||||
__ ret(0);
|
||||
}
|
||||
@ -1072,8 +1071,7 @@ void RecordWriteStub::GenerateIncremental(MacroAssembler* masm, Mode mode) {
|
||||
mode);
|
||||
InformIncrementalMarker(masm);
|
||||
regs_.Restore(masm);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
|
||||
__ bind(&dont_need_remembered_set);
|
||||
}
|
||||
@ -1127,8 +1125,7 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
|
||||
|
||||
regs_.Restore(masm);
|
||||
if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) {
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
} else {
|
||||
__ ret(0);
|
||||
}
|
||||
@ -1172,8 +1169,7 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
|
||||
|
||||
regs_.Restore(masm);
|
||||
if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) {
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
} else {
|
||||
__ ret(0);
|
||||
}
|
||||
|
@ -185,13 +185,9 @@ void MacroAssembler::InNewSpace(Register object, Register scratch, Condition cc,
|
||||
condition_met, distance);
|
||||
}
|
||||
|
||||
|
||||
void MacroAssembler::RememberedSetHelper(
|
||||
Register object, // Only used for debug checks.
|
||||
Register addr,
|
||||
Register scratch,
|
||||
SaveFPRegsMode save_fp,
|
||||
MacroAssembler::RememberedSetFinalAction and_then) {
|
||||
Register addr, Register scratch, SaveFPRegsMode save_fp) {
|
||||
Label done;
|
||||
if (emit_debug_code()) {
|
||||
Label ok;
|
||||
@ -212,23 +208,13 @@ void MacroAssembler::RememberedSetHelper(
|
||||
// Call stub on end of buffer.
|
||||
// Check for end of buffer.
|
||||
test(scratch, Immediate(StoreBuffer::kStoreBufferMask));
|
||||
if (and_then == kReturnAtEnd) {
|
||||
Label buffer_overflowed;
|
||||
j(equal, &buffer_overflowed, Label::kNear);
|
||||
ret(0);
|
||||
bind(&buffer_overflowed);
|
||||
} else {
|
||||
DCHECK(and_then == kFallThroughAtEnd);
|
||||
j(not_equal, &done, Label::kNear);
|
||||
}
|
||||
Label buffer_overflowed;
|
||||
j(equal, &buffer_overflowed, Label::kNear);
|
||||
ret(0);
|
||||
bind(&buffer_overflowed);
|
||||
StoreBufferOverflowStub store_buffer_overflow(isolate(), save_fp);
|
||||
CallStub(&store_buffer_overflow);
|
||||
if (and_then == kReturnAtEnd) {
|
||||
ret(0);
|
||||
} else {
|
||||
DCHECK(and_then == kFallThroughAtEnd);
|
||||
bind(&done);
|
||||
}
|
||||
ret(0);
|
||||
}
|
||||
|
||||
void TurboAssembler::SlowTruncateToIDelayed(Zone* zone, Register result_reg,
|
||||
|
@ -382,15 +382,12 @@ class MacroAssembler : public TurboAssembler {
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// GC Support
|
||||
enum RememberedSetFinalAction { kReturnAtEnd, kFallThroughAtEnd };
|
||||
|
||||
// Record in the remembered set the fact that we have a pointer to new space
|
||||
// at the address pointed to by the addr register. Only works if addr is not
|
||||
// in new space.
|
||||
void RememberedSetHelper(Register object, // Used for debug code.
|
||||
Register addr, Register scratch,
|
||||
SaveFPRegsMode save_fp,
|
||||
RememberedSetFinalAction and_then);
|
||||
SaveFPRegsMode save_fp);
|
||||
|
||||
// Check if object is in new space. Jumps if the object is not in new space.
|
||||
// The register scratch can be object itself, but scratch will be clobbered.
|
||||
|
@ -1085,11 +1085,7 @@ void RecordWriteStub::Generate(MacroAssembler* masm) {
|
||||
__ nop();
|
||||
|
||||
if (remembered_set_action() == EMIT_REMEMBERED_SET) {
|
||||
__ RememberedSetHelper(object(),
|
||||
address(),
|
||||
value(),
|
||||
save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
}
|
||||
__ Ret();
|
||||
|
||||
@ -1127,11 +1123,7 @@ void RecordWriteStub::GenerateIncremental(MacroAssembler* masm, Mode mode) {
|
||||
masm, kUpdateRememberedSetOnNoNeedToInformIncrementalMarker, mode);
|
||||
InformIncrementalMarker(masm);
|
||||
regs_.Restore(masm);
|
||||
__ RememberedSetHelper(object(),
|
||||
address(),
|
||||
value(),
|
||||
save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
|
||||
__ bind(&dont_need_remembered_set);
|
||||
}
|
||||
@ -1182,11 +1174,7 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
|
||||
|
||||
regs_.Restore(masm);
|
||||
if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) {
|
||||
__ RememberedSetHelper(object(),
|
||||
address(),
|
||||
value(),
|
||||
save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
} else {
|
||||
__ Ret();
|
||||
}
|
||||
@ -1227,11 +1215,7 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
|
||||
|
||||
regs_.Restore(masm);
|
||||
if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) {
|
||||
__ RememberedSetHelper(object(),
|
||||
address(),
|
||||
value(),
|
||||
save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
} else {
|
||||
__ Ret();
|
||||
}
|
||||
|
@ -385,10 +385,8 @@ void MacroAssembler::RecordWrite(
|
||||
}
|
||||
|
||||
void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
|
||||
Register address,
|
||||
Register scratch,
|
||||
SaveFPRegsMode fp_mode,
|
||||
RememberedSetFinalAction and_then) {
|
||||
Register address, Register scratch,
|
||||
SaveFPRegsMode fp_mode) {
|
||||
Label done;
|
||||
if (emit_debug_code()) {
|
||||
Label ok;
|
||||
@ -409,20 +407,13 @@ void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
|
||||
// Call stub on end of buffer.
|
||||
// Check for end of buffer.
|
||||
And(t8, scratch, Operand(StoreBuffer::kStoreBufferMask));
|
||||
if (and_then == kFallThroughAtEnd) {
|
||||
Branch(&done, ne, t8, Operand(zero_reg));
|
||||
} else {
|
||||
DCHECK(and_then == kReturnAtEnd);
|
||||
Ret(ne, t8, Operand(zero_reg));
|
||||
}
|
||||
Ret(ne, t8, Operand(zero_reg));
|
||||
push(ra);
|
||||
StoreBufferOverflowStub store_buffer_overflow(isolate(), fp_mode);
|
||||
CallStub(&store_buffer_overflow);
|
||||
pop(ra);
|
||||
bind(&done);
|
||||
if (and_then == kReturnAtEnd) {
|
||||
Ret();
|
||||
}
|
||||
Ret();
|
||||
}
|
||||
|
||||
|
||||
|
@ -961,15 +961,12 @@ class MacroAssembler : public TurboAssembler {
|
||||
void IncrementalMarkingRecordWriteHelper(Register object, Register value,
|
||||
Register address);
|
||||
|
||||
enum RememberedSetFinalAction { kReturnAtEnd, kFallThroughAtEnd };
|
||||
|
||||
// Record in the remembered set the fact that we have a pointer to new space
|
||||
// at the address pointed to by the addr register. Only works if addr is not
|
||||
// in new space.
|
||||
void RememberedSetHelper(Register object, // Used for debug code.
|
||||
Register addr, Register scratch,
|
||||
SaveFPRegsMode save_fp,
|
||||
RememberedSetFinalAction and_then);
|
||||
SaveFPRegsMode save_fp);
|
||||
|
||||
// Check if object is in new space. Jumps if the object is not in new space.
|
||||
// The register scratch can be object itself, but it will be clobbered.
|
||||
|
@ -1082,11 +1082,7 @@ void RecordWriteStub::Generate(MacroAssembler* masm) {
|
||||
__ nop();
|
||||
|
||||
if (remembered_set_action() == EMIT_REMEMBERED_SET) {
|
||||
__ RememberedSetHelper(object(),
|
||||
address(),
|
||||
value(),
|
||||
save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
}
|
||||
__ Ret();
|
||||
|
||||
@ -1124,11 +1120,7 @@ void RecordWriteStub::GenerateIncremental(MacroAssembler* masm, Mode mode) {
|
||||
masm, kUpdateRememberedSetOnNoNeedToInformIncrementalMarker, mode);
|
||||
InformIncrementalMarker(masm);
|
||||
regs_.Restore(masm);
|
||||
__ RememberedSetHelper(object(),
|
||||
address(),
|
||||
value(),
|
||||
save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
|
||||
__ bind(&dont_need_remembered_set);
|
||||
}
|
||||
@ -1179,11 +1171,7 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
|
||||
|
||||
regs_.Restore(masm);
|
||||
if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) {
|
||||
__ RememberedSetHelper(object(),
|
||||
address(),
|
||||
value(),
|
||||
save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
} else {
|
||||
__ Ret();
|
||||
}
|
||||
@ -1224,11 +1212,7 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
|
||||
|
||||
regs_.Restore(masm);
|
||||
if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) {
|
||||
__ RememberedSetHelper(object(),
|
||||
address(),
|
||||
value(),
|
||||
save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
} else {
|
||||
__ Ret();
|
||||
}
|
||||
|
@ -385,10 +385,8 @@ void MacroAssembler::RecordWrite(
|
||||
}
|
||||
|
||||
void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
|
||||
Register address,
|
||||
Register scratch,
|
||||
SaveFPRegsMode fp_mode,
|
||||
RememberedSetFinalAction and_then) {
|
||||
Register address, Register scratch,
|
||||
SaveFPRegsMode fp_mode) {
|
||||
Label done;
|
||||
if (emit_debug_code()) {
|
||||
Label ok;
|
||||
@ -410,20 +408,13 @@ void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
|
||||
// Check for end of buffer.
|
||||
And(t8, scratch, Operand(StoreBuffer::kStoreBufferMask));
|
||||
DCHECK(scratch != t8);
|
||||
if (and_then == kFallThroughAtEnd) {
|
||||
Branch(&done, ne, t8, Operand(zero_reg));
|
||||
} else {
|
||||
DCHECK(and_then == kReturnAtEnd);
|
||||
Ret(ne, t8, Operand(zero_reg));
|
||||
}
|
||||
Ret(ne, t8, Operand(zero_reg));
|
||||
push(ra);
|
||||
StoreBufferOverflowStub store_buffer_overflow(isolate(), fp_mode);
|
||||
CallStub(&store_buffer_overflow);
|
||||
pop(ra);
|
||||
bind(&done);
|
||||
if (and_then == kReturnAtEnd) {
|
||||
Ret();
|
||||
}
|
||||
Ret();
|
||||
}
|
||||
|
||||
|
||||
|
@ -993,20 +993,12 @@ class MacroAssembler : public TurboAssembler {
|
||||
Register value,
|
||||
Register address);
|
||||
|
||||
enum RememberedSetFinalAction {
|
||||
kReturnAtEnd,
|
||||
kFallThroughAtEnd
|
||||
};
|
||||
|
||||
|
||||
// Record in the remembered set the fact that we have a pointer to new space
|
||||
// at the address pointed to by the addr register. Only works if addr is not
|
||||
// in new space.
|
||||
void RememberedSetHelper(Register object, // Used for debug code.
|
||||
Register addr,
|
||||
Register scratch,
|
||||
SaveFPRegsMode save_fp,
|
||||
RememberedSetFinalAction and_then);
|
||||
Register addr, Register scratch,
|
||||
SaveFPRegsMode save_fp);
|
||||
|
||||
// Check if object is in new space. Jumps if the object is not in new space.
|
||||
// The register scratch can be object itself, but it will be clobbered.
|
||||
|
@ -1070,8 +1070,7 @@ void RecordWriteStub::Generate(MacroAssembler* masm) {
|
||||
__ blt(&skip_to_incremental_compacting, cr2);
|
||||
|
||||
if (remembered_set_action() == EMIT_REMEMBERED_SET) {
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
}
|
||||
__ Ret();
|
||||
|
||||
@ -1106,8 +1105,7 @@ void RecordWriteStub::GenerateIncremental(MacroAssembler* masm, Mode mode) {
|
||||
masm, kUpdateRememberedSetOnNoNeedToInformIncrementalMarker, mode);
|
||||
InformIncrementalMarker(masm);
|
||||
regs_.Restore(masm);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
|
||||
__ bind(&dont_need_remembered_set);
|
||||
}
|
||||
@ -1157,8 +1155,7 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
|
||||
|
||||
regs_.Restore(masm);
|
||||
if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) {
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
} else {
|
||||
__ Ret();
|
||||
}
|
||||
@ -1197,8 +1194,7 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
|
||||
|
||||
regs_.Restore(masm);
|
||||
if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) {
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
} else {
|
||||
__ Ret();
|
||||
}
|
||||
|
@ -510,8 +510,7 @@ void MacroAssembler::RecordWrite(
|
||||
|
||||
void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
|
||||
Register address, Register scratch,
|
||||
SaveFPRegsMode fp_mode,
|
||||
RememberedSetFinalAction and_then) {
|
||||
SaveFPRegsMode fp_mode) {
|
||||
Label done;
|
||||
if (emit_debug_code()) {
|
||||
Label ok;
|
||||
@ -533,12 +532,7 @@ void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
|
||||
// Check for end of buffer.
|
||||
TestBitMask(scratch, StoreBuffer::kStoreBufferMask, r0);
|
||||
|
||||
if (and_then == kFallThroughAtEnd) {
|
||||
bne(&done, cr0);
|
||||
} else {
|
||||
DCHECK(and_then == kReturnAtEnd);
|
||||
Ret(ne, cr0);
|
||||
}
|
||||
Ret(ne, cr0);
|
||||
mflr(r0);
|
||||
push(r0);
|
||||
StoreBufferOverflowStub store_buffer_overflow(isolate(), fp_mode);
|
||||
@ -546,9 +540,7 @@ void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
|
||||
pop(r0);
|
||||
mtlr(r0);
|
||||
bind(&done);
|
||||
if (and_then == kReturnAtEnd) {
|
||||
Ret();
|
||||
}
|
||||
Ret();
|
||||
}
|
||||
|
||||
void TurboAssembler::PushCommonFrame(Register marker_reg) {
|
||||
|
@ -671,15 +671,12 @@ class MacroAssembler : public TurboAssembler {
|
||||
void IncrementalMarkingRecordWriteHelper(Register object, Register value,
|
||||
Register address);
|
||||
|
||||
enum RememberedSetFinalAction { kReturnAtEnd, kFallThroughAtEnd };
|
||||
|
||||
// Record in the remembered set the fact that we have a pointer to new space
|
||||
// at the address pointed to by the addr register. Only works if addr is not
|
||||
// in new space.
|
||||
void RememberedSetHelper(Register object, // Used for debug code.
|
||||
Register addr, Register scratch,
|
||||
SaveFPRegsMode save_fp,
|
||||
RememberedSetFinalAction and_then);
|
||||
SaveFPRegsMode save_fp);
|
||||
|
||||
void JumpToJSEntry(Register target);
|
||||
// Check if object is in new space. Jumps if the object is not in new space.
|
||||
|
@ -1063,8 +1063,7 @@ void RecordWriteStub::Generate(MacroAssembler* masm) {
|
||||
__ b(CC_NOP, &skip_to_incremental_compacting);
|
||||
|
||||
if (remembered_set_action() == EMIT_REMEMBERED_SET) {
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
}
|
||||
__ Ret();
|
||||
|
||||
@ -1098,8 +1097,7 @@ void RecordWriteStub::GenerateIncremental(MacroAssembler* masm, Mode mode) {
|
||||
masm, kUpdateRememberedSetOnNoNeedToInformIncrementalMarker, mode);
|
||||
InformIncrementalMarker(masm);
|
||||
regs_.Restore(masm);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
|
||||
__ bind(&dont_need_remembered_set);
|
||||
}
|
||||
@ -1148,8 +1146,7 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
|
||||
|
||||
regs_.Restore(masm);
|
||||
if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) {
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
} else {
|
||||
__ Ret();
|
||||
}
|
||||
@ -1188,8 +1185,7 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
|
||||
|
||||
regs_.Restore(masm);
|
||||
if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) {
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
} else {
|
||||
__ Ret();
|
||||
}
|
||||
|
@ -504,8 +504,7 @@ void MacroAssembler::RecordWrite(
|
||||
|
||||
void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
|
||||
Register address, Register scratch,
|
||||
SaveFPRegsMode fp_mode,
|
||||
RememberedSetFinalAction and_then) {
|
||||
SaveFPRegsMode fp_mode) {
|
||||
Label done;
|
||||
if (emit_debug_code()) {
|
||||
Label ok;
|
||||
@ -527,20 +526,13 @@ void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
|
||||
// Check for end of buffer.
|
||||
AndP(scratch, Operand(StoreBuffer::kStoreBufferMask));
|
||||
|
||||
if (and_then == kFallThroughAtEnd) {
|
||||
bne(&done, Label::kNear);
|
||||
} else {
|
||||
DCHECK(and_then == kReturnAtEnd);
|
||||
bne(&done, Label::kNear);
|
||||
}
|
||||
bne(&done, Label::kNear);
|
||||
push(r14);
|
||||
StoreBufferOverflowStub store_buffer_overflow(isolate(), fp_mode);
|
||||
CallStub(&store_buffer_overflow);
|
||||
pop(r14);
|
||||
bind(&done);
|
||||
if (and_then == kReturnAtEnd) {
|
||||
Ret();
|
||||
}
|
||||
Ret();
|
||||
}
|
||||
|
||||
void TurboAssembler::PushCommonFrame(Register marker_reg) {
|
||||
|
@ -1306,15 +1306,12 @@ class MacroAssembler : public TurboAssembler {
|
||||
void IncrementalMarkingRecordWriteHelper(Register object, Register value,
|
||||
Register address);
|
||||
|
||||
enum RememberedSetFinalAction { kReturnAtEnd, kFallThroughAtEnd };
|
||||
|
||||
// Record in the remembered set the fact that we have a pointer to new space
|
||||
// at the address pointed to by the addr register. Only works if addr is not
|
||||
// in new space.
|
||||
void RememberedSetHelper(Register object, // Used for debug code.
|
||||
Register addr, Register scratch,
|
||||
SaveFPRegsMode save_fp,
|
||||
RememberedSetFinalAction and_then);
|
||||
SaveFPRegsMode save_fp);
|
||||
|
||||
void CallJSEntry(Register target);
|
||||
static int CallSizeNotPredictableCodeSize(Address target,
|
||||
|
@ -1022,8 +1022,7 @@ void RecordWriteStub::Generate(MacroAssembler* masm) {
|
||||
__ jmp(&skip_to_incremental, Label::kNear);
|
||||
|
||||
if (remembered_set_action() == EMIT_REMEMBERED_SET) {
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
} else {
|
||||
__ ret(0);
|
||||
}
|
||||
@ -1060,8 +1059,7 @@ void RecordWriteStub::GenerateIncremental(MacroAssembler* masm,
|
||||
second_instr);
|
||||
InformIncrementalMarker(masm);
|
||||
regs_.Restore(masm);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
|
||||
__ bind(&dont_need_remembered_set);
|
||||
}
|
||||
@ -1118,8 +1116,7 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
|
||||
|
||||
regs_.Restore(masm);
|
||||
if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) {
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
} else {
|
||||
__ ret(0);
|
||||
}
|
||||
@ -1158,8 +1155,7 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
|
||||
|
||||
regs_.Restore(masm);
|
||||
if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) {
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(),
|
||||
MacroAssembler::kReturnAtEnd);
|
||||
__ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode());
|
||||
} else {
|
||||
__ ret(0);
|
||||
}
|
||||
|
@ -184,12 +184,9 @@ void TurboAssembler::CompareRoot(const Operand& with,
|
||||
cmpp(with, kScratchRegister);
|
||||
}
|
||||
|
||||
|
||||
void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
|
||||
Register addr,
|
||||
Register scratch,
|
||||
SaveFPRegsMode save_fp,
|
||||
RememberedSetFinalAction and_then) {
|
||||
Register addr, Register scratch,
|
||||
SaveFPRegsMode save_fp) {
|
||||
if (emit_debug_code()) {
|
||||
Label ok;
|
||||
JumpIfNotInNewSpace(object, scratch, &ok, Label::kNear);
|
||||
@ -212,23 +209,13 @@ void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
|
||||
Label done;
|
||||
// Check for end of buffer.
|
||||
testp(scratch, Immediate(StoreBuffer::kStoreBufferMask));
|
||||
if (and_then == kReturnAtEnd) {
|
||||
Label buffer_overflowed;
|
||||
j(equal, &buffer_overflowed, Label::kNear);
|
||||
ret(0);
|
||||
bind(&buffer_overflowed);
|
||||
} else {
|
||||
DCHECK(and_then == kFallThroughAtEnd);
|
||||
j(not_equal, &done, Label::kNear);
|
||||
}
|
||||
Label buffer_overflowed;
|
||||
j(equal, &buffer_overflowed, Label::kNear);
|
||||
ret(0);
|
||||
bind(&buffer_overflowed);
|
||||
StoreBufferOverflowStub store_buffer_overflow(isolate(), save_fp);
|
||||
CallStub(&store_buffer_overflow);
|
||||
if (and_then == kReturnAtEnd) {
|
||||
ret(0);
|
||||
} else {
|
||||
DCHECK(and_then == kFallThroughAtEnd);
|
||||
bind(&done);
|
||||
}
|
||||
ret(0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -542,19 +542,12 @@ class MacroAssembler : public TurboAssembler {
|
||||
// GC Support
|
||||
|
||||
|
||||
enum RememberedSetFinalAction {
|
||||
kReturnAtEnd,
|
||||
kFallThroughAtEnd
|
||||
};
|
||||
|
||||
// Record in the remembered set the fact that we have a pointer to new space
|
||||
// at the address pointed to by the addr register. Only works if addr is not
|
||||
// in new space.
|
||||
void RememberedSetHelper(Register object, // Used for debug code.
|
||||
Register addr,
|
||||
Register scratch,
|
||||
SaveFPRegsMode save_fp,
|
||||
RememberedSetFinalAction and_then);
|
||||
Register addr, Register scratch,
|
||||
SaveFPRegsMode save_fp);
|
||||
|
||||
// Check if object is in new space. Jumps if the object is not in new space.
|
||||
// The register scratch can be object itself, but scratch will be clobbered.
|
||||
|
Loading…
Reference in New Issue
Block a user