aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/asm
diff options
context:
space:
mode:
authorPaul E. Murphy <murp@ibm.com>2022-10-21 09:19:47 -0500
committerPaul Murphy <murp@ibm.com>2022-10-26 19:47:19 +0000
commit4e6f90fecd377777b08a151e1712b6d9180630de (patch)
tree8d71c70bec30bc3f6831b6921328664cd7e48ac8 /src/cmd/asm
parentf9ee56145bd8aa802b91db9465564cae5596966b (diff)
downloadgo-4e6f90fecd377777b08a151e1712b6d9180630de.tar.xz
cmd/internal/obj/ppc64: generate big uint32 values in register
When using "MOVD $const, Rx", any 32b constant can be generated in register quickly. Avoid transforming big uint32 values into a load. And, fix the instance in runtime.usleep where I discovered this. Change-Id: I46e156d7edf200f85b5b61162f00223c0ad81fe2 Reviewed-on: https://go-review.googlesource.com/c/go/+/444815 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Paul Murphy <murp@ibm.com> Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'src/cmd/asm')
-rw-r--r--src/cmd/asm/internal/asm/testdata/ppc64.s5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/asm/internal/asm/testdata/ppc64.s b/src/cmd/asm/internal/asm/testdata/ppc64.s
index 5cff82ff36..367d7b77db 100644
--- a/src/cmd/asm/internal/asm/testdata/ppc64.s
+++ b/src/cmd/asm/internal/asm/testdata/ppc64.s
@@ -28,6 +28,11 @@ TEXT asmtest(SB),DUPOK|NOSPLIT,$0
MOVW $-32767, R5 // 38a08001
MOVW $-32768, R6 // 38c08000
MOVW $1234567, R5 // 6405001260a5d687
+ // Hex constant 0x80000001
+ MOVW $2147483649, R5 // 6405800060a50001
+ MOVD $2147483649, R5 // 6405800060a50001
+ // Hex constant 0xFFFFFFFF80000001
+ MOVD $-2147483647, R5 // 3ca0800060a50001
MOVD 8(R3), R4 // e8830008
MOVD (R3)(R4), R5 // 7ca4182a
MOVD (R3)(R0), R5 // 7ca0182a