diff options
| author | Alberto Donizetti <alb.donizetti@gmail.com> | 2018-03-15 10:06:37 +0100 |
|---|---|---|
| committer | Alberto Donizetti <alb.donizetti@gmail.com> | 2018-03-15 13:34:01 +0000 |
| commit | ded9a1b3723e2c16f2ac0373ef4593f09e65f54d (patch) | |
| tree | 98442afe8e9a029dcbcfd1e1ce305bd5f5003135 /src | |
| parent | 107325627b584968b9408565e8ff50ef11b229e2 (diff) | |
| download | go-ded9a1b3723e2c16f2ac0373ef4593f09e65f54d.tar.xz | |
test/codegen: port len/cap pow2 div tests to codegen
And delete them from asm_test.
Change-Id: I29c8d098a8893e6b669b6272a2f508985ac9d618
Reviewed-on: https://go-review.googlesource.com/100876
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/compile/internal/gc/asm_test.go | 104 |
1 files changed, 0 insertions, 104 deletions
diff --git a/src/cmd/compile/internal/gc/asm_test.go b/src/cmd/compile/internal/gc/asm_test.go index f2d37e69c9..ced465c65d 100644 --- a/src/cmd/compile/internal/gc/asm_test.go +++ b/src/cmd/compile/internal/gc/asm_test.go @@ -578,58 +578,6 @@ var linuxAMD64Tests = []*asmTest{ `, pos: []string{"\tSETHI\t.*\\(SP\\)"}, }, - // Check that len() and cap() div by a constant power of two - // are compiled into SHRQ. - { - fn: ` - func $(a []int) int { - return len(a) / 1024 - } - `, - pos: []string{"\tSHRQ\t\\$10,"}, - }, - { - fn: ` - func $(s string) int { - return len(s) / (4097 >> 1) - } - `, - pos: []string{"\tSHRQ\t\\$11,"}, - }, - { - fn: ` - func $(a []int) int { - return cap(a) / ((1 << 11) + 2048) - } - `, - pos: []string{"\tSHRQ\t\\$12,"}, - }, - // Check that len() and cap() mod by a constant power of two - // are compiled into ANDQ. - { - fn: ` - func $(a []int) int { - return len(a) % 1024 - } - `, - pos: []string{"\tANDQ\t\\$1023,"}, - }, - { - fn: ` - func $(s string) int { - return len(s) % (4097 >> 1) - } - `, - pos: []string{"\tANDQ\t\\$2047,"}, - }, - { - fn: ` - func $(a []int) int { - return cap(a) % ((1 << 11) + 2048) - } - `, - pos: []string{"\tANDQ\t\\$4095,"}, - }, { fn: ` func $(p int, q *int) bool { @@ -683,58 +631,6 @@ var linux386Tests = []*asmTest{ `, pos: []string{"TEXT\t.*, [$]0-4"}, }, - // Check that len() and cap() div by a constant power of two - // are compiled into SHRL. - { - fn: ` - func $(a []int) int { - return len(a) / 1024 - } - `, - pos: []string{"\tSHRL\t\\$10,"}, - }, - { - fn: ` - func $(s string) int { - return len(s) / (4097 >> 1) - } - `, - pos: []string{"\tSHRL\t\\$11,"}, - }, - { - fn: ` - func $(a []int) int { - return cap(a) / ((1 << 11) + 2048) - } - `, - pos: []string{"\tSHRL\t\\$12,"}, - }, - // Check that len() and cap() mod by a constant power of two - // are compiled into ANDL. - { - fn: ` - func $(a []int) int { - return len(a) % 1024 - } - `, - pos: []string{"\tANDL\t\\$1023,"}, - }, - { - fn: ` - func $(s string) int { - return len(s) % (4097 >> 1) - } - `, - pos: []string{"\tANDL\t\\$2047,"}, - }, - { - fn: ` - func $(a []int) int { - return cap(a) % ((1 << 11) + 2048) - } - `, - pos: []string{"\tANDL\t\\$4095,"}, - }, } var linuxS390XTests = []*asmTest{ |
