Skip to content
Snippets Groups Projects
Commit f7f56ded authored by Guoqi Chen's avatar Guoqi Chen Committed by Cherry Mui
Browse files

cmd/internal/obj/loong64: recheck jump offset boundary after auto-aligning loop heads

After the alignment of the loop header is performed, the offset of the checked
conditional branch instruction may overflow, so it needs to be checked again.

When checking whether the offset of the branch jump instruction overflows, it
can be classified and processed according to the range of the immediate field
of the specific instruction, which can reduce the introduction of unnecessary
jump instructions.

Fixes #61819

Change-Id: I772a5b5b8b8de21c78d7566be30be8ff65fdbce8
Reviewed-on: https://go-review.googlesource.com/c/go/+/519915


Reviewed-by: default avatarsophie zhao <zhaoxiaolin@loongson.cn>
Reviewed-by: default avatarMichael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: default avatarCherry Mui <cherryyz@google.com>
Reviewed-by: default avatarMeidan Li <limeidan@loongson.cn>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Run-TryBot: qiu laidongfeng2 <2645477756@qq.com>
Reviewed-by: default avatarWANG Xuerui <git@xen0n.name>
parent 59209c4b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment