diff options
author | eric fang <eric.fang@arm.com> | 2021-04-27 06:19:57 +0000 |
---|---|---|
committer | eric fang <eric.fang@arm.com> | 2021-04-28 01:16:38 +0000 |
commit | f439a762533f3a75eb928b67d0415010aa8a81d7 (patch) | |
tree | e9b5c042864fcb11daa5b6fceae890e417310588 /src/cmd/asm/internal/asm/testdata/arm64error.s | |
parent | c9f43507c6d8106646b1262052cc9a2c5dbb6e4c (diff) | |
download | go-f439a762533f3a75eb928b67d0415010aa8a81d7.tar.gz go-f439a762533f3a75eb928b67d0415010aa8a81d7.zip |
cmd/internal/obj/arm64: fix the wrong error message of out-of-range checking
The error message of checking whether the offset value of load/store
instruction is out of range is wrong. The right range is [-256, 255], not
[-255, 254]. The CL fixes it.
Change-Id: Ia342957f1f6bcec65eceb45944221d3972641bed
Reviewed-on: https://go-review.googlesource.com/c/go/+/313891
Reviewed-by: eric fang <eric.fang@arm.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Trust: eric fang <eric.fang@arm.com>
Run-TryBot: eric fang <eric.fang@arm.com>
Diffstat (limited to 'src/cmd/asm/internal/asm/testdata/arm64error.s')
-rw-r--r-- | src/cmd/asm/internal/asm/testdata/arm64error.s | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/asm/internal/asm/testdata/arm64error.s b/src/cmd/asm/internal/asm/testdata/arm64error.s index 1744c09b98..feb03abacd 100644 --- a/src/cmd/asm/internal/asm/testdata/arm64error.s +++ b/src/cmd/asm/internal/asm/testdata/arm64error.s @@ -59,8 +59,8 @@ TEXT errors(SB),$0 LDP (R0), (R3, ZR) // ERROR "invalid register pair" LDXPW (RSP), (R2, R2) // ERROR "constrained unpredictable behavior" LDAXPW (R5), (R2, R2) // ERROR "constrained unpredictable behavior" - MOVD.P 300(R2), R3 // ERROR "offset out of range [-255,254]" - MOVD.P R3, 344(R2) // ERROR "offset out of range [-255,254]" + MOVD.P 300(R2), R3 // ERROR "offset out of range [-256,255]" + MOVD.P R3, 344(R2) // ERROR "offset out of range [-256,255]" MOVD (R3)(R7.SXTX<<2), R8 // ERROR "invalid index shift amount" MOVWU (R5)(R4.UXTW<<3), R10 // ERROR "invalid index shift amount" MOVWU (R5)(R4<<1), R10 // ERROR "invalid index shift amount" |