summaryrefslogtreecommitdiff
path: root/firmware/fw_base.ldS
diff options
context:
space:
mode:
authorVincent Chen <vincent.chen@sifive.com>2021-03-17 04:16:37 +0300
committerAnup Patel <anup@brainfault.org>2021-03-19 12:27:45 +0300
commit22d8ee9758128070aa838f7c8c46f9e50d6aaf5a (patch)
tree88720d8e0c1dd680d61cfe515dc0d5076c4f96c7 /firmware/fw_base.ldS
parentff5bd949d55b14e1d308288ace71366b090f822d (diff)
downloadopensbi-22d8ee9758128070aa838f7c8c46f9e50d6aaf5a.tar.xz
firmware: Use lla to access all global symbols
When OpenSBI is compiled as fPIE mode, the assembler will translate "la" to GOT reference pattern. It will cause to cost an additional load instruction when obtaining the symbol address. However, if the symbol locates within the positive or negative 2GB region, we can use "lla" instead of "la" to avoid unneeded GOT references. This patch assumes that the OpenSBI image excluding the payload does not exceed 2GB. Based on this assumption, all "la" instructions are replaced by "lla" to avoid performance degradation when compiling as fPIE mode. Signed-off-by: Vincent Chen <vincent.chen@sifive.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'firmware/fw_base.ldS')
0 files changed, 0 insertions, 0 deletions