You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is useful for cases where compilers and/or assembly writers want to force the use of a GOT. For example, this could be used to address [1], but more generally it's a useful thing to have, and is a strange hole in the set of pseudoinstructions provided.
Whilst here, alter the description of "la" to not mention absolute. All addresses are absolute, but highlighting it for "la" specifically is confusing as it potentially implies that it's using an absolute lui/addi sequence rather than a PC-relative sequence.
I have not yet created patches against riscv-asm-manual and riscv-elf-psabi-doc. However, those are already outdated and only mention la without lla. Defining lga will also make it far less confusing to fix that; then, lla and lga can be documented individually, with la simply saying it's equivalent to the relevant one depending on -fPIC.
The text was updated successfully, but these errors were encountered:
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 riscv-non-isa/riscv-asm-manual#50
Reviewed By: asb, MaskRay
Differential Revision: https://reviews.llvm.org/D107278
Following is a duplicate of @jrtc27's proposal from riscv/riscv-isa-manual#539.
This is useful for cases where compilers and/or assembly writers want to force the use of a GOT. For example, this could be used to address [1], but more generally it's a useful thing to have, and is a strange hole in the set of pseudoinstructions provided.
Whilst here, alter the description of "la" to not mention absolute. All addresses are absolute, but highlighting it for "la" specifically is confusing as it potentially implies that it's using an absolute lui/addi sequence rather than a PC-relative sequence.
[1] riscv-non-isa/riscv-elf-psabi-doc#126
I have not yet created patches against riscv-asm-manual and riscv-elf-psabi-doc. However, those are already outdated and only mention
la
withoutlla
. Defininglga
will also make it far less confusing to fix that; then,lla
andlga
can be documented individually, withla
simply saying it's equivalent to the relevant one depending on -fPIC.The text was updated successfully, but these errors were encountered: