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

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

Issue 13867006: Inline binary Float32x4 ops. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 2797 matching lines...) Expand 10 before | Expand all | Expand 10 after
2808 switch (op_kind()) { 2808 switch (op_kind()) {
2809 case Token::kADD: __ addsd(left, right); break; 2809 case Token::kADD: __ addsd(left, right); break;
2810 case Token::kSUB: __ subsd(left, right); break; 2810 case Token::kSUB: __ subsd(left, right); break;
2811 case Token::kMUL: __ mulsd(left, right); break; 2811 case Token::kMUL: __ mulsd(left, right); break;
2812 case Token::kDIV: __ divsd(left, right); break; 2812 case Token::kDIV: __ divsd(left, right); break;
2813 default: UNREACHABLE(); 2813 default: UNREACHABLE();
2814 } 2814 }
2815 } 2815 }
2816 2816
2817 2817
2818 LocationSummary* BinaryFloat32x4OpInstr::MakeLocationSummary() const {
2819 const intptr_t kNumInputs = 2;
2820 const intptr_t kNumTemps = 0;
2821 LocationSummary* summary =
2822 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
2823 summary->set_in(0, Location::RequiresFpuRegister());
2824 summary->set_in(1, Location::RequiresFpuRegister());
2825 summary->set_out(Location::SameAsFirstInput());
2826 return summary;
2827 }
2828
2829
2830 void BinaryFloat32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2831 XmmRegister left = locs()->in(0).fpu_reg();
2832 XmmRegister right = locs()->in(1).fpu_reg();
2833
2834 ASSERT(locs()->out().fpu_reg() == left);
2835
2836 switch (op_kind()) {
2837 case Token::kADD: __ addps(left, right); break;
2838 case Token::kSUB: __ subps(left, right); break;
2839 case Token::kMUL: __ mulps(left, right); break;
2840 case Token::kDIV: __ divps(left, right); break;
2841 default: UNREACHABLE();
2842 }
2843 }
2844
2818 LocationSummary* MathSqrtInstr::MakeLocationSummary() const { 2845 LocationSummary* MathSqrtInstr::MakeLocationSummary() const {
2819 const intptr_t kNumInputs = 1; 2846 const intptr_t kNumInputs = 1;
2820 const intptr_t kNumTemps = 0; 2847 const intptr_t kNumTemps = 0;
2821 LocationSummary* summary = 2848 LocationSummary* summary =
2822 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); 2849 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
2823 summary->set_in(0, Location::RequiresFpuRegister()); 2850 summary->set_in(0, Location::RequiresFpuRegister());
2824 summary->set_out(Location::RequiresFpuRegister()); 2851 summary->set_out(Location::RequiresFpuRegister());
2825 return summary; 2852 return summary;
2826 } 2853 }
2827 2854
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
3944 PcDescriptors::kOther, 3971 PcDescriptors::kOther,
3945 locs()); 3972 locs());
3946 __ Drop(2); // Discard type arguments and receiver. 3973 __ Drop(2); // Discard type arguments and receiver.
3947 } 3974 }
3948 3975
3949 } // namespace dart 3976 } // namespace dart
3950 3977
3951 #undef __ 3978 #undef __
3952 3979
3953 #endif // defined TARGET_ARCH_IA32 3980 #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