ARM: fix vmov.i64 immediate validity check
Typo meant we were only checking the low byte (repeatedly).
llvm-svn: 275437
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index d368e23..7d49302 100644
--- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -1731,7 +1731,7 @@
if (!CE) return false;
uint64_t Value = CE->getValue();
// i64 value with each byte being either 0 or 0xff.
- for (unsigned i = 0; i < 8; ++i)
+ for (unsigned i = 0; i < 8; ++i, Value >>= 8)
if ((Value & 0xff) != 0 && (Value & 0xff) != 0xff) return false;
return true;
}
diff --git a/llvm/test/MC/ARM/fp-const-errors.s b/llvm/test/MC/ARM/fp-const-errors.s
index 2a68ddb..a91799b 100644
--- a/llvm/test/MC/ARM/fp-const-errors.s
+++ b/llvm/test/MC/ARM/fp-const-errors.s
@@ -20,3 +20,6 @@
fconstd d2, #1.0
@ CHECK: error: invalid floating point immediate
+
+vmov.i64 d0, 0x8000000000000000
+@ CHECK: error: invalid operand for instruction