[PATCH] D149091: [Object] Recognize ARM64EC binaries in COFFObjectFile::getMachine.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 5 01:52:10 PDT 2023


jhenderson accepted this revision.
jhenderson added a comment.
This revision is now accepted and ready to land.

LGTM, with nits.



================
Comment at: llvm/test/tools/llvm-objdump/COFF/arm64ec.yaml:1
+# Check that AMD64 image file with CHPE data is recognized as ARM64EC.
+# RUN: yaml2obj %s -o %t -DMACHINE=IMAGE_FILE_MACHINE_AMD64
----------------
Nit: newer tools tests use `##` for comments, to distinguish them from lit and FileCheck directives.


================
Comment at: llvm/test/tools/llvm-objdump/COFF/arm64ec.yaml:5
+# RUN: llvm-readobj --coff-load-config %t | FileCheck --check-prefix=CODEMAP %s
+# ARM64EC: file format coff-arm64ec
+
----------------
I would consider reordering your CHECK/RUN lines for a bit of improved readability/comparability, since you're partly sharing them (I also added some extra whitespace to make things nicely line up):
```
# RUN: yaml2obj %s -o %t -DMACHINE=IMAGE_FILE_MACHINE_AMD64
# RUN: llvm-objdump -d %t | FileCheck --check-prefixes=DISASM,ARM64EC %s
# RUN: llvm-readobj --coff-load-config %t | FileCheck --check-prefix=CODEMAP %s

# Check that ARM64 image file with CHPE data is recognized as ARM64X.
# RUN: yaml2obj %s -o %t -DMACHINE=IMAGE_FILE_MACHINE_ARM64
# RUN: llvm-objdump -d %t | FileCheck --check-prefixes=DISASM,ARM64X %s
# RUN: llvm-readobj --coff-load-config %t | FileCheck --check-prefix=CODEMAP %s

# ARM64EC: file format coff-arm64ec
# ARM64X:  file format coff-arm64x

# DISASM: ...
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149091/new/

https://reviews.llvm.org/D149091



More information about the llvm-commits mailing list