Commit e7dd2889 authored by Shenghou Ma's avatar Shenghou Ma Committed by Minux Ma

cmd/internal/gc, cmd/[56789]g: rename stackcopy to blockcopy

To avoid confusion with the runtime concept of copying stack.

Change-Id: I33442377b71012c2482c2d0ddd561492c71e70d0
Reviewed-on: https://go-review.googlesource.com/8639Reviewed-by: default avatarDave Cheney <dave@cheney.net>
Reviewed-by: default avatarRuss Cox <rsc@golang.org>
parent baf3814b
......@@ -75,7 +75,7 @@ func gencmp0(n *gc.Node, t *gc.Type, o int, likely int, to *obj.Prog) {
gc.Regfree(&n1)
}
func stackcopy(n, res *gc.Node, osrc, odst, w int64) {
func blockcopy(n, res *gc.Node, osrc, odst, w int64) {
// determine alignment.
// want to avoid unaligned access, so have to use
// smaller operations for less aligned types.
......
......@@ -76,7 +76,7 @@ func main() {
gc.Thearch.Sameaddr = sameaddr
gc.Thearch.Smallindir = smallindir
gc.Thearch.Stackaddr = stackaddr
gc.Thearch.Stackcopy = stackcopy
gc.Thearch.Blockcopy = blockcopy
gc.Thearch.Sudoaddable = sudoaddable
gc.Thearch.Sudoclean = sudoclean
gc.Thearch.Excludedregs = excludedregs
......
......@@ -10,7 +10,7 @@ import (
"cmd/internal/obj/x86"
)
func stackcopy(n, ns *gc.Node, osrc, odst, w int64) {
func blockcopy(n, ns *gc.Node, osrc, odst, w int64) {
var noddi gc.Node
gc.Nodreg(&noddi, gc.Types[gc.Tptr], x86.REG_DI)
var nodsi gc.Node
......
......@@ -111,7 +111,7 @@ func main() {
gc.Thearch.Sameaddr = sameaddr
gc.Thearch.Smallindir = smallindir
gc.Thearch.Stackaddr = stackaddr
gc.Thearch.Stackcopy = stackcopy
gc.Thearch.Blockcopy = blockcopy
gc.Thearch.Sudoaddable = sudoaddable
gc.Thearch.Sudoclean = sudoclean
gc.Thearch.Excludedregs = excludedregs
......
......@@ -10,7 +10,7 @@ import (
"cmd/internal/obj/arm64"
)
func stackcopy(n, res *gc.Node, osrc, odst, w int64) {
func blockcopy(n, res *gc.Node, osrc, odst, w int64) {
// determine alignment.
// want to avoid unaligned access, so have to use
// smaller operations for less aligned types.
......
......@@ -75,7 +75,7 @@ func main() {
gc.Thearch.Sameaddr = sameaddr
gc.Thearch.Smallindir = smallindir
gc.Thearch.Stackaddr = stackaddr
gc.Thearch.Stackcopy = stackcopy
gc.Thearch.Blockcopy = blockcopy
gc.Thearch.Sudoaddable = sudoaddable
gc.Thearch.Sudoclean = sudoclean
gc.Thearch.Excludedregs = excludedregs
......
......@@ -48,7 +48,7 @@ func igenindex(n *gc.Node, res *gc.Node, bounded bool) *obj.Prog {
return gc.Gbranch(x86.AJNE, nil, +1)
}
func stackcopy(n, res *gc.Node, osrc, odst, w int64) {
func blockcopy(n, res *gc.Node, osrc, odst, w int64) {
var dst gc.Node
gc.Nodreg(&dst, gc.Types[gc.Tptr], x86.REG_DI)
var src gc.Node
......
......@@ -89,7 +89,7 @@ func main() {
gc.Thearch.Sameaddr = sameaddr
gc.Thearch.Smallindir = smallindir
gc.Thearch.Stackaddr = stackaddr
gc.Thearch.Stackcopy = stackcopy
gc.Thearch.Blockcopy = blockcopy
gc.Thearch.Sudoaddable = sudoaddable
gc.Thearch.Sudoclean = sudoclean
gc.Thearch.Excludedregs = excludedregs
......
......@@ -10,7 +10,7 @@ import (
"cmd/internal/obj/ppc64"
)
func stackcopy(n, res *gc.Node, osrc, odst, w int64) {
func blockcopy(n, res *gc.Node, osrc, odst, w int64) {
// determine alignment.
// want to avoid unaligned access, so have to use
// smaller operations for less aligned types.
......
......@@ -82,7 +82,7 @@ func main() {
gc.Thearch.Sameaddr = sameaddr
gc.Thearch.Smallindir = smallindir
gc.Thearch.Stackaddr = stackaddr
gc.Thearch.Stackcopy = stackcopy
gc.Thearch.Blockcopy = blockcopy
gc.Thearch.Sudoaddable = sudoaddable
gc.Thearch.Sudoclean = sudoclean
gc.Thearch.Excludedregs = excludedregs
......
......@@ -2312,7 +2312,7 @@ func sgen_wb(n *Node, ns *Node, w int64, wb bool) {
return
}
Thearch.Stackcopy(n, ns, osrc, odst, w)
Thearch.Blockcopy(n, ns, osrc, odst, w)
}
/*
......
......@@ -809,7 +809,7 @@ type Arch struct {
Sameaddr func(*obj.Addr, *obj.Addr) bool
Smallindir func(*obj.Addr, *obj.Addr) bool
Stackaddr func(*obj.Addr) bool
Stackcopy func(*Node, *Node, int64, int64, int64)
Blockcopy func(*Node, *Node, int64, int64, int64)
Sudoaddable func(int, *Node, *obj.Addr) bool
Sudoclean func()
Excludedregs func() uint64
......
......@@ -15,7 +15,7 @@
// the routine to copy chunks of memory.
// Source and destination must not overlap.
// Do not change duffcopy without also
// changing stackcopy in cmd/?g/cgen.go.
// changing blockcopy in cmd/?g/cgen.go.
// See the zero* and copy* generators below
// for architecture-specific comments.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment