Index: runtime/vm/intrinsifier_arm.cc |
diff --git a/runtime/vm/intrinsifier_arm.cc b/runtime/vm/intrinsifier_arm.cc |
index 7e9dc7c31aba418b3b6e1320b3b8a750da880bfb..80756ef1d9e8080861606f69fd6f0ca94fc04480 100644 |
--- a/runtime/vm/intrinsifier_arm.cc |
+++ b/runtime/vm/intrinsifier_arm.cc |
@@ -1422,6 +1422,31 @@ void Intrinsifier::Double_getIsNaN(Assembler* assembler) { |
} |
+void Intrinsifier::Double_getIsInfinite(Assembler* assembler) { |
+ if (TargetCPUFeatures::vfp_supported()) { |
+ __ ldr(R0, Address(SP, 0 * kWordSize)); |
+ // R1 <- value[0:31], R2 <- value[32:63] |
+ __ LoadFieldFromOffset(kWord, R1, R0, Double::value_offset()); |
+ __ LoadFieldFromOffset(kWord, R2, R0, Double::value_offset() + kWordSize); |
+ |
+ // If the low word isn't 0, then it isn't infinity. |
+ __ cmp(R1, Operand(0)); |
+ __ LoadObject(R0, Bool::False(), NE); |
+ __ bx(LR, NE); // Return if NE. |
+ |
+ // Mask off the sign bit. |
+ __ AndImmediate(R2, R2, 0x7FFFFFFF); |
+ // Compare with +infinity. |
+ __ CompareImmediate(R2, 0x7FF00000); |
+ __ LoadObject(R0, Bool::False(), NE); |
+ __ bx(LR, NE); |
+ |
+ __ LoadObject(R0, Bool::True()); |
+ __ Ret(); |
+ } |
+} |
+ |
+ |
void Intrinsifier::Double_getIsNegative(Assembler* assembler) { |
if (TargetCPUFeatures::vfp_supported()) { |
Label is_false, is_true, is_zero; |