aboutsummaryrefslogtreecommitdiff
path: root/test/nosplit.go
diff options
context:
space:
mode:
authorShenghou Ma <minux@golang.org>2014-08-14 13:59:58 -0400
committerRuss Cox <rsc@golang.org>2014-08-14 13:59:58 -0400
commit80e76e272adda0ab664cf5b6425e994b4e491e8c (patch)
tree72af4d48c5bc123578bb8564b08d9ab6211c8a1f /test/nosplit.go
parentb3375771fcd67d2dc7c7eee2bcd093ab4c126ec4 (diff)
downloadgo-80e76e272adda0ab664cf5b6425e994b4e491e8c.tar.gz
go-80e76e272adda0ab664cf5b6425e994b4e491e8c.zip
[dev.power64] test/nosplit.go: add power64 support
LGTM=rsc R=rsc, iant CC=golang-codereviews https://golang.org/cl/125210043
Diffstat (limited to 'test/nosplit.go')
-rw-r--r--test/nosplit.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/nosplit.go b/test/nosplit.go
index 35aa51017a..de279efdd4 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]