[PATCH] D76575: [LLD][ELF][ARM] Replace assembler files with yaml
Peter Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 25 02:08:16 PDT 2020
psmith added a comment.
In D76575#1940524 <https://reviews.llvm.org/D76575#1940524>, @MaskRay wrote:
> In D76575#1938715 <https://reviews.llvm.org/D76575#1938715>, @psmith wrote:
>
> > Thanks for the comments, I'll do my best to trim down the yaml and resubmit tomorrow.
>
>
> Wait. Sorry that I only recalled the `.reloc` directive after you had started to work on yaml2obj tests. In an assembly test, a `.section` directive corresponds to several lines in a YAML. A symbol requires one or two lines in an assembly while it may require up to 5 lines in a YAML.
>
> I created D76746 <https://reviews.llvm.org/D76746> to generalize `.reloc`. With this patch, we can probably write:
>
> .globl bar
> bar:
> adr r0, bar; .reloc 0, R_ARM_ALU_PC_G0, bar
>
I think it will be close. As the adr and ldr are pseudo instructions I think they will create a fixup anyway, so we'll need something like:
.global bar
fake: adr, r0, fake // fixup resolves at assembly time to the pc-bias
.reloc 0, R_ARM_ALU_PC_G0, bar // relocation created to be resolved at link time
Or use .inst, but this is still smaller than using .yaml.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76575/new/
https://reviews.llvm.org/D76575
More information about the llvm-commits
mailing list