mirror of
https://github.com/golang/go
synced 2024-11-17 00:24:48 -07:00
cd3aae9b81
This change ports all the remaining tests checking that small memmoves are replaced with MOVs to the new codegen test harness, and deletes them from the asm_test file. Change-Id: I01c94b441e27a5d61518035af62d62779dafeb56 Reviewed-on: https://go-review.googlesource.com/100476 Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
34 lines
712 B
Go
34 lines
712 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
|
|
|
|
// These tests check that memmoves calls on small data are replaced
|
|
// with MOVs
|
|
|
|
func movesmall4() {
|
|
x := [...]byte{1, 2, 3, 4}
|
|
// 386:-".*memmove"
|
|
// amd64:-".*memmove"
|
|
// arm:-".*memmove"
|
|
// arm64:-".*memmove"
|
|
copy(x[1:], x[:])
|
|
}
|
|
|
|
func movesmall7() {
|
|
x := [...]byte{1, 2, 3, 4, 5, 6, 7}
|
|
// 386:-".*memmove"
|
|
// amd64:-".*memmove"
|
|
// arm64:-".*memmove"
|
|
copy(x[1:], x[:])
|
|
}
|
|
|
|
func movesmall16() {
|
|
x := [...]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}
|
|
// amd64:-".*memmove"
|
|
copy(x[1:], x[:])
|
|
}
|