Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: runtime/vm/intermediate_language_ia32.cc

Issue 22947006: Add signMask getter to Float32x4 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 3047 matching lines...) Expand 10 before | Expand all | Expand 10 after
3058 __ cvtss2sd(value, value); 3058 __ cvtss2sd(value, value);
3059 break; 3059 break;
3060 case MethodRecognizer::kFloat32x4Shuffle: 3060 case MethodRecognizer::kFloat32x4Shuffle:
3061 __ shufps(value, value, Immediate(mask_)); 3061 __ shufps(value, value, Immediate(mask_));
3062 break; 3062 break;
3063 default: UNREACHABLE(); 3063 default: UNREACHABLE();
3064 } 3064 }
3065 } 3065 }
3066 3066
3067 3067
3068 LocationSummary* Float32x4GetSignMaskInstr::MakeLocationSummary() const {
3069 const intptr_t kNumInputs = 1;
3070 const intptr_t kNumTemps = 0;
3071 LocationSummary* summary =
3072 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
3073 summary->set_in(0, Location::RequiresFpuRegister());
3074 summary->set_out(Location::RequiresRegister());
3075 return summary;
3076 }
3077
3078
3079 void Float32x4GetSignMaskInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3080 XmmRegister value = locs()->in(0).fpu_reg();
3081 Register out = locs()->out().reg();
3082
3083 __ movmskps(out, value);
3084 __ SmiTag(out);
3085 }
3086
3087
3068 LocationSummary* Float32x4ConstructorInstr::MakeLocationSummary() const { 3088 LocationSummary* Float32x4ConstructorInstr::MakeLocationSummary() const {
3069 const intptr_t kNumInputs = 4; 3089 const intptr_t kNumInputs = 4;
3070 const intptr_t kNumTemps = 0; 3090 const intptr_t kNumTemps = 0;
3071 LocationSummary* summary = 3091 LocationSummary* summary =
3072 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); 3092 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
3073 summary->set_in(0, Location::RequiresFpuRegister()); 3093 summary->set_in(0, Location::RequiresFpuRegister());
3074 summary->set_in(1, Location::RequiresFpuRegister()); 3094 summary->set_in(1, Location::RequiresFpuRegister());
3075 summary->set_in(2, Location::RequiresFpuRegister()); 3095 summary->set_in(2, Location::RequiresFpuRegister());
3076 summary->set_in(3, Location::RequiresFpuRegister()); 3096 summary->set_in(3, Location::RequiresFpuRegister());
3077 summary->set_out(Location::SameAsFirstInput()); 3097 summary->set_out(Location::SameAsFirstInput());
(...skipping 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after
4978 PcDescriptors::kOther, 4998 PcDescriptors::kOther,
4979 locs()); 4999 locs());
4980 __ Drop(2); // Discard type arguments and receiver. 5000 __ Drop(2); // Discard type arguments and receiver.
4981 } 5001 }
4982 5002
4983 } // namespace dart 5003 } // namespace dart
4984 5004
4985 #undef __ 5005 #undef __
4986 5006
4987 #endif // defined TARGET_ARCH_IA32 5007 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698