| Index: runtime/vm/intermediate_language_x64.cc
|
| diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
|
| index f899f3e1fe3f5f4be5fbb799c437767cf5a45813..ac9d6f854b467f7c91ac49d1bf7ab9e1b4342d5f 100644
|
| --- a/runtime/vm/intermediate_language_x64.cc
|
| +++ b/runtime/vm/intermediate_language_x64.cc
|
| @@ -3083,6 +3083,96 @@ void Float32x4ComparisonInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
|
|
|
|
| +LocationSummary* Float32x4MinMaxInstr::MakeLocationSummary() const {
|
| + const intptr_t kNumInputs = 2;
|
| + const intptr_t kNumTemps = 0;
|
| + LocationSummary* summary =
|
| + new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
|
| + summary->set_in(0, Location::RequiresFpuRegister());
|
| + summary->set_in(1, Location::RequiresFpuRegister());
|
| + summary->set_out(Location::SameAsFirstInput());
|
| + return summary;
|
| +}
|
| +
|
| +
|
| +void Float32x4MinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| + XmmRegister left = locs()->in(0).fpu_reg();
|
| + XmmRegister right = locs()->in(1).fpu_reg();
|
| +
|
| + ASSERT(locs()->out().fpu_reg() == left);
|
| +
|
| + switch (op_kind()) {
|
| + case MethodRecognizer::kFloat32x4Min:
|
| + __ minps(left, right);
|
| + break;
|
| + case MethodRecognizer::kFloat32x4Max:
|
| + __ maxps(left, right);
|
| + break;
|
| + default: UNREACHABLE();
|
| + }
|
| +}
|
| +
|
| +
|
| +LocationSummary* Float32x4ScaleInstr::MakeLocationSummary() const {
|
| + const intptr_t kNumInputs = 2;
|
| + const intptr_t kNumTemps = 0;
|
| + LocationSummary* summary =
|
| + new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
|
| + summary->set_in(0, Location::RequiresFpuRegister());
|
| + summary->set_in(1, Location::RequiresFpuRegister());
|
| + summary->set_out(Location::SameAsFirstInput());
|
| + return summary;
|
| +}
|
| +
|
| +
|
| +void Float32x4ScaleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| + XmmRegister left = locs()->in(0).fpu_reg();
|
| + XmmRegister right = locs()->in(1).fpu_reg();
|
| +
|
| + ASSERT(locs()->out().fpu_reg() == left);
|
| +
|
| + switch (op_kind()) {
|
| + case MethodRecognizer::kFloat32x4Scale:
|
| + __ cvtsd2ss(left, left);
|
| + __ shufps(left, left, Immediate(0x00));
|
| + __ mulps(left, right);
|
| + break;
|
| + default: UNREACHABLE();
|
| + }
|
| +}
|
| +
|
| +
|
| +LocationSummary* Float32x4SqrtInstr::MakeLocationSummary() const {
|
| + const intptr_t kNumInputs = 1;
|
| + const intptr_t kNumTemps = 0;
|
| + LocationSummary* summary =
|
| + new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
|
| + summary->set_in(0, Location::RequiresFpuRegister());
|
| + summary->set_out(Location::SameAsFirstInput());
|
| + return summary;
|
| +}
|
| +
|
| +
|
| +void Float32x4SqrtInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| + XmmRegister left = locs()->in(0).fpu_reg();
|
| +
|
| + ASSERT(locs()->out().fpu_reg() == left);
|
| +
|
| + switch (op_kind()) {
|
| + case MethodRecognizer::kFloat32x4Sqrt:
|
| + __ sqrtps(left);
|
| + break;
|
| + case MethodRecognizer::kFloat32x4Reciprocal:
|
| + __ reciprocalps(left);
|
| + break;
|
| + case MethodRecognizer::kFloat32x4ReciprocalSqrt:
|
| + __ rsqrtps(left);
|
| + break;
|
| + default: UNREACHABLE();
|
| + }
|
| +}
|
| +
|
| +
|
| LocationSummary* MathSqrtInstr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 1;
|
| const intptr_t kNumTemps = 0;
|
|
|