runtime: port memmove, memclr to register ABI on s390x
This allows memmove and memclr to be invoked using the new register ABI on s390x. Update #40724 Change-Id: I2e799aac693ddd693266c156c525d6303060796f Reviewed-on: https://go-review.googlesource.com/c/go/+/719424 Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Vishwanatha HD <vishwanatha.hd@ibm.com> Reviewed-by: Keith Randall <khr@google.com>
This commit is contained in:
committed by
Keith Randall
parent
58a48a3e3b
commit
4529c8fba6
@@ -7,10 +7,14 @@
|
||||
// See memclrNoHeapPointers Go doc for important implementation constraints.
|
||||
|
||||
// func memclrNoHeapPointers(ptr unsafe.Pointer, n uintptr)
|
||||
TEXT runtime·memclrNoHeapPointers(SB),NOSPLIT|NOFRAME,$0-16
|
||||
TEXT runtime·memclrNoHeapPointers<ABIInternal>(SB),NOSPLIT|NOFRAME,$0-16
|
||||
#ifndef GOEXPERIMENT_regabiargs
|
||||
MOVD ptr+0(FP), R4
|
||||
MOVD n+8(FP), R5
|
||||
|
||||
#else
|
||||
MOVD R2, R4
|
||||
MOVD R3, R5
|
||||
#endif
|
||||
CMPBGE R5, $32, clearge32
|
||||
|
||||
start:
|
||||
|
||||
@@ -7,10 +7,16 @@
|
||||
// See memmove Go doc for important implementation constraints.
|
||||
|
||||
// func memmove(to, from unsafe.Pointer, n uintptr)
|
||||
TEXT runtime·memmove(SB),NOSPLIT|NOFRAME,$0-24
|
||||
TEXT runtime·memmove<ABIInternal>(SB),NOSPLIT|NOFRAME,$0-24
|
||||
#ifndef GOEXPERIMENT_regabiargs
|
||||
MOVD to+0(FP), R6
|
||||
MOVD from+8(FP), R4
|
||||
MOVD n+16(FP), R5
|
||||
#else
|
||||
MOVD R4, R5
|
||||
MOVD R3, R4
|
||||
MOVD R2, R6
|
||||
#endif
|
||||
|
||||
CMPBEQ R6, R4, done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user