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

Unified Diff: runtime/vm/intrinsifier_arm64.cc

Issue 2423843002: Add DoubleTestOp instruction (Closed)
Patch Set: Address comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/intrinsifier_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_arm64.cc
diff --git a/runtime/vm/intrinsifier_arm64.cc b/runtime/vm/intrinsifier_arm64.cc
index f9cade23e23862b21a0e420bfca5e49edc80bee3..050ae7361cdaac8d2c7ee73dfc3c6982d9a89c90 100644
--- a/runtime/vm/intrinsifier_arm64.cc
+++ b/runtime/vm/intrinsifier_arm64.cc
@@ -1507,7 +1507,6 @@ void Intrinsifier::DoubleFromInteger(Assembler* assembler) {
void Intrinsifier::Double_getIsNaN(Assembler* assembler) {
- Label is_true;
__ ldr(R0, Address(SP, 0 * kWordSize));
__ LoadDFieldFromOffset(V0, R0, Double::value_offset());
__ fcmpd(V0, V0);
@@ -1518,6 +1517,20 @@ void Intrinsifier::Double_getIsNaN(Assembler* assembler) {
}
+void Intrinsifier::Double_getIsInfinite(Assembler* assembler) {
+ __ ldr(R0, Address(SP, 0 * kWordSize));
+ __ LoadFieldFromOffset(R0, R0, Double::value_offset());
+ // Mask off the sign.
+ __ AndImmediate(R0, R0, 0x7FFFFFFFFFFFFFFFLL);
+ // Compare with +infinity.
+ __ CompareImmediate(R0, 0x7FF0000000000000LL);
+ __ LoadObject(R0, Bool::False());
+ __ LoadObject(TMP, Bool::True());
+ __ csel(R0, TMP, R0, EQ);
+ __ ret();
+}
+
+
void Intrinsifier::Double_getIsNegative(Assembler* assembler) {
const Register false_reg = R0;
const Register true_reg = R2;
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/intrinsifier_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698