diff options
| author | Fangrui Song <i@maskray.me> | 2025-05-03 22:50:27 -0700 |
|---|---|---|
| committer | Fangrui Song <i@maskray.me> | 2025-05-03 22:50:28 -0700 |
| commit | 1ec9dd256ea287796261ba88d7bdfbeaba38343d (patch) | |
| tree | 52049ac95617ca95153661068a2eeeccff7c648b /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | c22bc215ac9496ee5f6e55ba0b0904dc825c6f56 (diff) | |
Sparc: Refactor R_SPARC_13/R_SPARC_GOT13 handling and fix a bug referencing absolute symbol
https://reviews.llvm.org/D47136 did not correctly handle `ld [%i0 + abs], %o0; abs = 7`
To fix it and make fixup handling less hacky,
* Change TableGen MEMri to use simm13Op instead of i32imm
* Emit a fixup of kind fixup_sparc_13 in SparcMCCodeEmitter::getSImm13OpValue
* Convert fixup_sparc_13 to either R_SPARC_13/R_SPARC_GOT13 in getRelocType
This postpones 13/GOT13 decision to relocation generation, ensuring that
we suppress the relocation when referencing an absolute symbol, matching
gas.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
