This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Parse RISC-V eflags in ObjectYAML
ClosedPublic

Authored by PkmX on Sep 27 2017, 3:43 AM.

Details

Summary

This depends on: D38310: [RISCV] Define RISC-V specific eflags

This is needed because lld testsuite uses yaml2obj/obj2yaml to assemble/disassemble ELF files (we can't use llvm-as/llvm-objdump as it is still far from complete).

Diff Detail

Repository
rL LLVM

Event Timeline

PkmX created this revision.Sep 27 2017, 3:43 AM
asb accepted this revision.Sep 28 2017, 12:45 AM

Thanks. Implementation wise this looks good. Could you please add a test along the lines of test/Object/Mips/elf-flags.yaml?

This revision is now accepted and ready to land.Sep 28 2017, 12:45 AM
asb requested changes to this revision.Sep 28 2017, 12:45 AM

Sorry, didn't mean to hit accept.

This revision now requires changes to proceed.Sep 28 2017, 12:45 AM
PkmX updated this revision to Diff 116954.Sep 28 2017, 2:57 AM
PkmX edited edge metadata.

Added RISC-V tests for ObjectYAML

asb added a comment.Sep 28 2017, 11:25 AM

Are you able to add in an llvm-readobj test, just like the Mips elf-flags.yaml I referenced before?

PkmX added a comment.Sep 28 2017, 12:16 PM

llvm-readobj would also need to be modified to recognize RISC-V eflags, and I think it is better to keep that in a separate commit.

asb accepted this revision.Sep 28 2017, 1:02 PM

My mistake, I'd assumed incorrectly there was a little more code sharing going on here.

Looks good to me.

This revision is now accepted and ready to land.Sep 28 2017, 1:02 PM
This revision was automatically updated to reflect the committed changes.