This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] implemented assembler pseudo floating point instructions
ClosedPublic

Authored by niosHD on Dec 11 2017, 8:24 AM.

Details

Summary

Adds the assembler aliases for the floating point instructions
which can be mapped to a single canonical instruction. The missing
pseudo instructions (flw, fld, fsw, fsd) are marked as TODO. Other
things, like for example PCREL_LO, have to be implemented first.

This patch builds upon D40902.

Diff Detail

Repository
rL LLVM

Event Timeline

niosHD created this revision.Dec 11 2017, 8:24 AM
asb accepted this revision.Dec 13 2017, 3:27 AM

Thanks, this looks good. Checking this patch also unearthed a GNU binutils bug (lack of support for fsrmi and fsflagsi - filed https://sourceware.org/bugzilla/show_bug.cgi?id=22599).

This revision is now accepted and ready to land.Dec 13 2017, 3:27 AM
This revision was automatically updated to reflect the committed changes.

Great. I am going to work on the patch which enables aliases by default and updates the tests next. Is it preferred that only the RUN lines are updated to disable aliases in the already existing tests or should the actual content of the tests be updated with aliases?

asb added a comment.Dec 13 2017, 5:03 AM

Great. I am going to work on the patch which enables aliases by default and updates the tests next. Is it preferred that only the RUN lines are updated to disable aliases in the already existing tests or should the actual content of the tests be updated with aliases?

I think keep the standard test/MC/RISCV/ tests (such as rv32i-valid.s) without aliases, but refresh the CodeGen tests (which should be trivial using update_llc_test_checks.py). The testing of the alias to allow rounding mode not to be explicitly specified should probably move to rvf-aliases-valid.s and rvd-aliases-valid.s

Thanks!