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

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

Issue 2432903002: Revert "Add DoubleTestOp instruction" (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_dbc.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 3464 matching lines...) Expand 10 before | Expand all | Expand 10 after
3475 switch (op_kind()) { 3475 switch (op_kind()) {
3476 case Token::kADD: __ faddd(result, left, right); break; 3476 case Token::kADD: __ faddd(result, left, right); break;
3477 case Token::kSUB: __ fsubd(result, left, right); break; 3477 case Token::kSUB: __ fsubd(result, left, right); break;
3478 case Token::kMUL: __ fmuld(result, left, right); break; 3478 case Token::kMUL: __ fmuld(result, left, right); break;
3479 case Token::kDIV: __ fdivd(result, left, right); break; 3479 case Token::kDIV: __ fdivd(result, left, right); break;
3480 default: UNREACHABLE(); 3480 default: UNREACHABLE();
3481 } 3481 }
3482 } 3482 }
3483 3483
3484 3484
3485 LocationSummary* DoubleTestOpInstr::MakeLocationSummary(Zone* zone,
3486 bool opt) const {
3487 const intptr_t kNumInputs = 1;
3488 const intptr_t kNumTemps = 0;
3489 LocationSummary* summary = new(zone) LocationSummary(
3490 zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
3491 summary->set_in(0, Location::RequiresFpuRegister());
3492 summary->set_out(0, Location::RequiresRegister());
3493 return summary;
3494 }
3495
3496
3497 void DoubleTestOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3498 ASSERT(compiler->is_optimizing());
3499 const VRegister value = locs()->in(0).fpu_reg();
3500 const Register result = locs()->out(0).reg();
3501 if (op_kind() == MethodRecognizer::kDouble_getIsNaN) {
3502 __ fcmpd(value, value);
3503 __ LoadObject(result, Bool::False());
3504 __ LoadObject(TMP, Bool::True());
3505 __ csel(result, TMP, result, VS);
3506 } else {
3507 ASSERT(op_kind() == MethodRecognizer::kDouble_getIsInfinite);
3508 __ vmovrd(result, value, 0);
3509 // Mask off the sign.
3510 __ AndImmediate(result, result, 0x7FFFFFFFFFFFFFFFLL);
3511 // Compare with +infinity.
3512 __ CompareImmediate(result, 0x7FF0000000000000LL);
3513 __ LoadObject(result, Bool::False());
3514 __ LoadObject(TMP, Bool::True());
3515 __ csel(result, TMP, result, EQ);
3516 }
3517 }
3518
3519
3520 LocationSummary* BinaryFloat32x4OpInstr::MakeLocationSummary(Zone* zone, 3485 LocationSummary* BinaryFloat32x4OpInstr::MakeLocationSummary(Zone* zone,
3521 bool opt) const { 3486 bool opt) const {
3522 const intptr_t kNumInputs = 2; 3487 const intptr_t kNumInputs = 2;
3523 const intptr_t kNumTemps = 0; 3488 const intptr_t kNumTemps = 0;
3524 LocationSummary* summary = new(zone) LocationSummary( 3489 LocationSummary* summary = new(zone) LocationSummary(
3525 zone, kNumInputs, kNumTemps, LocationSummary::kNoCall); 3490 zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
3526 summary->set_in(0, Location::RequiresFpuRegister()); 3491 summary->set_in(0, Location::RequiresFpuRegister());
3527 summary->set_in(1, Location::RequiresFpuRegister()); 3492 summary->set_in(1, Location::RequiresFpuRegister());
3528 summary->set_out(0, Location::RequiresFpuRegister()); 3493 summary->set_out(0, Location::RequiresFpuRegister());
3529 return summary; 3494 return summary;
(...skipping 2285 matching lines...) Expand 10 before | Expand all | Expand 10 after
5815 1, 5780 1,
5816 locs()); 5781 locs());
5817 __ Drop(1); 5782 __ Drop(1);
5818 __ Pop(result); 5783 __ Pop(result);
5819 } 5784 }
5820 5785
5821 5786
5822 } // namespace dart 5787 } // namespace dart
5823 5788
5824 #endif // defined TARGET_ARCH_ARM64 5789 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698