This is an archive of the discontinued LLVM Phabricator instance.

[RISCV][MC] Tighten up checking of sybol operands to lui and auipc
ClosedPublic

Authored by asb on Sep 6 2018, 6:47 AM.

Details

Summary

Reject bare symbols and accept only %pcrel_hi(sym) for auipc and %hi(sym) for lui. Also test valid operand modifiers in rv32i-valid.s.

Note this is slightly stricter than gas, which will accept either %pcrel_hi or %hi for both lui and auipc.

Diff Detail

Event Timeline

asb created this revision.Sep 6 2018, 6:47 AM

LGTM, verified this patch with the fuzzer tool.

This revision was not accepted when it landed; it landed in state Needs Review.Sep 18 2018, 8:12 AM
This revision was automatically updated to reflect the committed changes.