| Index: src/mips/lithium-mips.cc
|
| diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc
|
| index 0e58eb55104ae3abe77bf53c9a427eda36a1b901..b883ad459eb1879a6ccce5724d2d87784d91337c 100644
|
| --- a/src/mips/lithium-mips.cc
|
| +++ b/src/mips/lithium-mips.cc
|
| @@ -42,10 +42,10 @@ LITHIUM_CONCRETE_INSTRUCTION_LIST(DEFINE_COMPILE)
|
| #undef DEFINE_COMPILE
|
|
|
| LOsrEntry::LOsrEntry() {
|
| - for (int i = 0; i < Register::kNumAllocatableRegisters; ++i) {
|
| + for (int i = 0; i < Register::NumAllocatableRegisters(); ++i) {
|
| register_spills_[i] = NULL;
|
| }
|
| - for (int i = 0; i < DoubleRegister::kNumAllocatableRegisters; ++i) {
|
| + for (int i = 0; i < DoubleRegister::NumAllocatableRegisters(); ++i) {
|
| double_register_spills_[i] = NULL;
|
| }
|
| }
|
| @@ -616,6 +616,7 @@ LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) {
|
| LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr,
|
| HInstruction* hinstr,
|
| CanDeoptimize can_deoptimize) {
|
| + info()->MarkAsNonDeferredCalling();
|
| #ifdef DEBUG
|
| instr->VerifyCall();
|
| #endif
|
| @@ -1583,6 +1584,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
|
| Representation to = instr->to();
|
| if (from.IsTagged()) {
|
| if (to.IsDouble()) {
|
| + info()->MarkAsDeferredCalling();
|
| LOperand* value = UseRegister(instr->value());
|
| LNumberUntagD* res = new(zone()) LNumberUntagD(value);
|
| return AssignEnvironment(DefineAsRegister(res));
|
| @@ -1607,6 +1609,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
|
| }
|
| } else if (from.IsDouble()) {
|
| if (to.IsTagged()) {
|
| + info()->MarkAsDeferredCalling();
|
| LOperand* value = UseRegister(instr->value());
|
| LOperand* temp1 = TempRegister();
|
| LOperand* temp2 = TempRegister();
|
| @@ -1626,6 +1629,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
|
| return AssignEnvironment(DefineAsRegister(res));
|
| }
|
| } else if (from.IsInteger32()) {
|
| + info()->MarkAsDeferredCalling();
|
| if (to.IsTagged()) {
|
| HValue* val = instr->value();
|
| LOperand* value = UseRegisterAtStart(val);
|
| @@ -1864,7 +1868,16 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
|
| (instr->representation().IsDouble() &&
|
| ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) ||
|
| (elements_kind == EXTERNAL_DOUBLE_ELEMENTS))));
|
| - LOperand* external_pointer = UseRegister(instr->elements());
|
| + // float->double conversion on non-VFP2 requires an extra scratch
|
| + // register. For convenience, just mark the elements register as "UseTemp"
|
| + // so that it can be used as a temp during the float->double conversion
|
| + // after it's no longer needed after the float load.
|
| + bool needs_temp =
|
| + !CpuFeatures::IsSupported(FPU) &&
|
| + (elements_kind == EXTERNAL_FLOAT_ELEMENTS);
|
| + LOperand* external_pointer = needs_temp
|
| + ? UseTempRegister(instr->elements())
|
| + : UseRegister(instr->elements());
|
| result = new(zone()) LLoadKeyed(external_pointer, key);
|
| }
|
|
|
| @@ -2083,8 +2096,17 @@ LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) {
|
|
|
|
|
| LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
|
| - int spill_index = chunk()->GetParameterStackSlot(instr->index());
|
| - return DefineAsSpilled(new(zone()) LParameter, spill_index);
|
| + LParameter* result = new(zone()) LParameter;
|
| + if (info()->IsOptimizing()) {
|
| + int spill_index = chunk()->GetParameterStackSlot(instr->index());
|
| + return DefineAsSpilled(result, spill_index);
|
| + } else {
|
| + ASSERT(info()->IsStub());
|
| + CodeStubInterfaceDescriptor* descriptor =
|
| + info()->code_stub()->GetInterfaceDescriptor(info()->isolate());
|
| + Register reg = descriptor->register_params_[instr->index()];
|
| + return DefineFixed(result, reg);
|
| + }
|
| }
|
|
|
|
|
|
|