mirror of https://github.com/golang/go.git
runtime: make duff device as ABIInternal for loong64
Update #40724 Co-authored-by: Xiaolin Zhao <zhaoxiaolin@loongson.cn> Change-Id: I243e60489dc5fd162ad91d6426bf32cf0e13d9e2 Reviewed-on: https://go-review.googlesource.com/c/go/+/521782 Reviewed-by: Meidan Li <limeidan@loongson.cn> Reviewed-by: David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: David Chase <drchase@google.com>
This commit is contained in:
parent
6b77d1b736
commit
3107fa99ac
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
TEXT runtime·duffzero(SB), NOSPLIT|NOFRAME, $0-0
|
TEXT runtime·duffzero<ABIInternal>(SB), NOSPLIT|NOFRAME, $0-0
|
||||||
MOVV R0, (R20)
|
MOVV R0, (R20)
|
||||||
ADDV $8, R20
|
ADDV $8, R20
|
||||||
MOVV R0, (R20)
|
MOVV R0, (R20)
|
||||||
|
|
@ -263,7 +263,7 @@ TEXT runtime·duffzero(SB), NOSPLIT|NOFRAME, $0-0
|
||||||
ADDV $8, R20
|
ADDV $8, R20
|
||||||
RET
|
RET
|
||||||
|
|
||||||
TEXT runtime·duffcopy(SB), NOSPLIT|NOFRAME, $0-0
|
TEXT runtime·duffcopy<ABIInternal>(SB), NOSPLIT|NOFRAME, $0-0
|
||||||
MOVV (R20), R30
|
MOVV (R20), R30
|
||||||
ADDV $8, R20
|
ADDV $8, R20
|
||||||
MOVV R30, (R21)
|
MOVV R30, (R21)
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@ func zeroLOONG64(w io.Writer) {
|
||||||
// R0: always zero
|
// R0: always zero
|
||||||
// R19 (aka REGRT1): ptr to memory to be zeroed
|
// R19 (aka REGRT1): ptr to memory to be zeroed
|
||||||
// On return, R19 points to the last zeroed dword.
|
// On return, R19 points to the last zeroed dword.
|
||||||
fmt.Fprintln(w, "TEXT runtime·duffzero(SB), NOSPLIT|NOFRAME, $0-0")
|
fmt.Fprintln(w, "TEXT runtime·duffzero<ABIInternal>(SB), NOSPLIT|NOFRAME, $0-0")
|
||||||
for i := 0; i < 128; i++ {
|
for i := 0; i < 128; i++ {
|
||||||
fmt.Fprintln(w, "\tMOVV\tR0, (R20)")
|
fmt.Fprintln(w, "\tMOVV\tR0, (R20)")
|
||||||
fmt.Fprintln(w, "\tADDV\t$8, R20")
|
fmt.Fprintln(w, "\tADDV\t$8, R20")
|
||||||
|
|
@ -190,7 +190,7 @@ func zeroLOONG64(w io.Writer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func copyLOONG64(w io.Writer) {
|
func copyLOONG64(w io.Writer) {
|
||||||
fmt.Fprintln(w, "TEXT runtime·duffcopy(SB), NOSPLIT|NOFRAME, $0-0")
|
fmt.Fprintln(w, "TEXT runtime·duffcopy<ABIInternal>(SB), NOSPLIT|NOFRAME, $0-0")
|
||||||
for i := 0; i < 128; i++ {
|
for i := 0; i < 128; i++ {
|
||||||
fmt.Fprintln(w, "\tMOVV\t(R20), R30")
|
fmt.Fprintln(w, "\tMOVV\t(R20), R30")
|
||||||
fmt.Fprintln(w, "\tADDV\t$8, R20")
|
fmt.Fprintln(w, "\tADDV\t$8, R20")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue