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

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

Issue 20467004: Inline two argument shuffle operations on IA32 and X64. (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
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "lib/error.h" 10 #include "lib/error.h"
(...skipping 3353 matching lines...) Expand 10 before | Expand all | Expand 10 after
3364 summary->set_out(Location::SameAsFirstInput()); 3364 summary->set_out(Location::SameAsFirstInput());
3365 return summary; 3365 return summary;
3366 } 3366 }
3367 3367
3368 3368
3369 void Float32x4ToUint32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { 3369 void Float32x4ToUint32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
3370 // NOP. 3370 // NOP.
3371 } 3371 }
3372 3372
3373 3373
3374 LocationSummary* Float32x4TwoArgShuffleInstr::MakeLocationSummary() const {
3375 const intptr_t kNumInputs = 2;
3376 const intptr_t kNumTemps = 0;
3377 LocationSummary* summary =
3378 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
3379 summary->set_in(0, Location::RequiresFpuRegister());
3380 summary->set_in(1, Location::RequiresFpuRegister());
3381 summary->set_out(Location::SameAsFirstInput());
3382 return summary;
3383 }
3384
3385
3386 void Float32x4TwoArgShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3387 XmmRegister left = locs()->in(0).fpu_reg();
3388 XmmRegister right = locs()->in(1).fpu_reg();
3389
3390 ASSERT(locs()->out().fpu_reg() == left);
3391
3392 switch (op_kind()) {
3393 case MethodRecognizer::kFloat32x4WithZWInXY:
3394 __ movhlps(left, right);
3395 break;
3396 case MethodRecognizer::kFloat32x4InterleaveXY:
3397 __ unpcklps(left, right);
3398 break;
3399 case MethodRecognizer::kFloat32x4InterleaveZW:
3400 __ unpckhps(left, right);
3401 break;
3402 case MethodRecognizer::kFloat32x4InterleaveXYPairs:
3403 __ unpcklpd(left, right);
3404 break;
3405 case MethodRecognizer::kFloat32x4InterleaveZWPairs:
3406 __ unpckhpd(left, right);
3407 break;
3408 default: UNREACHABLE();
3409 }
3410 }
3411
3412
3374 LocationSummary* Uint32x4BoolConstructorInstr::MakeLocationSummary() const { 3413 LocationSummary* Uint32x4BoolConstructorInstr::MakeLocationSummary() const {
3375 const intptr_t kNumInputs = 4; 3414 const intptr_t kNumInputs = 4;
3376 const intptr_t kNumTemps = 0; 3415 const intptr_t kNumTemps = 0;
3377 LocationSummary* summary = 3416 LocationSummary* summary =
3378 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); 3417 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
3379 summary->set_in(0, Location::RequiresRegister()); 3418 summary->set_in(0, Location::RequiresRegister());
3380 summary->set_in(1, Location::RequiresRegister()); 3419 summary->set_in(1, Location::RequiresRegister());
3381 summary->set_in(2, Location::RequiresRegister()); 3420 summary->set_in(2, Location::RequiresRegister());
3382 summary->set_in(3, Location::RequiresRegister()); 3421 summary->set_in(3, Location::RequiresRegister());
3383 summary->set_out(Location::RequiresFpuRegister()); 3422 summary->set_out(Location::RequiresFpuRegister());
(...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after
4839 PcDescriptors::kOther, 4878 PcDescriptors::kOther,
4840 locs()); 4879 locs());
4841 __ Drop(2); // Discard type arguments and receiver. 4880 __ Drop(2); // Discard type arguments and receiver.
4842 } 4881 }
4843 4882
4844 } // namespace dart 4883 } // namespace dart
4845 4884
4846 #undef __ 4885 #undef __
4847 4886
4848 #endif // defined TARGET_ARCH_IA32 4887 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698