mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
test/codegen: port arm64 byte slice zeroing tests
And delete them from asm_test. Change-Id: Id533130470da9176a401cb94972f626f43a62148 Reviewed-on: https://go-review.googlesource.com/103656 Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Giovanni Bajo <rasky@develer.com>
This commit is contained in:
parent
4ed94ef1a8
commit
f2abca90a2
2 changed files with 41 additions and 90 deletions
|
|
@ -429,54 +429,6 @@ var linuxARM64Tests = []*asmTest{
|
|||
pos: []string{"\tCSEL\t"},
|
||||
},
|
||||
// Check that zero stores are combine into larger stores
|
||||
{
|
||||
fn: `
|
||||
func $(b []byte) {
|
||||
_ = b[1] // early bounds check to guarantee safety of writes below
|
||||
b[0] = 0
|
||||
b[1] = 0
|
||||
}
|
||||
`,
|
||||
pos: []string{"MOVH\tZR"},
|
||||
neg: []string{"MOVB"},
|
||||
},
|
||||
{
|
||||
fn: `
|
||||
func $(b []byte) {
|
||||
_ = b[1] // early bounds check to guarantee safety of writes below
|
||||
b[1] = 0
|
||||
b[0] = 0
|
||||
}
|
||||
`,
|
||||
pos: []string{"MOVH\tZR"},
|
||||
neg: []string{"MOVB"},
|
||||
},
|
||||
{
|
||||
fn: `
|
||||
func $(b []byte) {
|
||||
_ = b[3] // early bounds check to guarantee safety of writes below
|
||||
b[0] = 0
|
||||
b[1] = 0
|
||||
b[2] = 0
|
||||
b[3] = 0
|
||||
}
|
||||
`,
|
||||
pos: []string{"MOVW\tZR"},
|
||||
neg: []string{"MOVB", "MOVH"},
|
||||
},
|
||||
{
|
||||
fn: `
|
||||
func $(b []byte) {
|
||||
_ = b[3] // early bounds check to guarantee safety of writes below
|
||||
b[2] = 0
|
||||
b[3] = 0
|
||||
b[1] = 0
|
||||
b[0] = 0
|
||||
}
|
||||
`,
|
||||
pos: []string{"MOVW\tZR"},
|
||||
neg: []string{"MOVB", "MOVH"},
|
||||
},
|
||||
{
|
||||
fn: `
|
||||
func $(h []uint16) {
|
||||
|
|
@ -499,23 +451,6 @@ var linuxARM64Tests = []*asmTest{
|
|||
pos: []string{"MOVW\tZR"},
|
||||
neg: []string{"MOVB", "MOVH"},
|
||||
},
|
||||
{
|
||||
fn: `
|
||||
func $(b []byte) {
|
||||
_ = b[7] // early bounds check to guarantee safety of writes below
|
||||
b[0] = 0
|
||||
b[1] = 0
|
||||
b[2] = 0
|
||||
b[3] = 0
|
||||
b[4] = 0
|
||||
b[5] = 0
|
||||
b[6] = 0
|
||||
b[7] = 0
|
||||
}
|
||||
`,
|
||||
pos: []string{"MOVD\tZR"},
|
||||
neg: []string{"MOVB", "MOVH", "MOVW"},
|
||||
},
|
||||
{
|
||||
fn: `
|
||||
func $(h []uint16) {
|
||||
|
|
@ -564,31 +499,6 @@ var linuxARM64Tests = []*asmTest{
|
|||
pos: []string{"MOVD\tZR"},
|
||||
neg: []string{"MOVB", "MOVH", "MOVW"},
|
||||
},
|
||||
{
|
||||
fn: `
|
||||
func $(b []byte) {
|
||||
_ = b[15] // early bounds check to guarantee safety of writes below
|
||||
b[0] = 0
|
||||
b[1] = 0
|
||||
b[2] = 0
|
||||
b[3] = 0
|
||||
b[4] = 0
|
||||
b[5] = 0
|
||||
b[6] = 0
|
||||
b[7] = 0
|
||||
b[8] = 0
|
||||
b[9] = 0
|
||||
b[10] = 0
|
||||
b[11] = 0
|
||||
b[12] = 0
|
||||
b[13] = 0
|
||||
b[15] = 0
|
||||
b[14] = 0
|
||||
}
|
||||
`,
|
||||
pos: []string{"STP"},
|
||||
neg: []string{"MOVB", "MOVH", "MOVW"},
|
||||
},
|
||||
{
|
||||
fn: `
|
||||
func $(h []uint16) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue