llvm-project
bd6ed29f - [X86] Do not use movq in -mcmodel=kernel on an out of range abs global (#163323)

Commit
139 days ago
[X86] Do not use movq in -mcmodel=kernel on an out of range abs global (#163323) CFI can lead to some `relocation R_X86_64_32S out of range` errors when using thinlto. We have an instance of an `inline_bits` alias with a value of 0x8000008000000001 which cannot fit into a signed 32-bit reloc hence the error. This reloc is used because the instruction for reading the alias is `movq` which uses a signed 32-bit immediate. The proper instruction to use in this instance is `movabs` for the full 64-bit reloc. Under the kernel model, a signed 32-bit immediate was always used but if the target is a global with `absolue_symbol` we should reject the MOV64ri32. The pattern matching logic will eventually lead to a match for MOV64ri which emits the `movabs`.
Author
Parents
Loading