MIPS: Minor-key-ify four stubs.

Port r23605 (8fcd377)

Original commit message:
- ICCompareStub
- BinaryOpICStub
- CompareNilICStub
- VectorLoadStub

BUG=
R=paul.lind@imgtec.com

Review URL: https://codereview.chromium.org/531033003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23623 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent eb2fdf10
......@@ -742,8 +742,8 @@ void ICCompareStub::GenerateGeneric(MacroAssembler* masm) {
Condition cc = GetCondition();
Label miss;
ICCompareStub_CheckInputType(masm, lhs, a2, left_, &miss);
ICCompareStub_CheckInputType(masm, rhs, a3, right_, &miss);
ICCompareStub_CheckInputType(masm, lhs, a2, left(), &miss);
ICCompareStub_CheckInputType(masm, rhs, a3, right(), &miss);
Label slow; // Call builtin.
Label not_smis, both_loaded_as_doubles;
......@@ -3648,7 +3648,7 @@ void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) {
void ICCompareStub::GenerateSmis(MacroAssembler* masm) {
DCHECK(state_ == CompareIC::SMI);
DCHECK(state() == CompareIC::SMI);
Label miss;
__ Or(a2, a1, a0);
__ JumpIfNotSmi(a2, &miss);
......@@ -3671,16 +3671,16 @@ void ICCompareStub::GenerateSmis(MacroAssembler* masm) {
void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
DCHECK(state_ == CompareIC::NUMBER);
DCHECK(state() == CompareIC::NUMBER);
Label generic_stub;
Label unordered, maybe_undefined1, maybe_undefined2;
Label miss;
if (left_ == CompareIC::SMI) {
if (left() == CompareIC::SMI) {
__ JumpIfNotSmi(a1, &miss);
}
if (right_ == CompareIC::SMI) {
if (right() == CompareIC::SMI) {
__ JumpIfNotSmi(a0, &miss);
}
......@@ -3738,12 +3738,12 @@ void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
__ bind(&unordered);
__ bind(&generic_stub);
ICCompareStub stub(isolate(), op_, CompareIC::GENERIC, CompareIC::GENERIC,
ICCompareStub stub(isolate(), op(), CompareIC::GENERIC, CompareIC::GENERIC,
CompareIC::GENERIC);
__ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
__ bind(&maybe_undefined1);
if (Token::IsOrderedRelationalCompareOp(op_)) {
if (Token::IsOrderedRelationalCompareOp(op())) {
__ LoadRoot(at, Heap::kUndefinedValueRootIndex);
__ Branch(&miss, ne, a0, Operand(at));
__ JumpIfSmi(a1, &unordered);
......@@ -3753,7 +3753,7 @@ void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
}
__ bind(&maybe_undefined2);
if (Token::IsOrderedRelationalCompareOp(op_)) {
if (Token::IsOrderedRelationalCompareOp(op())) {
__ LoadRoot(at, Heap::kUndefinedValueRootIndex);
__ Branch(&unordered, eq, a1, Operand(at));
}
......@@ -3764,7 +3764,7 @@ void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
void ICCompareStub::GenerateInternalizedStrings(MacroAssembler* masm) {
DCHECK(state_ == CompareIC::INTERNALIZED_STRING);
DCHECK(state() == CompareIC::INTERNALIZED_STRING);
Label miss;
// Registers containing left and right operands respectively.
......@@ -3804,7 +3804,7 @@ void ICCompareStub::GenerateInternalizedStrings(MacroAssembler* masm) {
void ICCompareStub::GenerateUniqueNames(MacroAssembler* masm) {
DCHECK(state_ == CompareIC::UNIQUE_NAME);
DCHECK(state() == CompareIC::UNIQUE_NAME);
DCHECK(GetCondition() == eq);
Label miss;
......@@ -3848,10 +3848,10 @@ void ICCompareStub::GenerateUniqueNames(MacroAssembler* masm) {
void ICCompareStub::GenerateStrings(MacroAssembler* masm) {
DCHECK(state_ == CompareIC::STRING);
DCHECK(state() == CompareIC::STRING);
Label miss;
bool equality = Token::IsEqualityOp(op_);
bool equality = Token::IsEqualityOp(op());
// Registers containing left and right operands respectively.
Register left = a1;
......@@ -3934,7 +3934,7 @@ void ICCompareStub::GenerateStrings(MacroAssembler* masm) {
void ICCompareStub::GenerateObjects(MacroAssembler* masm) {
DCHECK(state_ == CompareIC::OBJECT);
DCHECK(state() == CompareIC::OBJECT);
Label miss;
__ And(a2, a1, Operand(a0));
__ JumpIfSmi(a2, &miss);
......@@ -3978,7 +3978,7 @@ void ICCompareStub::GenerateMiss(MacroAssembler* masm) {
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(a1, a0);
__ Push(ra, a1, a0);
__ li(t0, Operand(Smi::FromInt(op_)));
__ li(t0, Operand(Smi::FromInt(op())));
__ addiu(sp, sp, -kPointerSize);
__ CallExternalReference(miss, 3, USE_DELAY_SLOT);
__ sw(t0, MemOperand(sp)); // In the delay slot.
......
......@@ -395,8 +395,7 @@ void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
Ret(eq, t8, Operand(zero_reg));
}
push(ra);
StoreBufferOverflowStub store_buffer_overflow =
StoreBufferOverflowStub(isolate(), fp_mode);
StoreBufferOverflowStub store_buffer_overflow(isolate(), fp_mode);
CallStub(&store_buffer_overflow);
pop(ra);
bind(&done);
......
......@@ -735,8 +735,8 @@ void ICCompareStub::GenerateGeneric(MacroAssembler* masm) {
Condition cc = GetCondition();
Label miss;
ICCompareStub_CheckInputType(masm, lhs, a2, left_, &miss);
ICCompareStub_CheckInputType(masm, rhs, a3, right_, &miss);
ICCompareStub_CheckInputType(masm, lhs, a2, left(), &miss);
ICCompareStub_CheckInputType(masm, rhs, a3, right(), &miss);
Label slow; // Call builtin.
Label not_smis, both_loaded_as_doubles;
......@@ -3684,7 +3684,7 @@ void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) {
void ICCompareStub::GenerateSmis(MacroAssembler* masm) {
DCHECK(state_ == CompareIC::SMI);
DCHECK(state() == CompareIC::SMI);
Label miss;
__ Or(a2, a1, a0);
__ JumpIfNotSmi(a2, &miss);
......@@ -3707,16 +3707,16 @@ void ICCompareStub::GenerateSmis(MacroAssembler* masm) {
void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
DCHECK(state_ == CompareIC::NUMBER);
DCHECK(state() == CompareIC::NUMBER);
Label generic_stub;
Label unordered, maybe_undefined1, maybe_undefined2;
Label miss;
if (left_ == CompareIC::SMI) {
if (left() == CompareIC::SMI) {
__ JumpIfNotSmi(a1, &miss);
}
if (right_ == CompareIC::SMI) {
if (right() == CompareIC::SMI) {
__ JumpIfNotSmi(a0, &miss);
}
......@@ -3774,12 +3774,12 @@ void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
__ bind(&unordered);
__ bind(&generic_stub);
ICCompareStub stub(isolate(), op_, CompareIC::GENERIC, CompareIC::GENERIC,
ICCompareStub stub(isolate(), op(), CompareIC::GENERIC, CompareIC::GENERIC,
CompareIC::GENERIC);
__ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
__ bind(&maybe_undefined1);
if (Token::IsOrderedRelationalCompareOp(op_)) {
if (Token::IsOrderedRelationalCompareOp(op())) {
__ LoadRoot(at, Heap::kUndefinedValueRootIndex);
__ Branch(&miss, ne, a0, Operand(at));
__ JumpIfSmi(a1, &unordered);
......@@ -3789,7 +3789,7 @@ void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
}
__ bind(&maybe_undefined2);
if (Token::IsOrderedRelationalCompareOp(op_)) {
if (Token::IsOrderedRelationalCompareOp(op())) {
__ LoadRoot(at, Heap::kUndefinedValueRootIndex);
__ Branch(&unordered, eq, a1, Operand(at));
}
......@@ -3800,7 +3800,7 @@ void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
void ICCompareStub::GenerateInternalizedStrings(MacroAssembler* masm) {
DCHECK(state_ == CompareIC::INTERNALIZED_STRING);
DCHECK(state() == CompareIC::INTERNALIZED_STRING);
Label miss;
// Registers containing left and right operands respectively.
......@@ -3840,7 +3840,7 @@ void ICCompareStub::GenerateInternalizedStrings(MacroAssembler* masm) {
void ICCompareStub::GenerateUniqueNames(MacroAssembler* masm) {
DCHECK(state_ == CompareIC::UNIQUE_NAME);
DCHECK(state() == CompareIC::UNIQUE_NAME);
DCHECK(GetCondition() == eq);
Label miss;
......@@ -3884,10 +3884,10 @@ void ICCompareStub::GenerateUniqueNames(MacroAssembler* masm) {
void ICCompareStub::GenerateStrings(MacroAssembler* masm) {
DCHECK(state_ == CompareIC::STRING);
DCHECK(state() == CompareIC::STRING);
Label miss;
bool equality = Token::IsEqualityOp(op_);
bool equality = Token::IsEqualityOp(op());
// Registers containing left and right operands respectively.
Register left = a1;
......@@ -3970,7 +3970,7 @@ void ICCompareStub::GenerateStrings(MacroAssembler* masm) {
void ICCompareStub::GenerateObjects(MacroAssembler* masm) {
DCHECK(state_ == CompareIC::OBJECT);
DCHECK(state() == CompareIC::OBJECT);
Label miss;
__ And(a2, a1, Operand(a0));
__ JumpIfSmi(a2, &miss);
......@@ -4014,7 +4014,7 @@ void ICCompareStub::GenerateMiss(MacroAssembler* masm) {
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(a1, a0);
__ Push(ra, a1, a0);
__ li(a4, Operand(Smi::FromInt(op_)));
__ li(a4, Operand(Smi::FromInt(op())));
__ daddiu(sp, sp, -kPointerSize);
__ CallExternalReference(miss, 3, USE_DELAY_SLOT);
__ sd(a4, MemOperand(sp)); // In the delay slot.
......
......@@ -400,8 +400,7 @@ void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
Ret(eq, t8, Operand(zero_reg));
}
push(ra);
StoreBufferOverflowStub store_buffer_overflow =
StoreBufferOverflowStub(isolate(), fp_mode);
StoreBufferOverflowStub store_buffer_overflow(isolate(), fp_mode);
CallStub(&store_buffer_overflow);
pop(ra);
bind(&done);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment