[all-commits] [llvm/llvm-project] b9d535: [RISCV] Add test showing the current extern_weak l...
Jessica Clarke via All-commits
all-commits at lists.llvm.org
Wed May 31 10:48:35 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b9d5351be17b6562b461f9cded2f6bcecba28f26
https://github.com/llvm/llvm-project/commit/b9d5351be17b6562b461f9cded2f6bcecba28f26
Author: Jessica Clarke <jrtc27 at jrtc27.com>
Date: 2023-05-31 (Wed, 31 May 2023)
Changed paths:
M llvm/test/CodeGen/RISCV/codemodel-lowering.ll
Log Message:
-----------
[RISCV] Add test showing the current extern_weak lowering
Reviewed By: asb, MaskRay
Differential Revision: https://reviews.llvm.org/D107279
Commit: 9b55e5d42067c26c633298bbaca0c2802afe95ed
https://github.com/llvm/llvm-project/commit/9b55e5d42067c26c633298bbaca0c2802afe95ed
Author: Jessica Clarke <jrtc27 at jrtc27.com>
Date: 2023-05-31 (Wed, 31 May 2023)
Changed paths:
M llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
M llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
M llvm/lib/Target/RISCV/RISCVISelLowering.h
M llvm/lib/Target/RISCV/RISCVInstrInfo.td
M llvm/test/MC/RISCV/rvi-pseudos-invalid.s
M llvm/test/MC/RISCV/rvi-pseudos.s
Log Message:
-----------
[RISCV] Add new lga pseudoinstruction
This mirrors lla and is always GOT-relative, allowing an explicit
request to use the GOT without having to expand the instruction. This
then means la is just defined in terms of lla and lga in the assembler,
based on whether PIC is enabled, and at the codegen level we replace la
entirely with lga since we only ever use la there when we want to load
from the GOT (and assert that to be the case).
See https://github.com/riscv-non-isa/riscv-asm-manual/issues/50
Reviewed By: asb, MaskRay
Differential Revision: https://reviews.llvm.org/D107278
Commit: a178ba9fbd0a27057dc2fa4cb53c76caa013caac
https://github.com/llvm/llvm-project/commit/a178ba9fbd0a27057dc2fa4cb53c76caa013caac
Author: Jessica Clarke <jrtc27 at jrtc27.com>
Date: 2023-05-31 (Wed, 31 May 2023)
Changed paths:
M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
M llvm/lib/Target/RISCV/RISCVISelLowering.h
M llvm/test/CodeGen/RISCV/codemodel-lowering.ll
Log Message:
-----------
[RISCV] Lower extern_weak symbols using the GOT for the medany model
Such symbols may be undefined at link time and thus resolve to 0, which
may be further than 2GiB away from PC, causing the immediate to be out
of range for PC-relative addressing. Using the GOT avoids this, and is
the approach taken by AArch64.
Reviewed By: asb, MaskRay, arichardson
Differential Revision: https://reviews.llvm.org/D107280
Compare: https://github.com/llvm/llvm-project/compare/2e4e21847432...a178ba9fbd0a
More information about the All-commits
mailing list