[all-commits] [llvm/llvm-project] b0ef20: [X86] Fix position-independent TType encoding

Harald van Dijk via All-commits all-commits at lists.llvm.org
Mon May 10 09:05:15 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b0ef2070bc7da2b458fb15b9413d9e90abc71759
      https://github.com/llvm/llvm-project/commit/b0ef2070bc7da2b458fb15b9413d9e90abc71759
  Author: Harald van Dijk <harald at gigawatt.nl>
  Date:   2021-05-10 (Mon, 10 May 2021)

  Changed paths:
    M llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
    M llvm/test/CodeGen/X86/gcc_except_table_bb_sections.ll

  Log Message:
  -----------
  [X86] Fix position-independent TType encoding

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 address will fit in 4 bytes.
For X32, we cannot use 64-bit relocations.

Fixes PR50148.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D102132




More information about the All-commits mailing list