]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/loong64: optimize the code logic of jump instructions
authorlimeidan <limeidan@loongson.cn>
Wed, 17 Jan 2024 09:49:37 +0000 (17:49 +0800)
committerabner chenc <chenguoqi@loongson.cn>
Thu, 1 Aug 2024 00:51:41 +0000 (00:51 +0000)
commit01ab9a016afe7239ed7b43cdd820103ec91aba09
treeaaf6827c763fb436185bc432239369581c0e793f
parent864513dda9d96dfd0fbdbe4c2b68ebbfa3d34bc7
cmd/internal/obj/loong64: optimize the code logic of jump instructions

If p.To.Sym is nil, that means we can get the target offset from
p.To.Target().pc - c.pc,only when p.To.Sym is not nil, we need relocation
to get the true address of target symbol.

Change-Id: Ied52f675c6aa6e8fb8d972b7699f5cadd1ecb268
Reviewed-on: https://go-review.googlesource.com/c/go/+/565627
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: sophie zhao <zhaoxiaolin@loongson.cn>
Reviewed-by: Qiqi Huang <huangqiqi@loongson.cn>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: abner chenc <chenguoqi@loongson.cn>
Reviewed-by: Meidan Li <limeidan@loongson.cn>
src/cmd/internal/obj/loong64/asm.go