[dev.power64] test/nosplit.go: add power64 support

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/125210043
This commit is contained in:
Shenghou Ma 2014-08-14 13:59:58 -04:00 committed by Russ Cox
parent b3375771fc
commit 80e76e272a
1 changed files with 11 additions and 3 deletions

View File

@ -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]