[PATCH] D102132: [X86] Fix position-independent TType encoding

Harald van Dijk via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 9 07:02:29 PDT 2021


hvdijk created this revision.
hvdijk added reviewers: craig.topper, MaskRay.
hvdijk added a project: LLVM.
Herald added subscribers: pengfei, hiraditya, kristof.beyls.
hvdijk requested review of this revision.
Herald added a subscriber: llvm-commits.

The logic for x86_64 position-independent TType encodings was backwards, using 8 bytes where 4 were wanted and 4 where 8 were wanted. For regular x86_64, this was mostly harmless, exception tables are allowed to use 8-byte encodings even when it is not needed. For the large code model, and for X32, however, the generated exception tables were wrong. For the large code model, we cannot assume that the offset will fit in 4 bytes. For X32, we cannot use 64-bit relocations.

      

Fixes PR50148.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102132

Files:
  llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  llvm/test/CodeGen/X86/gcc_except_table_bb_sections.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102132.343910.patch
Type: text/x-patch
Size: 11234 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210509/81ac4e26/attachment.bin>


More information about the llvm-commits mailing list