Index: src/arm64/macro-assembler-arm64.cc |
diff --git a/src/arm64/macro-assembler-arm64.cc b/src/arm64/macro-assembler-arm64.cc |
index 7279319aacb68dc0adfe8efb2148e336d3d5d6b7..d35e69ca1934166aa73d7bf5be1c1d8d1ca2dd27 100644 |
--- a/src/arm64/macro-assembler-arm64.cc |
+++ b/src/arm64/macro-assembler-arm64.cc |
@@ -2343,6 +2343,16 @@ void MacroAssembler::JumpIfMinusZero(DoubleRegister input, |
} |
+void MacroAssembler::JumpIfMinusZero(Register input, |
+ Label* on_negative_zero) { |
+ ASSERT(input.Is64Bits()); |
+ // Floating point value is in an integer register. Detect -0.0 by subtracting |
+ // 1 (cmp), which will cause overflow. |
+ Cmp(input, 1); |
+ B(vs, on_negative_zero); |
+} |
+ |
+ |
void MacroAssembler::ClampInt32ToUint8(Register output, Register input) { |
// Clamp the value to [0..255]. |
Cmp(input.W(), Operand(input.W(), UXTB)); |