| 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 "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 3029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3040 return summary; | 3040 return summary; |
| 3041 } | 3041 } |
| 3042 | 3042 |
| 3043 | 3043 |
| 3044 void Float32x4ShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3044 void Float32x4ShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3045 XmmRegister value = locs()->in(0).fpu_reg(); | 3045 XmmRegister value = locs()->in(0).fpu_reg(); |
| 3046 | 3046 |
| 3047 ASSERT(locs()->out().fpu_reg() == value); | 3047 ASSERT(locs()->out().fpu_reg() == value); |
| 3048 | 3048 |
| 3049 switch (op_kind()) { | 3049 switch (op_kind()) { |
| 3050 case MethodRecognizer::kFloat32x4ShuffleXXXX: | |
| 3051 __ shufps(value, value, Immediate(0x00)); | |
| 3052 break; | |
| 3053 case MethodRecognizer::kFloat32x4ShuffleYYYY: | |
| 3054 __ shufps(value, value, Immediate(0x55)); | |
| 3055 break; | |
| 3056 case MethodRecognizer::kFloat32x4ShuffleZZZZ: | |
| 3057 __ shufps(value, value, Immediate(0xAA)); | |
| 3058 break; | |
| 3059 case MethodRecognizer::kFloat32x4ShuffleWWWW: | |
| 3060 __ shufps(value, value, Immediate(0xFF)); | |
| 3061 break; | |
| 3062 case MethodRecognizer::kFloat32x4ShuffleX: | 3050 case MethodRecognizer::kFloat32x4ShuffleX: |
| 3063 __ shufps(value, value, Immediate(0x00)); | 3051 __ shufps(value, value, Immediate(0x00)); |
| 3064 __ cvtss2sd(value, value); | 3052 __ cvtss2sd(value, value); |
| 3065 break; | 3053 break; |
| 3066 case MethodRecognizer::kFloat32x4ShuffleY: | 3054 case MethodRecognizer::kFloat32x4ShuffleY: |
| 3067 __ shufps(value, value, Immediate(0x55)); | 3055 __ shufps(value, value, Immediate(0x55)); |
| 3068 __ cvtss2sd(value, value); | 3056 __ cvtss2sd(value, value); |
| 3069 break; | 3057 break; |
| 3070 case MethodRecognizer::kFloat32x4ShuffleZ: | 3058 case MethodRecognizer::kFloat32x4ShuffleZ: |
| 3071 __ shufps(value, value, Immediate(0xAA)); | 3059 __ shufps(value, value, Immediate(0xAA)); |
| 3072 __ cvtss2sd(value, value); | 3060 __ cvtss2sd(value, value); |
| 3073 break; | 3061 break; |
| 3074 case MethodRecognizer::kFloat32x4ShuffleW: | 3062 case MethodRecognizer::kFloat32x4ShuffleW: |
| 3075 __ shufps(value, value, Immediate(0xFF)); | 3063 __ shufps(value, value, Immediate(0xFF)); |
| 3076 __ cvtss2sd(value, value); | 3064 __ cvtss2sd(value, value); |
| 3077 break; | 3065 break; |
| 3066 case MethodRecognizer::kFloat32x4Shuffle: |
| 3067 __ shufps(value, value, Immediate(mask_)); |
| 3068 break; |
| 3078 default: UNREACHABLE(); | 3069 default: UNREACHABLE(); |
| 3079 } | 3070 } |
| 3080 } | 3071 } |
| 3081 | 3072 |
| 3082 | 3073 |
| 3083 LocationSummary* Float32x4ConstructorInstr::MakeLocationSummary() const { | 3074 LocationSummary* Float32x4ConstructorInstr::MakeLocationSummary() const { |
| 3084 const intptr_t kNumInputs = 4; | 3075 const intptr_t kNumInputs = 4; |
| 3085 const intptr_t kNumTemps = 0; | 3076 const intptr_t kNumTemps = 0; |
| 3086 LocationSummary* summary = | 3077 LocationSummary* summary = |
| 3087 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3078 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| (...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4429 PcDescriptors::kOther, | 4420 PcDescriptors::kOther, |
| 4430 locs()); | 4421 locs()); |
| 4431 __ Drop(2); // Discard type arguments and receiver. | 4422 __ Drop(2); // Discard type arguments and receiver. |
| 4432 } | 4423 } |
| 4433 | 4424 |
| 4434 } // namespace dart | 4425 } // namespace dart |
| 4435 | 4426 |
| 4436 #undef __ | 4427 #undef __ |
| 4437 | 4428 |
| 4438 #endif // defined TARGET_ARCH_X64 | 4429 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |