[PATCH] D130238: [LoongArch] Parse LoongArch base ABI in ObjectYAML and llvm-readobj
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 22 00:15:02 PDT 2022
jhenderson added inline comments.
================
Comment at: llvm/test/tools/llvm-readobj/ELF/loongarch-eflags.test:64
+ Machine: EM_LOONGARCH
+ Flags: [ EF_LOONGARCH_BASE_ABI_LP64S ]
+...
----------------
jhenderson wrote:
> Didn't see this earlier, sorry, but yaml2obj has an option (which might not have been available when existing tests were written) to allow text substitution within the YAML, a bit like FileCheck's -D option. Approximate example (not tested, but should be enough of an idea to get it to work):
>
> ```
> # RUN: yaml2obj %s -o %t-lp64s -DFLAG=LP64S
>
> ...
>
> --- !ELF
> FileHeader:
> Class: ELFCLASS64
> Data: ELFDATA2LSB
> Type: ET_EXEC
> Machine: EM_LOONGARCH
> Flags: [ EF_LOONGARCH_BASE_ABI_[[FLAG]] ]
> ```
> This will allow you to only have one YAML block.
Missed that there was different Class values in some of the YAML blocks, but that can be solved in the same manner with a different variable.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130238/new/
https://reviews.llvm.org/D130238
More information about the llvm-commits
mailing list