diff options
author | Arthur Eubanks <aeubanks@google.com> | 2023-08-31 10:13:20 -0700 |
---|---|---|
committer | Arthur Eubanks <aeubanks@google.com> | 2023-08-31 14:13:38 -0700 |
commit | 2a2f02e19f7737966592f24aa4354286d9756bd9 (patch) | |
tree | 18f5cef77e5916e77edc80c00a9fb8f2c1e091c8 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | |
parent | 8399f3735a8f443fc0a3b828345eaccd8db969b8 (diff) | |
download | llvm-2a2f02e19f7737966592f24aa4354286d9756bd9.zip llvm-2a2f02e19f7737966592f24aa4354286d9756bd9.tar.gz llvm-2a2f02e19f7737966592f24aa4354286d9756bd9.tar.bz2 |
[X86] Use 64-bit jump table entries for large code model PIC
With the large code model, the label difference may not fit into 32 bits.
Even if we assume that any individual function is no larger than 2^32
and use a difference from the function entry to the target destination,
things like BOLT can rearrange blocks (even if BOLT doesn't necessarily
work with the large code model right now).
set directives avoid static relocations in some 32-bit entry cases, but
don't worry about set directives for 64-bit jump table entries (we can
do that later if somebody really cares about it).
check-llvm in a bootstrapped clang with the large code model passes.
Fixes #62894
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D159297
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index 47a18ec..cc68991 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -3545,6 +3545,7 @@ void CodeViewDebug::collectDebugInfoForJumpTables(const MachineFunction *MF, break; case MachineJumpTableInfo::EK_Inline: case MachineJumpTableInfo::EK_LabelDifference32: + case MachineJumpTableInfo::EK_LabelDifference64: // Ask the AsmPrinter. std::tie(Base, BaseOffset, Branch, EntrySize) = Asm->getCodeViewJumpTableInfo(JumpTableIndex, &BranchMI, Branch); |