]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/arm64: remove the transition from $0 to ZR
authoreric fang <eric.fang@arm.com>
Thu, 5 May 2022 07:46:05 +0000 (07:46 +0000)
committerEric Fang <eric.fang@arm.com>
Tue, 23 Aug 2022 06:11:32 +0000 (06:11 +0000)
commit9f0f87c806b7a11b2cb3ebcd02eac57ee389c43a
tree863f4ed6c3f96c332dc96bff0ccb23314b9451fe
parent0a52d80666ddaa557cec17ad9166e2514b0bb6d4
cmd/internal/obj/arm64: remove the transition from $0 to ZR

Previously we convert $0 to the ZR register for some reasons, which causes
two problems:
1. Confusion, the special case of the ZR register needs to be considered
when dealing with constants. For encoding, some places we encode ZR, and
some places we encode $0, although we have converted $0 to ZR.
2. Unexpected instruction format. All instructions that support ZR register
operands can be replaced by $0.

This patch removes this conversion. Note that this patch may cause previously
unintendedly supported instruction formats to no longer be supported.

Change-Id: I3d8d2c06711b7614a38191397da7776417f1861c
Reviewed-on: https://go-review.googlesource.com/c/go/+/404316
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Eric Fang <eric.fang@arm.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/asm/internal/asm/testdata/arm64.s
src/cmd/asm/internal/asm/testdata/arm64enc.s
src/cmd/internal/obj/arm64/a.out.go
src/cmd/internal/obj/arm64/anames7.go
src/cmd/internal/obj/arm64/asm7.go
src/cmd/internal/obj/arm64/obj7.go
test/codegen/bitfield.go