aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/arm64/asm7.go
diff options
context:
space:
mode:
authoreric fang <eric.fang@arm.com>2023-12-06 03:41:13 +0000
committerEric Fang <eric.fang@arm.com>2023-12-08 03:28:17 +0000
commit78b42a5338aa1fa293acc5bbb7ef9122a7acc2ba (patch)
tree2ec1cffa189acf81fd98d6ba6630d1dfa1c2912d /src/cmd/internal/obj/arm64/asm7.go
parent4bf1ca4b0ce9a08f4c45d68fe49857914f668f69 (diff)
downloadgo-78b42a5338aa1fa293acc5bbb7ef9122a7acc2ba.tar.gz
go-78b42a5338aa1fa293acc5bbb7ef9122a7acc2ba.zip
cmd/internal/obj/arm64: fix invalid register pair for LDP
ZR register can be used in register pair of LDP, LDPW and LDPSW instructions, but now it's not allowed. This CL fixes this issue. Change-Id: I8467502de4664214e0b7dad0295c44f6cff16ee6 Reviewed-on: https://go-review.googlesource.com/c/go/+/547815 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Eric Fang <eric.fang@arm.com>
Diffstat (limited to 'src/cmd/internal/obj/arm64/asm7.go')
-rw-r--r--src/cmd/internal/obj/arm64/asm7.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/internal/obj/arm64/asm7.go b/src/cmd/internal/obj/arm64/asm7.go
index 0991ec9201..03f0fb06da 100644
--- a/src/cmd/internal/obj/arm64/asm7.go
+++ b/src/cmd/internal/obj/arm64/asm7.go
@@ -7741,7 +7741,7 @@ func (c *ctxt7) opldpstp(p *obj.Prog, o *Optab, vo int32, rbase, rl, rh int16, l
c.ctxt.Diag("invalid register pair %v\n", p)
}
case ALDP, ALDPW, ALDPSW:
- if rl < REG_R0 || REG_R30 < rl || rh < REG_R0 || REG_R30 < rh {
+ if rl < REG_R0 || REG_R31 < rl || rh < REG_R0 || REG_R31 < rh {
c.ctxt.Diag("invalid register pair %v\n", p)
}
case ASTP, ASTPW: