aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineModuleInfo.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2025-03-29 11:08:13 -0700
committerGitHub <noreply@github.com>2025-03-29 11:08:13 -0700
commitfe6fb910df9d1b9a9e2e7a6e8228d020668e0129 (patch)
treeb03e644f0516ae2281f3354235c81e48f8ac891d /llvm/lib/CodeGen/MachineModuleInfo.cpp
parent666faa7fd98b7a58e089a38083f33c067ed5b955 (diff)
downloadllvm-fe6fb910df9d1b9a9e2e7a6e8228d020668e0129.zip
llvm-fe6fb910df9d1b9a9e2e7a6e8228d020668e0129.tar.gz
llvm-fe6fb910df9d1b9a9e2e7a6e8228d020668e0129.tar.bz2
[RISCV] Replace @plt/@gotpcrel in data directives with %pltpcrel %gotpcrel
clang -fexperimental-relative-c++-abi-vtables might generate `@plt` and `@gotpcrel` specifiers in data directives. The syntax is not used in humand-written assembly code, and is not supported by GNU assembler. Note: the `@plt` in `.word foo@plt` is different from the legacy `call func@plt` (where `@plt` is simply ignored). The `@plt` syntax was selected was simply due to a quirk of AsmParser: the syntax was supported by all targets until I updated it to be an opt-in feature in a0671758eb6e52a758bd1b096a9b421eec60204c RISC-V favors the `%specifier(expr)` syntax following MIPS and Sparc, and we should follow this convention. This PR adds support for `.word %pltpcrel(foo+offset)` and `.word %gotpcrel(foo)`, and drops `@plt` and `@gotpcrel`. * MCValue::SymA can no longer have a SymbolVariant. Add an assert similar to that of AArch64ELFObjectWriter.cpp before https://reviews.llvm.org/D81446 (see my analysis at https://maskray.me/blog/2025-03-16-relocation-generation-in-assemblers if intrigued) * `jump foo@plt, x31` now has a different diagnostic. Pull Request: https://github.com/llvm/llvm-project/pull/132569
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
0 files changed, 0 insertions, 0 deletions