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

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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
3545 __ testl(result, result); 3565 __ testl(result, result);
3546 __ j(NOT_ZERO, &non_zero, Assembler::kNearJump); 3566 __ j(NOT_ZERO, &non_zero, Assembler::kNearJump);
3547 __ LoadObject(result, Bool::False()); 3567 __ LoadObject(result, Bool::False());
3548 __ jmp(&done); 3568 __ jmp(&done);
3549 __ Bind(&non_zero); 3569 __ Bind(&non_zero);
3550 __ LoadObject(result, Bool::True()); 3570 __ LoadObject(result, Bool::True());
3551 __ Bind(&done); 3571 __ Bind(&done);
3552 } 3572 }
3553 3573
3554 3574
3575 LocationSummary* Uint32x4GetSignMaskInstr::MakeLocationSummary() const {
3576 const intptr_t kNumInputs = 1;
3577 const intptr_t kNumTemps = 0;
3578 LocationSummary* summary =
3579 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
3580 summary->set_in(0, Location::RequiresFpuRegister());
3581 summary->set_out(Location::RequiresRegister());
3582 return summary;
3583 }
3584
3585
3586 void Uint32x4GetSignMaskInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3587 XmmRegister value = locs()->in(0).fpu_reg();
3588 Register out = locs()->out().reg();
3589
3590 __ movmskps(out, value);
3591 __ SmiTag(out);
3592 }
3593
3594
3555 LocationSummary* Uint32x4SelectInstr::MakeLocationSummary() const { 3595 LocationSummary* Uint32x4SelectInstr::MakeLocationSummary() const {
3556 const intptr_t kNumInputs = 3; 3596 const intptr_t kNumInputs = 3;
3557 const intptr_t kNumTemps = 1; 3597 const intptr_t kNumTemps = 1;
3558 LocationSummary* summary = 3598 LocationSummary* summary =
3559 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); 3599 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
3560 summary->set_in(0, Location::RequiresFpuRegister()); 3600 summary->set_in(0, Location::RequiresFpuRegister());
3561 summary->set_in(1, Location::RequiresFpuRegister()); 3601 summary->set_in(1, Location::RequiresFpuRegister());
3562 summary->set_in(2, Location::RequiresFpuRegister()); 3602 summary->set_in(2, Location::RequiresFpuRegister());
3563 summary->set_temp(0, Location::RequiresFpuRegister()); 3603 summary->set_temp(0, Location::RequiresFpuRegister());
3564 summary->set_out(Location::SameAsFirstInput()); 3604 summary->set_out(Location::SameAsFirstInput());
(...skipping 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after
4978 PcDescriptors::kOther, 5018 PcDescriptors::kOther,
4979 locs()); 5019 locs());
4980 __ Drop(2); // Discard type arguments and receiver. 5020 __ Drop(2); // Discard type arguments and receiver.
4981 } 5021 }
4982 5022
4983 } // namespace dart 5023 } // namespace dart
4984 5024
4985 #undef __ 5025 #undef __
4986 5026
4987 #endif // defined TARGET_ARCH_IA32 5027 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698