1
0
mirror of https://github.com/golang/go synced 2024-09-29 22:24:33 -06:00
go/test/codegen/stack.go
Alberto Donizetti 3b0b8bcd68 test/codegen: port stack-related tests to codegen
And delete them from asm_test.

Change-Id: Idfe1249052d82d15b9c30b292c78656a0bf7b48d
Reviewed-on: https://go-review.googlesource.com/103315
Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
2018-03-30 08:08:06 +00:00

25 lines
565 B
Go

// asmcheck
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package codegen
// This file contains code generation tests related to the use of the
// stack.
// check that stack stores are optimized away
// 386:"TEXT\t.*, [$]0-4"
// amd64:"TEXT\t.*, [$]0-8"
// arm:"TEXT\t.*, [$]-4-4"
// arm64:"TEXT\t.*, [$]-8-8"
// s390x:"TEXT\t.*, [$]0-8"
// ppc64le:"TEXT\t.*, [$]0-8"
// mips:"TEXT\t.*, [$]-4-4"
func StackStore() int {
var x int
return *(&x)
}