mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
test/codegen: port math/bits.RotateLeft tests to codegen
Only RotateLeft{64,32} were tested, and just for ppc64. This CL adds
tests for RotateLeft{64,32,16,8} on arm64 and amd64/386, for the cases
where the calls are actually instrinsified.
RotateLeft tests (the last ones for math/bits functions) are deleted
from asm_test.
This CL also adds a space between the "//" and the arch name in the
comments, to uniform this file to the style used in all the other
files.
Change-Id: Ifc2a27261d70bcc294b4ec64490d8367f62d2b89
Reviewed-on: https://go-review.googlesource.com/99596
Reviewed-by: Giovanni Bajo <rasky@develer.com>
This commit is contained in:
parent
6b5a0b5c16
commit
cde34780b7
2 changed files with 99 additions and 89 deletions
|
|
@ -259,10 +259,9 @@ var allAsmTests = []*asmTests{
|
|||
tests: linuxMIPS64Tests,
|
||||
},
|
||||
{
|
||||
arch: "ppc64le",
|
||||
os: "linux",
|
||||
imports: []string{"math/bits"},
|
||||
tests: linuxPPC64LETests,
|
||||
arch: "ppc64le",
|
||||
os: "linux",
|
||||
tests: linuxPPC64LETests,
|
||||
},
|
||||
{
|
||||
arch: "amd64",
|
||||
|
|
@ -1701,23 +1700,6 @@ var linuxPPC64LETests = []*asmTest{
|
|||
`,
|
||||
pos: []string{"\tROTL\t"},
|
||||
},
|
||||
{
|
||||
fn: `
|
||||
func f10(a uint32) uint32 {
|
||||
return bits.RotateLeft32(a, 9)
|
||||
}
|
||||
`,
|
||||
pos: []string{"\tROTLW\t"},
|
||||
},
|
||||
{
|
||||
fn: `
|
||||
func f11(a uint64) uint64 {
|
||||
return bits.RotateLeft64(a, 37)
|
||||
}
|
||||
`,
|
||||
pos: []string{"\tROTL\t"},
|
||||
},
|
||||
|
||||
{
|
||||
// check that stack store is optimized away
|
||||
fn: `
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue