[llvm] [M68k] implement -mxgot (PR #119803)
John Paul Adrian Glaubitz via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 10 00:58:38 PST 2026
glaubitz wrote:
OK, the cleaned up version doesn't look promising, so I leave it here for now. However, let me add some words.
The problem is that we need to address several occasions where 16-bit relative addresses are used which cause overflows, those are (from memory):
- Local Variables
- GOT entries
- Jumps
All these need to be handled in `M68kISelLowering.cpp`. Additionally, changes to the instruction selector and TableGen code where necessary to make sure that the proper instructions are picked when `-mxgot` is passed for jumps with 32-bit offsets.
Since the changes above are the result of hours of debugging with Google Gemini, some of the changes might not be necessary and can be omitted from the patch. But I think the patch itself can be used as a basis to understand what changes are necessary and on top of this change, a clean patch can be written.
https://github.com/llvm/llvm-project/pull/119803
More information about the llvm-commits
mailing list