[RISCV] Use custom operand parsing for FenceArg.
authorCraig Topper <craig.topper@sifive.com>
Mon, 30 Jan 2023 20:20:07 +0000 (12:20 -0800)
committerCraig Topper <craig.topper@sifive.com>
Mon, 30 Jan 2023 20:31:00 +0000 (12:31 -0800)
commitd558a70abf2624bf0b26fa8cd506277214fea197
tree54c455097741118f4a3a4c9f51e83cfda0c7ca8d
parent63178c36354881c3e3f3e3bbd716d8e4b3f38b07
[RISCV] Use custom operand parsing for FenceArg.

Rather than parsing a symbol and checking its name, look for an
identifier during parsing.

I've also handled the 0 immediate during parsing, though we could
let that go through the normal immediate parsing if we need to support
expressions that evaluate to 0. We don't have tests for that currently.

Reviewed By: asb, frasercrmck

Differential Revision: https://reviews.llvm.org/D142865
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
llvm/lib/Target/RISCV/RISCVInstrInfo.td