You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before this change, many MCOperandPredicates accepted bare symbols but
there was no cohesive logic as to which did and which didn't, and it did
not correspond to where the parser did and did not accept bare symbols.
MCOperandPredicates are used by the assembly printer when choosing to
whether to use an alias, and by the assembler compression and
decompression mechanism. RISC-V uses both of these extensively.
Xqci had a bug with a compress pattern for `qc.e.li` (to `c.li`) which
was causing crashes because `RISCVMCCodeEmitter::getImmOpValue` could
not handle a bare symbol ref when encoding the `c.li` instruction.
This patch aligns the MCOperandPredicates with the predicates in the
RISC-V assembly parser, denying bare symbol references in places they
were accepted for aliases/compression in the past.
This is not NFC, as some assembly printing has changed with the `li`
alias for `addi`, but this seems very minor. The crash when assembling
`qc.e.li a0, undef` is now fixed.
0 commit comments