| Index: src/ia32/lithium-ia32.cc
|
| diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
|
| index 8d660858508411408bd1ffc9aa31f7a86a22873b..aa686bfe8307a8627beaef9492fb288b71d7369c 100644
|
| --- a/src/ia32/lithium-ia32.cc
|
| +++ b/src/ia32/lithium-ia32.cc
|
| @@ -945,6 +945,16 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) {
|
| if (FLAG_stress_environments && !instr->HasEnvironment()) {
|
| instr = AssignEnvironment(instr);
|
| }
|
| + if (!CpuFeatures::IsSafeForSnapshot(SSE2) && instr->IsGoto() &&
|
| + LGoto::cast(instr)->jumps_to_join()) {
|
| + // TODO(olivf) Since phis of spilled values are joined as registers
|
| + // (not in the stack slot), we need to allow the goto gaps to keep one
|
| + // x87 register alive. To ensure all other values are still spilled, we
|
| + // insert a fpu register barrier right before.
|
| + LClobberDoubles* clobber = new(zone()) LClobberDoubles();
|
| + clobber->set_hydrogen_value(current);
|
| + chunk_->AddInstruction(clobber, current_block_);
|
| + }
|
| instr->set_hydrogen_value(current);
|
| chunk_->AddInstruction(instr, current_block_);
|
| }
|
| @@ -1037,7 +1047,7 @@ LEnvironment* LChunkBuilder::CreateEnvironment(
|
|
|
|
|
| LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
|
| - return new(zone()) LGoto(instr->FirstSuccessor()->block_id());
|
| + return new(zone()) LGoto(instr->FirstSuccessor());
|
| }
|
|
|
|
|
| @@ -1049,7 +1059,7 @@ LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
|
| HBasicBlock* successor = HConstant::cast(value)->BooleanValue()
|
| ? instr->FirstSuccessor()
|
| : instr->SecondSuccessor();
|
| - return new(zone()) LGoto(successor->block_id());
|
| + return new(zone()) LGoto(successor);
|
| }
|
|
|
| ToBooleanStub::Types expected = instr->expected_input_types();
|
|
|