diff options
Diffstat (limited to 'test/codegen/arithmetic.go')
| -rw-r--r-- | test/codegen/arithmetic.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/codegen/arithmetic.go b/test/codegen/arithmetic.go index d38f80c1e9..ce7a7c27f4 100644 --- a/test/codegen/arithmetic.go +++ b/test/codegen/arithmetic.go @@ -10,6 +10,16 @@ package codegen // simplifications and optimizations on integer types. // For codegen tests on float types, see floats.go. +// ----------------- // +// Subtraction // +// ----------------- // + +func SubMem(arr []int) int { + // 386:"SUBL\t4" + // amd64:"SUBQ\t8" + return arr[0] - arr[1] +} + // -------------------- // // Multiplication // // -------------------- // |
