aboutsummaryrefslogtreecommitdiff
path: root/test/nosplit.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-08-14 15:29:37 -0400
committerRuss Cox <rsc@golang.org>2014-08-14 15:29:37 -0400
commited68c7df5529fce8d244584b064b8fae473525c4 (patch)
treecb6f056e392c2d912ad6f13f3a3300b5c36589a1 /test/nosplit.go
parent6edd1c6d1a0443086734221887b3b0a38b182281 (diff)
downloadgo-ed68c7df5529fce8d244584b064b8fae473525c4.tar.gz
go-ed68c7df5529fce8d244584b064b8fae473525c4.zip
[dev.power64] cmd/ld, runtime: detect, fix nosplit overflows
LGTM=minux R=minux CC=golang-codereviews https://golang.org/cl/121690043
Diffstat (limited to 'test/nosplit.go')
-rw-r--r--test/nosplit.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/nosplit.go b/test/nosplit.go
index de279efdd4..b5399ad38d 100644
--- a/test/nosplit.go
+++ b/test/nosplit.go
@@ -126,8 +126,9 @@ main 136 nosplit; REJECT
# Calling a nosplit function from a nosplit function requires
# having room for the saved caller PC and the called frame.
# Because ARM doesn't save LR in the leaf, it gets an extra 4 bytes.
+# Because Power64 doesn't save LR in the leaf, it gets an extra 8 bytes.
main 112 nosplit call f; f 0 nosplit
-main 116 nosplit call f; f 0 nosplit; REJECT amd64
+main 116 nosplit call f; f 0 nosplit
main 120 nosplit call f; f 0 nosplit; REJECT amd64
main 124 nosplit call f; f 0 nosplit; REJECT amd64 386
main 128 nosplit call f; f 0 nosplit; REJECT
@@ -136,8 +137,8 @@ main 136 nosplit call f; f 0 nosplit; REJECT
# Calling a splitting function from a nosplit function requires
# having room for the saved caller PC of the call but also the
-# saved caller PC for the call to morestack. Again the ARM works
-# in less space.
+# saved caller PC for the call to morestack.
+# Again the ARM and Power64 work in less space.
main 104 nosplit call f; f 0 call f
main 108 nosplit call f; f 0 call f
main 112 nosplit call f; f 0 call f; REJECT amd64
@@ -235,7 +236,7 @@ TestCases:
switch goarch {
case "power64", "power64le":
ptrSize = 8
- fmt.Fprintf(&buf, "#define CALL BL\n#define REGISTER (R0)\n#define RET RETURN\n")
+ fmt.Fprintf(&buf, "#define CALL BL\n#define REGISTER (CTR)\n#define RET RETURN\n")
case "arm":
fmt.Fprintf(&buf, "#define CALL BL\n#define REGISTER (R0)\n")
case "amd64":