MIPS: Fix stack claim and store to slot for large sizes.
Could not encode the large slot number in opcode MiscField. TEST=mozilla/js/tests/js1_5/Regress/regress-396684.js BUG= Review URL: https://codereview.chromium.org/1043393002 Cr-Commit-Position: refs/heads/master@{#27574}
This commit is contained in:
parent
1ac47e6138
commit
94506cc3c2
@ -721,13 +721,11 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
|
||||
__ Push(i.InputRegister(0));
|
||||
break;
|
||||
case kMipsStackClaim: {
|
||||
int words = MiscField::decode(instr->opcode());
|
||||
__ Subu(sp, sp, Operand(words << kPointerSizeLog2));
|
||||
__ Subu(sp, sp, Operand(i.InputInt32(0)));
|
||||
break;
|
||||
}
|
||||
case kMipsStoreToStackSlot: {
|
||||
int slot = MiscField::decode(instr->opcode());
|
||||
__ sw(i.InputRegister(0), MemOperand(sp, slot << kPointerSizeLog2));
|
||||
__ sw(i.InputRegister(0), MemOperand(sp, i.InputInt32(1)));
|
||||
break;
|
||||
}
|
||||
case kMipsStoreWriteBarrier: {
|
||||
|
@ -505,13 +505,14 @@ void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) {
|
||||
// Possibly align stack here for functions.
|
||||
int push_count = buffer.pushed_nodes.size();
|
||||
if (push_count > 0) {
|
||||
Emit(kMipsStackClaim | MiscField::encode(push_count), g.NoOutput());
|
||||
Emit(kMipsStackClaim, g.NoOutput(),
|
||||
g.TempImmediate(push_count << kPointerSizeLog2));
|
||||
}
|
||||
int slot = buffer.pushed_nodes.size() - 1;
|
||||
for (auto i = buffer.pushed_nodes.rbegin(); i != buffer.pushed_nodes.rend();
|
||||
++i) {
|
||||
Emit(kMipsStoreToStackSlot | MiscField::encode(slot), g.NoOutput(),
|
||||
g.UseRegister(*i));
|
||||
Emit(kMipsStoreToStackSlot, g.NoOutput(), g.UseRegister(*i),
|
||||
g.TempImmediate(slot << kPointerSizeLog2));
|
||||
slot--;
|
||||
}
|
||||
|
||||
|
@ -789,13 +789,11 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
|
||||
__ Push(i.InputRegister(0));
|
||||
break;
|
||||
case kMips64StackClaim: {
|
||||
int words = MiscField::decode(instr->opcode());
|
||||
__ Dsubu(sp, sp, Operand(words << kPointerSizeLog2));
|
||||
__ Dsubu(sp, sp, Operand(i.InputInt32(0)));
|
||||
break;
|
||||
}
|
||||
case kMips64StoreToStackSlot: {
|
||||
int slot = MiscField::decode(instr->opcode());
|
||||
__ sd(i.InputRegister(0), MemOperand(sp, slot << kPointerSizeLog2));
|
||||
__ sd(i.InputRegister(0), MemOperand(sp, i.InputInt32(1)));
|
||||
break;
|
||||
}
|
||||
case kMips64StoreWriteBarrier: {
|
||||
|
@ -654,13 +654,14 @@ void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) {
|
||||
|
||||
int push_count = buffer.pushed_nodes.size();
|
||||
if (push_count > 0) {
|
||||
Emit(kMips64StackClaim | MiscField::encode(push_count), g.NoOutput());
|
||||
Emit(kMips64StackClaim, g.NoOutput(),
|
||||
g.TempImmediate(push_count << kPointerSizeLog2));
|
||||
}
|
||||
int slot = buffer.pushed_nodes.size() - 1;
|
||||
for (auto i = buffer.pushed_nodes.rbegin(); i != buffer.pushed_nodes.rend();
|
||||
++i) {
|
||||
Emit(kMips64StoreToStackSlot | MiscField::encode(slot), g.NoOutput(),
|
||||
g.UseRegister(*i));
|
||||
Emit(kMips64StoreToStackSlot, g.NoOutput(), g.UseRegister(*i),
|
||||
g.TempImmediate(slot << kPointerSizeLog2));
|
||||
slot--;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user