| 1 | //go:build ignore |
| 2 | |
| 3 | package main |
| 4 | |
| 5 | import ( |
| 6 | . "github.com/mmcloughlin/avo/build" |
| 7 | . "github.com/mmcloughlin/avo/operand" |
| 8 | ) |
| 9 | |
| 10 | func main() { |
| 11 | TEXT("Issue100", NOSPLIT, "func() uint64") |
| 12 | x := GP64() |
| 13 | XORQ(x, x) |
| 14 | for i := 1; i <= 100; i++ { |
| 15 | t := GP64() |
| 16 | MOVQ(U32(i), t) |
| 17 | ADDQ(t.As64(), x) |
| 18 | } |
| 19 | Store(x, ReturnIndex(0)) |
| 20 | RET() |
| 21 | Generate() |
| 22 | } |