commit | 378535f277b31e28f74cc65df6876c616beb04b4 | [log] [tgz] |
---|---|---|
author | mengqinggang <mengqinggang@loongson.cn> | Sat Jul 15 17:17:12 2023 +0800 |
committer | liuzhensong <liuzhensong@loongson.cn> | Mon Jul 24 11:22:42 2023 +0800 |
tree | 1e69f4f0e61732e392ec683efe59fb1ab0d30046 | |
parent | 5cbe549257b0aed1b615714e74bb6a3f066f3253 [diff] |
LoongArch: Fix instruction immediate bug caused by sign-extend For extreme code mode, the instruction sequences is pcalau12i $t0, hi20 addi.d $t1, $zero, lo12 lu32i.d $t1, lo20 lu52i.d $t1, hi12 add.d $t1, $t0, $t1 If lo12 > 0x7ff, hi20 need to add 0x1, lo20 need to sub 0x1. If hi20 > 0x7ffff, lo20 need to add 0x1. bfd/ChangeLog: * elfnn-loongarch.c (RELOCATE_CALC_PC32_HI20): Redefined. (RELOCATE_CALC_PC64_HI32): Redefined.