Commit 455ef3f6 authored by Ben Shi's avatar Ben Shi Committed by Cherry Zhang

test/codegen: improve arithmetic tests

This CL fixes several typos and adds two more cases
to arithmetic test.

Change-Id: I086560162ea351e2166866e444e2317da36c1729
Reviewed-on: https://go-review.googlesource.com/c/145210
Run-TryBot: Ben Shi <powerman1st@163.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
parent 891682c8
...@@ -324,10 +324,10 @@ func MULA(a, b, c uint32) (uint32, uint32, uint32) { ...@@ -324,10 +324,10 @@ func MULA(a, b, c uint32) (uint32, uint32, uint32) {
// arm:`MULA`,-`MUL\s` // arm:`MULA`,-`MUL\s`
// arm64:`MADDW`,-`MULW` // arm64:`MADDW`,-`MULW`
r0 := a*b + c r0 := a*b + c
// arm:`MULA`-`MUL\s` // arm:`MULA`,-`MUL\s`
// arm64:`MADDW`,-`MULW` // arm64:`MADDW`,-`MULW`
r1 := c*79 + a r1 := c*79 + a
// arm:`ADD`,-`MULA`-`MUL\s` // arm:`ADD`,-`MULA`,-`MUL\s`
// arm64:`ADD`,-`MADD`,-`MULW` // arm64:`ADD`,-`MADD`,-`MULW`
r2 := b*64 + c r2 := b*64 + c
return r0, r1, r2 return r0, r1, r2
...@@ -335,12 +335,14 @@ func MULA(a, b, c uint32) (uint32, uint32, uint32) { ...@@ -335,12 +335,14 @@ func MULA(a, b, c uint32) (uint32, uint32, uint32) {
func MULS(a, b, c uint32) (uint32, uint32, uint32) { func MULS(a, b, c uint32) (uint32, uint32, uint32) {
// arm/7:`MULS`,-`MUL\s` // arm/7:`MULS`,-`MUL\s`
// arm/6:`SUB`,`MUL\s`,-`MULS`
// arm64:`MSUBW`,-`MULW` // arm64:`MSUBW`,-`MULW`
r0 := c - a*b r0 := c - a*b
// arm/7:`MULS`-`MUL\s` // arm/7:`MULS`,-`MUL\s`
// arm/6:`SUB`,`MUL\s`,-`MULS`
// arm64:`MSUBW`,-`MULW` // arm64:`MSUBW`,-`MULW`
r1 := a - c*79 r1 := a - c*79
// arm/7:`SUB`,-`MULS`-`MUL\s` // arm/7:`SUB`,-`MULS`,-`MUL\s`
// arm64:`SUB`,-`MSUBW`,-`MULW` // arm64:`SUB`,-`MSUBW`,-`MULW`
r2 := c - b*64 r2 := c - b*64
return r0, r1, r2 return r0, r1, r2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment