diff options
Diffstat (limited to 'test/codegen')
| -rw-r--r-- | test/codegen/arithmetic.go | 2 | ||||
| -rw-r--r-- | test/codegen/comparisons.go | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/test/codegen/arithmetic.go b/test/codegen/arithmetic.go index 05a28695d4..8e2a210948 100644 --- a/test/codegen/arithmetic.go +++ b/test/codegen/arithmetic.go @@ -44,7 +44,7 @@ func Pow2Muls(n1, n2 int) (int, int) { // amd64:"SHLQ\t[$]6",-"IMULQ" // 386:"SHLL\t[$]6",-"IMULL" // arm:"SLL\t[$]6",-"MUL" - // arm64:"LSL\t[$]6",-"MUL" + // arm64:`NEG\sR[0-9]+<<6,\sR[0-9]+`,-`LSL`,-`MUL` b := -64 * n2 return a, b diff --git a/test/codegen/comparisons.go b/test/codegen/comparisons.go index d5bade97cc..072393f3a6 100644 --- a/test/codegen/comparisons.go +++ b/test/codegen/comparisons.go @@ -183,6 +183,10 @@ func CmpToZero(a, b, d int32, e, f int64) int32 { // arm:`AND`,-`TST` // 386:`ANDL` c6 := a&d >= 0 + // arm64:`TST\sR[0-9]+<<3,\sR[0-9]+` + c7 := e&(f<<3) < 0 + // arm64:`CMN\sR[0-9]+<<3,\sR[0-9]+` + c8 := e+(f<<3) < 0 if c0 { return 1 } else if c1 { @@ -197,6 +201,10 @@ func CmpToZero(a, b, d int32, e, f int64) int32 { return b + d } else if c6 { return a & d + } else if c7 { + return 7 + } else if c8 { + return 8 } else { return 0 } |
