diff options
Diffstat (limited to 'test/codegen/arithmetic.go')
| -rw-r--r-- | test/codegen/arithmetic.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/codegen/arithmetic.go b/test/codegen/arithmetic.go index b91a904be9..0d6d969000 100644 --- a/test/codegen/arithmetic.go +++ b/test/codegen/arithmetic.go @@ -11,6 +11,21 @@ package codegen // For codegen tests on float types, see floats.go. // ----------------- // +// Addition // +// ----------------- // + +func AddLargeConst(a uint64, out []uint64) { + // ppc64x/power10:"ADD\t[$]4294967296," + // ppc64x/power9:"MOVD\t[$]i64.0000000100000000[(]SB[)]", "ADD\tR[0-9]*" + // ppc64x/power8:"MOVD\t[$]i64.0000000100000000[(]SB[)]", "ADD\tR[0-9]*" + out[0] = a + 0x100000000 + // ppc64x/power10:"ADD\t[$]-8589934592," + // ppc64x/power9:"MOVD\t[$]i64.fffffffe00000000[(]SB[)]", "ADD\tR[0-9]*" + // ppc64x/power8:"MOVD\t[$]i64.fffffffe00000000[(]SB[)]", "ADD\tR[0-9]*" + out[1] = a + 0xFFFFFFFE00000000 +} + +// ----------------- // // Subtraction // // ----------------- // |
