[AArch64] Allow logical immediates to have all-1 in top bits
authorFangrui Song <maskray@google.com>
Tue, 10 Mar 2020 00:35:50 +0000 (17:35 -0700)
committerFangrui Song <maskray@google.com>
Mon, 6 Apr 2020 16:56:04 +0000 (09:56 -0700)
commita5d375e0cbc4abf6e318270a1bc9c1c0961ae565
tree786ba2222571a83dbb928819eebbe070ab1bb52c
parent7aba6a03331921aa10b023f1a7ec513faf18e3f9
[AArch64] Allow logical immediates to have all-1 in top bits

So that constant expressions like the following are permitted:

and w0, w0, #~(0xfe<<24)
and w1, w1, #~(0xff<<24)

The behavior matches GNU as (opcodes/aarch64-opc.c:aarch64_logical_immediate_p).

Reviewed By: sdesmalen

Differential Revision: https://reviews.llvm.org/D75885
llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
llvm/test/MC/AArch64/SVE/mov-diagnostics.s
llvm/test/MC/AArch64/SVE/mov.s
llvm/test/MC/AArch64/arm64-logical-encoding.s