This is an archive of the discontinued LLVM Phabricator instance.

[VE] Support relocation information in MC layer
ClosedPublic

Authored by kaz7 on Jun 10 2020, 5:09 AM.

Details

Summary

Change VEAsmParser to support identification with relocation information
in assmebler. Change VEAsmBackend to support relocation information in
MC layer. Change VEDisassembler and VEMCCodeEmitter to support binary
generation of branch target operands. Add REFLONG fixup and variant kind
to support new R_VE_REFLONG ELF symbol. And, add regression test in both
MC and CodeGen to check binary genaration with relocation information.

Diff Detail

Event Timeline

kaz7 created this revision.Jun 10 2020, 5:09 AM

LGTM with one minor nit. Thanks!

llvm/lib/Target/VE/AsmParser/VEAsmParser.cpp
969

const auto&? In any case, l968 and l973 should use the same types (currently the above uses a * whereas it's a & below).

kaz7 planned changes to this revision.Jun 10 2020, 8:34 AM
kaz7 marked an inline comment as done.

I'll check manuals of assembler for Aurora and update this patch. Thanks.

llvm/lib/Target/VE/AsmParser/VEAsmParser.cpp
969

Thanks. I've missed it again. On the other hand, I may remove this function based on Sparc implementation. While I've checking this function based on your suggestion, I've noticed this function is used to convert @hi to @pc_hi or @got_hi but the Nas doesn't have such functionality. I'll check more deeply.

kaz7 updated this revision to Diff 270101.Jun 11 2020, 4:33 AM

Update following suggestions.
Also check all modified functions again.

kaz7 updated this revision to Diff 270294.Jun 11 2020, 8:28 PM

Rebase to the latest.
Remove unnecessary include file.

simoll accepted this revision.Jun 15 2020, 1:49 AM

LGTM. Thanks!

This revision is now accepted and ready to land.Jun 15 2020, 1:49 AM
This revision was automatically updated to reflect the committed changes.