Chromium Code Reviews| Index: runtime/vm/intermediate_language_mips.cc |
| diff --git a/runtime/vm/intermediate_language_mips.cc b/runtime/vm/intermediate_language_mips.cc |
| index e824df18862e5c411a9bf1cc4128604139ea1d92..8920116ae252e00985996ef0e4e851813c6be1ec 100644 |
| --- a/runtime/vm/intermediate_language_mips.cc |
| +++ b/runtime/vm/intermediate_language_mips.cc |
| @@ -3692,6 +3692,51 @@ void BinaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| } |
| +LocationSummary* DoubleTestOpInstr::MakeLocationSummary(Zone* zone, |
| + bool opt) const { |
| + const intptr_t kNumInputs = 1; |
| + const intptr_t kNumTemps = 0; |
| + LocationSummary* summary = new(zone) LocationSummary( |
| + zone, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| + summary->set_in(0, Location::RequiresFpuRegister()); |
| + summary->set_out(0, Location::RequiresRegister()); |
| + return summary; |
| +} |
| + |
| + |
| +void DoubleTestOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| + ASSERT(compiler->is_optimizing()); |
| + const DRegister value = locs()->in(0).fpu_reg(); |
| + const Register result = locs()->out(0).reg(); |
| + if (op_kind() == MethodRecognizer::kDoubleIsNaN) { |
| + Label is_not_nan; |
| + __ LoadObject(result, Bool::False()); |
| + __ cund(value, value); |
| + __ bc1f(&is_not_nan); |
| + __ LoadObject(result, Bool::True()); |
| + __ Bind(&is_not_nan); |
| + } else { |
| + ASSERT(op_kind() == MethodRecognizer::kDoubleIsInfinite); |
| + Label not_inf, done; |
| + __ mfc1(TMP, EvenFRegisterOf(value)); |
| + __ mfc1(result, OddFRegisterOf(value)); |
| + // If the low word isn't zero, then it isn't infinity. |
| + __ bne(TMP, ZR, ¬_inf); |
| + // Mask off the sign bit. |
| + __ AndImmediate(result, result, 0x7FFFFFFF); |
| + // Compare with +infinity. |
| + __ BranchNotEqual(result, Immediate(0x7FF00000), ¬_inf); |
| + |
| + __ LoadObject(result, Bool::True()); |
| + __ b(&done); |
| + |
| + __ Bind(¬_inf); |
| + __ LoadObject(result, Bool::False()); |
| + __ Bind(&done); |
| + } |
| +} |
| + |
| + |
| LocationSummary* BinaryFloat32x4OpInstr::MakeLocationSummary(Zone* zone, |
| bool opt) const { |
| UNIMPLEMENTED(); |
| @@ -4539,7 +4584,7 @@ static void InvokeDoublePow(FlowGraphCompiler* compiler, |
| // base == -Infinity -> call pow; |
|
Florian Schneider
2016/10/18 20:34:20
The comment seems out of sync.
s/-Infinity/Infini
zra
2016/10/18 22:36:32
Done.
|
| __ ceqd(base, result); |
| Label do_pow; |
| - __ b(&do_pow); |
| + __ bc1t(&do_pow); |
| // exponent == 0.5 ? |
| __ LoadImmediate(result, 0.5); |