[PATCH] D48836: [cfi-verify] Support AArch64.

Joel Galenson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 6 14:44:55 PDT 2018


jgalenson updated this revision to Diff 154459.
jgalenson marked 5 inline comments as done.
jgalenson added a comment.

I believe this addresses all of the existing comments except for how to handle detecting traps.  I see Vlad just commented that he doesn't have an opinion, so if there are no further opinions I'll just play around and do what I feel is best.  The current approach should still work, of course.

However, I was not sure how to create a vtable.cc lit-based regression test.  When I compile my simple virtual call test, it creates separate sections for main and each virtual method, each of which starts at 0.  This means that FileAnalysis::parseSectionContents will complain because multiple instructions have address 0.  This happens even on x86, so I don't think it's AArch64-specific.  I think the problem is that llvm-mc isn't producing a fully valid ELF file, but I'm not sure how to do that without a linker.  For now I added a number of unit tests to test this case instead.


https://reviews.llvm.org/D48836

Files:
  lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp
  test/tools/llvm-cfi-verify/AArch64/protected-lineinfo.s
  test/tools/llvm-cfi-verify/AArch64/unprotected-lineinfo.s
  tools/llvm-cfi-verify/lib/FileAnalysis.cpp
  tools/llvm-cfi-verify/lib/FileAnalysis.h
  unittests/tools/llvm-cfi-verify/FileAnalysis.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48836.154459.patch
Type: text/x-patch
Size: 31706 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180706/4e93bb39/attachment.bin>


More information about the llvm-commits mailing list