mirror of
https://github.com/golang/go.git
synced 2025-05-30 19:52:53 +00:00
cmd/compile/internal/ppc64: disable DUFFZERO
Update #12108 If DUFFZERO is used within a tail call method it will overwrite the link register. Change-Id: I6abd2fde0f0ad909ccd55eb119b992673a74f0e2 Reviewed-on: https://go-review.googlesource.com/13570 Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
58035ec8ee
commit
cda1fc0071
@ -71,7 +71,10 @@ func zerorange(p *obj.Prog, frame int64, lo int64, hi int64) *obj.Prog {
|
||||
for i := int64(0); i < cnt; i += int64(gc.Widthptr) {
|
||||
p = appendpp(p, ppc64.AMOVD, obj.TYPE_REG, ppc64.REGZERO, 0, obj.TYPE_MEM, ppc64.REGSP, 8+frame+lo+i)
|
||||
}
|
||||
} else if cnt <= int64(128*gc.Widthptr) {
|
||||
// TODO(dfc): https://golang.org/issue/12108
|
||||
// If DUFFZERO is used inside a tail call (see genwrapper) it will
|
||||
// overwrite the link register.
|
||||
} else if false && cnt <= int64(128*gc.Widthptr) {
|
||||
p = appendpp(p, ppc64.AADD, obj.TYPE_CONST, 0, 8+frame+lo-8, obj.TYPE_REG, ppc64.REGRT1, 0)
|
||||
p.Reg = ppc64.REGSP
|
||||
p = appendpp(p, obj.ADUFFZERO, obj.TYPE_NONE, 0, 0, obj.TYPE_MEM, 0, 0)
|
||||
@ -442,7 +445,10 @@ func clearfat(nl *gc.Node) {
|
||||
|
||||
// The loop leaves R3 on the last zeroed dword
|
||||
boff = 8
|
||||
} else if q >= 4 {
|
||||
// TODO(dfc): https://golang.org/issue/12108
|
||||
// If DUFFZERO is used inside a tail call (see genwrapper) it will
|
||||
// overwrite the link register.
|
||||
} else if false && q >= 4 {
|
||||
p := gins(ppc64.ASUB, nil, &dst)
|
||||
p.From.Type = obj.TYPE_CONST
|
||||
p.From.Offset = 8
|
||||
|
Loading…
x
Reference in New Issue
Block a user