summaryrefslogtreecommitdiff
path: root/test/codegen/stack.go
diff options
context:
space:
mode:
authorAlberto Donizetti <alb.donizetti@gmail.com>2018-04-11 17:03:14 +0200
committerAlberto Donizetti <alb.donizetti@gmail.com>2018-04-11 16:08:04 +0000
commit467eca607697b30ba4f0b58bceae002f87ce5097 (patch)
tree2136da896e41530163e5ae3c8f3c27a63b0eb2b9 /test/codegen/stack.go
parente1040d79557de627b18c928a3c498e89f1dcd9da (diff)
downloadgo-git-467eca607697b30ba4f0b58bceae002f87ce5097.tar.gz
test/codegen: port last stack and memcombining tests
And delete them from asm_test. Also delete an arm64 cmov test has been already ported to the new test harness. Change-Id: I4458721e1f512bc9ecbbe1c22a2c9c7109ad68fe Reviewed-on: https://go-review.googlesource.com/106335 Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Giovanni Bajo <rasky@develer.com>
Diffstat (limited to 'test/codegen/stack.go')
-rw-r--r--test/codegen/stack.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/codegen/stack.go b/test/codegen/stack.go
index 987d6a5b1f..da5ef24e13 100644
--- a/test/codegen/stack.go
+++ b/test/codegen/stack.go
@@ -6,6 +6,8 @@
package codegen
+import "runtime"
+
// This file contains code generation tests related to the use of the
// stack.
@@ -22,3 +24,13 @@ func StackStore() int {
var x int
return *(&x)
}
+
+// Check that assembly output has matching offset and base register
+// (Issue #21064).
+
+// amd64:`.*b\+24\(SP\)`
+// arm:`.*b\+4\(FP\)`
+func check_asmout(a, b int) int {
+ runtime.GC() // use some frame
+ return b
+}