From 5591e3d51d57d3a7dd2a50d5f5ddc540072586d0 Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Thu, 14 Jul 2016 17:04:34 +0000 Subject: [PATCH] ARM: fix vmov.i64 immediate validity check Typo meant we were only checking the low byte (repeatedly). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275437 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 2 +- test/MC/ARM/fp-const-errors.s | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index d368e2349b3..7d49302f9a9 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -1731,7 +1731,7 @@ public: 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/test/MC/ARM/fp-const-errors.s b/test/MC/ARM/fp-const-errors.s index 2a68ddbe727..a91799ba21d 100644 --- a/test/MC/ARM/fp-const-errors.s +++ b/test/MC/ARM/fp-const-errors.s @@ -20,3 +20,6 @@ fconsts s1, #1.0 fconstd d2, #1.0 @ CHECK: error: invalid floating point immediate + +vmov.i64 d0, 0x8000000000000000 +@ CHECK: error: invalid operand for instruction -- 2.11.0