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

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

Issue 2433813002: Reland "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_x64.cc ('k') | runtime/vm/intrinsifier_arm64.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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 __ LoadDFromOffset(D0, R0, Double::value_offset() - kHeapObjectTag); 1415 __ LoadDFromOffset(D0, R0, Double::value_offset() - kHeapObjectTag);
1416 __ vcmpd(D0, D0); 1416 __ vcmpd(D0, D0);
1417 __ vmstat(); 1417 __ vmstat();
1418 __ LoadObject(R0, Bool::False(), VC); 1418 __ LoadObject(R0, Bool::False(), VC);
1419 __ LoadObject(R0, Bool::True(), VS); 1419 __ LoadObject(R0, Bool::True(), VS);
1420 __ Ret(); 1420 __ Ret();
1421 } 1421 }
1422 } 1422 }
1423 1423
1424 1424
1425 void Intrinsifier::Double_getIsInfinite(Assembler* assembler) {
1426 if (TargetCPUFeatures::vfp_supported()) {
1427 __ ldr(R0, Address(SP, 0 * kWordSize));
1428 // R1 <- value[0:31], R2 <- value[32:63]
1429 __ LoadFieldFromOffset(kWord, R1, R0, Double::value_offset());
1430 __ LoadFieldFromOffset(kWord, R2, R0, Double::value_offset() + kWordSize);
1431
1432 // If the low word isn't 0, then it isn't infinity.
1433 __ cmp(R1, Operand(0));
1434 __ LoadObject(R0, Bool::False(), NE);
1435 __ bx(LR, NE); // Return if NE.
1436
1437 // Mask off the sign bit.
1438 __ AndImmediate(R2, R2, 0x7FFFFFFF);
1439 // Compare with +infinity.
1440 __ CompareImmediate(R2, 0x7FF00000);
1441 __ LoadObject(R0, Bool::False(), NE);
1442 __ bx(LR, NE);
1443
1444 __ LoadObject(R0, Bool::True());
1445 __ Ret();
1446 }
1447 }
1448
1449
1425 void Intrinsifier::Double_getIsNegative(Assembler* assembler) { 1450 void Intrinsifier::Double_getIsNegative(Assembler* assembler) {
1426 if (TargetCPUFeatures::vfp_supported()) { 1451 if (TargetCPUFeatures::vfp_supported()) {
1427 Label is_false, is_true, is_zero; 1452 Label is_false, is_true, is_zero;
1428 __ ldr(R0, Address(SP, 0 * kWordSize)); 1453 __ ldr(R0, Address(SP, 0 * kWordSize));
1429 __ LoadDFromOffset(D0, R0, Double::value_offset() - kHeapObjectTag); 1454 __ LoadDFromOffset(D0, R0, Double::value_offset() - kHeapObjectTag);
1430 __ vcmpdz(D0); 1455 __ vcmpdz(D0);
1431 __ vmstat(); 1456 __ vmstat();
1432 __ b(&is_false, VS); // NaN -> false. 1457 __ b(&is_false, VS); // NaN -> false.
1433 __ b(&is_zero, EQ); // Check for negative zero. 1458 __ b(&is_zero, EQ); // Check for negative zero.
1434 __ b(&is_false, CS); // >= 0 -> false. 1459 __ b(&is_false, CS); // >= 0 -> false.
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
2128 __ ldr(R0, Address(R0, TimelineStream::enabled_offset())); 2153 __ ldr(R0, Address(R0, TimelineStream::enabled_offset()));
2129 __ cmp(R0, Operand(0)); 2154 __ cmp(R0, Operand(0));
2130 __ LoadObject(R0, Bool::True(), NE); 2155 __ LoadObject(R0, Bool::True(), NE);
2131 __ LoadObject(R0, Bool::False(), EQ); 2156 __ LoadObject(R0, Bool::False(), EQ);
2132 __ Ret(); 2157 __ Ret();
2133 } 2158 }
2134 2159
2135 } // namespace dart 2160 } // namespace dart
2136 2161
2137 #endif // defined TARGET_ARCH_ARM 2162 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/intrinsifier_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698