[RISCV][MC] Reject bare symbols for the simm12 operand type
authorAlex Bradbury <asb@lowrisc.org>
Tue, 18 Sep 2018 15:13:29 +0000 (15:13 +0000)
committerAlex Bradbury <asb@lowrisc.org>
Tue, 18 Sep 2018 15:13:29 +0000 (15:13 +0000)
commit7d0e18d0dd287eefcd379c2f3693c373ae927071
tree872640b71d6d4a7083c328ae5ab2e8f3b1149b7a
parent74340f1805443cdc356c8fd7c8e4a25eb396b2b4
[RISCV][MC] Reject bare symbols for the simm12 operand type

addi a0, a0, foo and lw a0, foo(a0) and similar are now rejected. An explicit
%lo and %pcrel_lo modifier is required. This matches gas behaviour.

llvm-svn: 342487
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
llvm/test/MC/RISCV/rv32d-invalid.s
llvm/test/MC/RISCV/rv32f-invalid.s
llvm/test/MC/RISCV/rv32i-invalid.s
llvm/test/MC/RISCV/rv32i-valid.s
llvm/test/MC/RISCV/rv64i-invalid.s