AArch64: disallow "fmov sD, #-0.0" during assembly.
authorTim Northover <tnorthover@apple.com>
Tue, 7 Apr 2015 22:49:47 +0000 (22:49 +0000)
committerTim Northover <tnorthover@apple.com>
Tue, 7 Apr 2015 22:49:47 +0000 (22:49 +0000)
commit112102c7fe7be6d3f322a07e0da00284284398c6
treecff943ee5118425ec230375a3f07e80b60de07f5
parent13c7f90285cdbeadb90a2834bb2a2e3c5884e24e
AArch64: disallow "fmov sD, #-0.0" during assembly.

We weren't checking the sign of the floating point immediate before translating
it to "fmov sD, wzr". Similarly for D-regs.

Technically "movi vD.2s, #0x80, lsl #24" would work most of the time, but it's
not a blessed alias (and I don't think it should be since people expect writing
sD to zero out the high lanes, and there's no dD equivalent). So an error it is.

rdar://20455398

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234372 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
test/MC/AArch64/arm64-fp-encoding-error.s [new file with mode: 0644]