Index: src/mips/debug-mips.cc |
diff --git a/src/mips/debug-mips.cc b/src/mips/debug-mips.cc |
index 896309a36e3201f168320691a1a237e2b588d4d7..2c7c23591a95730963faf99bf72cad65c675c339 100644 |
--- a/src/mips/debug-mips.cc |
+++ b/src/mips/debug-mips.cc |
@@ -60,10 +60,8 @@ void BreakLocation::SetDebugBreakAtSlot() { |
#define __ ACCESS_MASM(masm) |
- |
static void Generate_DebugBreakCallHelper(MacroAssembler* masm, |
- RegList object_regs, |
- RegList non_object_regs) { |
+ RegList object_regs) { |
{ |
FrameScope scope(masm, StackFrame::INTERNAL); |
@@ -81,21 +79,8 @@ static void Generate_DebugBreakCallHelper(MacroAssembler* masm, |
// make sure that these are correctly updated during GC. Non object values |
// are stored as a smi causing it to be untouched by GC. |
DCHECK((object_regs & ~kJSCallerSaved) == 0); |
- DCHECK((non_object_regs & ~kJSCallerSaved) == 0); |
- DCHECK((object_regs & non_object_regs) == 0); |
- if ((object_regs | non_object_regs) != 0) { |
- for (int i = 0; i < kNumJSCallerSaved; i++) { |
- int r = JSCallerSavedCode(i); |
- Register reg = { r }; |
- if ((non_object_regs & (1 << r)) != 0) { |
- if (FLAG_debug_code) { |
- __ And(at, reg, 0xc0000000); |
- __ Assert(eq, kUnableToEncodeValueAsSmi, at, Operand(zero_reg)); |
- } |
- __ sll(reg, reg, kSmiTagSize); |
- } |
- } |
- __ MultiPush(object_regs | non_object_regs); |
+ if (object_regs != 0) { |
+ __ MultiPush(object_regs); |
} |
#ifdef DEBUG |
@@ -108,18 +93,14 @@ static void Generate_DebugBreakCallHelper(MacroAssembler* masm, |
__ CallStub(&ceb); |
// Restore the register values from the expression stack. |
- if ((object_regs | non_object_regs) != 0) { |
- __ MultiPop(object_regs | non_object_regs); |
- for (int i = 0; i < kNumJSCallerSaved; i++) { |
- int r = JSCallerSavedCode(i); |
- Register reg = { r }; |
- if ((non_object_regs & (1 << r)) != 0) { |
- __ srl(reg, reg, kSmiTagSize); |
- } |
- if (FLAG_debug_code && |
- (((object_regs |non_object_regs) & (1 << r)) == 0)) { |
- __ li(reg, kDebugZapValue); |
- } |
+ if (object_regs != 0) { |
+ __ MultiPop(object_regs); |
+ } |
+ for (int i = 0; i < kNumJSCallerSaved; i++) { |
+ int r = JSCallerSavedCode(i); |
+ Register reg = {r}; |
+ if (FLAG_debug_code && ((object_regs & (1 << r)) == 0)) { |
+ __ li(reg, kDebugZapValue); |
} |
} |
@@ -140,53 +121,11 @@ static void Generate_DebugBreakCallHelper(MacroAssembler* masm, |
} |
-void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) { |
- // Register state for CallICStub |
- // ----------- S t a t e ------------- |
- // -- a1 : function |
- // -- a3 : slot in feedback array (smi) |
- // ----------------------------------- |
- Generate_DebugBreakCallHelper(masm, a1.bit() | a3.bit(), 0); |
-} |
- |
- |
void DebugCodegen::GenerateReturnDebugBreak(MacroAssembler* masm) { |
// In places other than IC call sites it is expected that v0 is TOS which |
// is an object - this is not generally the case so this should be used with |
// care. |
- Generate_DebugBreakCallHelper(masm, v0.bit(), 0); |
-} |
- |
- |
-void DebugCodegen::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) { |
- // Register state for CallFunctionStub (from code-stubs-mips.cc). |
- // ----------- S t a t e ------------- |
- // -- a1 : function |
- // ----------------------------------- |
- Generate_DebugBreakCallHelper(masm, a1.bit(), 0); |
-} |
- |
- |
-void DebugCodegen::GenerateCallConstructStubDebugBreak(MacroAssembler* masm) { |
- // Calling convention for CallConstructStub (from code-stubs-mips.cc). |
- // ----------- S t a t e ------------- |
- // -- a0 : number of arguments (not smi) |
- // -- a1 : constructor function |
- // ----------------------------------- |
- Generate_DebugBreakCallHelper(masm, a1.bit() , a0.bit()); |
-} |
- |
- |
-void DebugCodegen::GenerateCallConstructStubRecordDebugBreak( |
- MacroAssembler* masm) { |
- // Calling convention for CallConstructStub (from code-stubs-mips.cc). |
- // ----------- S t a t e ------------- |
- // -- a0 : number of arguments (not smi) |
- // -- a1 : constructor function |
- // -- a2 : feedback array |
- // -- a3 : feedback slot (smi) |
- // ----------------------------------- |
- Generate_DebugBreakCallHelper(masm, a1.bit() | a2.bit() | a3.bit(), a0.bit()); |
+ Generate_DebugBreakCallHelper(masm, v0.bit()); |
} |
@@ -196,7 +135,6 @@ void DebugCodegen::GenerateSlot(MacroAssembler* masm) { |
Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm); |
Label check_codesize; |
__ bind(&check_codesize); |
- __ RecordDebugBreakSlot(); |
for (int i = 0; i < Assembler::kDebugBreakSlotInstructions; i++) { |
__ nop(MacroAssembler::DEBUG_BREAK_NOP); |
} |
@@ -208,7 +146,7 @@ void DebugCodegen::GenerateSlot(MacroAssembler* masm) { |
void DebugCodegen::GenerateSlotDebugBreak(MacroAssembler* masm) { |
// In the places where a debug break slot is inserted no registers can contain |
// object pointers. |
- Generate_DebugBreakCallHelper(masm, 0, 0); |
+ Generate_DebugBreakCallHelper(masm, 0); |
} |