aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_linux_ppc64x.s
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/runtime/sys_linux_ppc64x.s
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/runtime/sys_linux_ppc64x.s')
-rw-r--r--src/runtime/sys_linux_ppc64x.s3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/runtime/sys_linux_ppc64x.s b/src/runtime/sys_linux_ppc64x.s
index 817d13a9ec..d0427a4807 100644
--- a/src/runtime/sys_linux_ppc64x.s
+++ b/src/runtime/sys_linux_ppc64x.s
@@ -112,8 +112,7 @@ TEXT runtimeĀ·usleep(SB),NOSPLIT,$16-4
// Use magic constant 0x8637bd06 and shift right 51
// to perform usec/1000000.
- ORIS $0x8637, R0, R4 // Note, R0 always contains 0 here.
- OR $0xbd06, R4, R4
+ MOVD $0x8637bd06, R4
MULLD R3, R4, R4 // Convert usec to S.
SRD $51, R4, R4
MOVD R4, 8(R1) // Store to tv_sec