| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 3071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3082 __ cvtss2sd(value, value); | 3082 __ cvtss2sd(value, value); |
| 3083 break; | 3083 break; |
| 3084 case MethodRecognizer::kFloat32x4Shuffle: | 3084 case MethodRecognizer::kFloat32x4Shuffle: |
| 3085 __ shufps(value, value, Immediate(mask_)); | 3085 __ shufps(value, value, Immediate(mask_)); |
| 3086 break; | 3086 break; |
| 3087 default: UNREACHABLE(); | 3087 default: UNREACHABLE(); |
| 3088 } | 3088 } |
| 3089 } | 3089 } |
| 3090 | 3090 |
| 3091 | 3091 |
| 3092 LocationSummary* Float32x4GetSignMaskInstr::MakeLocationSummary() const { |
| 3093 const intptr_t kNumInputs = 1; |
| 3094 const intptr_t kNumTemps = 0; |
| 3095 LocationSummary* summary = |
| 3096 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 3097 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3098 summary->set_out(Location::RequiresRegister()); |
| 3099 return summary; |
| 3100 } |
| 3101 |
| 3102 |
| 3103 void Float32x4GetSignMaskInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3104 XmmRegister value = locs()->in(0).fpu_reg(); |
| 3105 Register out = locs()->out().reg(); |
| 3106 |
| 3107 __ movmskps(out, value); |
| 3108 __ SmiTag(out); |
| 3109 } |
| 3110 |
| 3111 |
| 3092 LocationSummary* Float32x4ConstructorInstr::MakeLocationSummary() const { | 3112 LocationSummary* Float32x4ConstructorInstr::MakeLocationSummary() const { |
| 3093 const intptr_t kNumInputs = 4; | 3113 const intptr_t kNumInputs = 4; |
| 3094 const intptr_t kNumTemps = 0; | 3114 const intptr_t kNumTemps = 0; |
| 3095 LocationSummary* summary = | 3115 LocationSummary* summary = |
| 3096 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3116 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 3097 summary->set_in(0, Location::RequiresFpuRegister()); | 3117 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3098 summary->set_in(1, Location::RequiresFpuRegister()); | 3118 summary->set_in(1, Location::RequiresFpuRegister()); |
| 3099 summary->set_in(2, Location::RequiresFpuRegister()); | 3119 summary->set_in(2, Location::RequiresFpuRegister()); |
| 3100 summary->set_in(3, Location::RequiresFpuRegister()); | 3120 summary->set_in(3, Location::RequiresFpuRegister()); |
| 3101 summary->set_out(Location::SameAsFirstInput()); | 3121 summary->set_out(Location::SameAsFirstInput()); |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3576 __ testl(result, result); | 3596 __ testl(result, result); |
| 3577 __ j(NOT_ZERO, &non_zero, Assembler::kNearJump); | 3597 __ j(NOT_ZERO, &non_zero, Assembler::kNearJump); |
| 3578 __ LoadObject(result, Bool::False()); | 3598 __ LoadObject(result, Bool::False()); |
| 3579 __ jmp(&done); | 3599 __ jmp(&done); |
| 3580 __ Bind(&non_zero); | 3600 __ Bind(&non_zero); |
| 3581 __ LoadObject(result, Bool::True()); | 3601 __ LoadObject(result, Bool::True()); |
| 3582 __ Bind(&done); | 3602 __ Bind(&done); |
| 3583 } | 3603 } |
| 3584 | 3604 |
| 3585 | 3605 |
| 3606 LocationSummary* Uint32x4GetSignMaskInstr::MakeLocationSummary() const { |
| 3607 const intptr_t kNumInputs = 1; |
| 3608 const intptr_t kNumTemps = 0; |
| 3609 LocationSummary* summary = |
| 3610 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 3611 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3612 summary->set_out(Location::RequiresRegister()); |
| 3613 return summary; |
| 3614 } |
| 3615 |
| 3616 |
| 3617 void Uint32x4GetSignMaskInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3618 XmmRegister value = locs()->in(0).fpu_reg(); |
| 3619 Register out = locs()->out().reg(); |
| 3620 |
| 3621 __ movmskps(out, value); |
| 3622 __ SmiTag(out); |
| 3623 } |
| 3624 |
| 3625 |
| 3586 LocationSummary* Uint32x4SelectInstr::MakeLocationSummary() const { | 3626 LocationSummary* Uint32x4SelectInstr::MakeLocationSummary() const { |
| 3587 const intptr_t kNumInputs = 3; | 3627 const intptr_t kNumInputs = 3; |
| 3588 const intptr_t kNumTemps = 1; | 3628 const intptr_t kNumTemps = 1; |
| 3589 LocationSummary* summary = | 3629 LocationSummary* summary = |
| 3590 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3630 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 3591 summary->set_in(0, Location::RequiresFpuRegister()); | 3631 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3592 summary->set_in(1, Location::RequiresFpuRegister()); | 3632 summary->set_in(1, Location::RequiresFpuRegister()); |
| 3593 summary->set_in(2, Location::RequiresFpuRegister()); | 3633 summary->set_in(2, Location::RequiresFpuRegister()); |
| 3594 summary->set_temp(0, Location::RequiresFpuRegister()); | 3634 summary->set_temp(0, Location::RequiresFpuRegister()); |
| 3595 summary->set_out(Location::SameAsFirstInput()); | 3635 summary->set_out(Location::SameAsFirstInput()); |
| (...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4608 PcDescriptors::kOther, | 4648 PcDescriptors::kOther, |
| 4609 locs()); | 4649 locs()); |
| 4610 __ Drop(2); // Discard type arguments and receiver. | 4650 __ Drop(2); // Discard type arguments and receiver. |
| 4611 } | 4651 } |
| 4612 | 4652 |
| 4613 } // namespace dart | 4653 } // namespace dart |
| 4614 | 4654 |
| 4615 #undef __ | 4655 #undef __ |
| 4616 | 4656 |
| 4617 #endif // defined TARGET_ARCH_X64 | 4657 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |