test: adjust tests for riscv64

This disables some tests that are unsupported on riscv64 and adds support
for risc64 to test/nosplit.

Updates #27532, #36739 and #36765

Change-Id: I0a57797a05bc80236709fc240c0a0efb0ee0d16b
Reviewed-on: https://go-review.googlesource.com/c/go/+/216263
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Joel Sing 2020-01-25 03:10:04 +11:00
Родитель 69660ed7e0
Коммит 7f331e0e17
3 изменённых файлов: 11 добавлений и 2 удалений

Просмотреть файл

@ -1,4 +1,4 @@
// +build linux,!ppc64 // +build linux,!ppc64,!riscv64
// run // run
// Copyright 2015 The Go Authors. All rights reserved. // Copyright 2015 The Go Authors. All rights reserved.
@ -8,6 +8,9 @@
// Test that a -B option is passed through when using both internal // Test that a -B option is passed through when using both internal
// and external linking mode. // and external linking mode.
// TODO(jsing): Re-enable on riscv64 when it has support for external
// linking - see golang.org/issue/36739
package main package main
import ( import (

Просмотреть файл

@ -1,4 +1,4 @@
// +build !nacl,!386,!wasm,!arm,!gcflags_noopt // +build !nacl,!386,!wasm,!arm,!riscv64,!gcflags_noopt
// errorcheck -0 -m // errorcheck -0 -m
// Copyright 2019 The Go Authors. All rights reserved. // Copyright 2019 The Go Authors. All rights reserved.
@ -14,6 +14,9 @@
// of the sync fast paths. This test should be re-enabled once the problem // of the sync fast paths. This test should be re-enabled once the problem
// is solved. // is solved.
// TODO(jsing): Re-enable on riscv64 when it has atomic intrinsics - see
// golang.org/issue/36765
package foo package foo
import ( import (

Просмотреть файл

@ -283,6 +283,9 @@ TestCases:
case "amd64": case "amd64":
ptrSize = 8 ptrSize = 8
fmt.Fprintf(&buf, "#define REGISTER AX\n") fmt.Fprintf(&buf, "#define REGISTER AX\n")
case "riscv64":
ptrSize = 8
fmt.Fprintf(&buf, "#define REGISTER A0\n")
case "s390x": case "s390x":
ptrSize = 8 ptrSize = 8
fmt.Fprintf(&buf, "#define REGISTER R10\n") fmt.Fprintf(&buf, "#define REGISTER R10\n")