summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorShenghou Ma <minux@golang.org>2014-08-14 13:59:58 -0400
committerShenghou Ma <minux@golang.org>2014-08-14 13:59:58 -0400
commit66c0862798709cbb155a11b8751f00566181e553 (patch)
tree8e8ce2fb515c25245e56cbd1679d915273278068 /test
parentc143c548f010c131101a0e53401b60e6301b7031 (diff)
downloadgo-66c0862798709cbb155a11b8751f00566181e553.tar.gz
[dev.power64] test/nosplit.go: add power64 support
LGTM=rsc R=rsc, iant CC=golang-codereviews https://codereview.appspot.com/125210043 Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'test')
-rw-r--r--test/nosplit.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/nosplit.go b/test/nosplit.go
index 35aa51017..de279efdd 100644
--- a/test/nosplit.go
+++ b/test/nosplit.go
@@ -231,9 +231,17 @@ TestCases:
}
var buf bytes.Buffer
- if goarch == "arm" {
+ ptrSize := 4
+ switch goarch {
+ case "power64", "power64le":
+ ptrSize = 8
+ fmt.Fprintf(&buf, "#define CALL BL\n#define REGISTER (R0)\n#define RET RETURN\n")
+ case "arm":
fmt.Fprintf(&buf, "#define CALL BL\n#define REGISTER (R0)\n")
- } else {
+ case "amd64":
+ ptrSize = 8
+ fmt.Fprintf(&buf, "#define REGISTER AX\n")
+ default:
fmt.Fprintf(&buf, "#define REGISTER AX\n")
}
@@ -255,7 +263,7 @@ TestCases:
}
name := m[1]
size, _ := strconv.Atoi(m[2])
- if goarch == "amd64" && size%8 == 4 {
+ if size%ptrSize == 4 {
continue TestCases
}
nosplit := m[3]