printer: use tabwriter to align instructions (#8)

This commit is contained in:
Michael McLoughlin
2019-01-10 21:21:41 -08:00
parent 0e253b3753
commit f77a2e3b9e
20 changed files with 1876 additions and 1821 deletions

View File

@@ -4,16 +4,18 @@
// func Sum(xs []uint64) uint64
TEXT ·Sum(SB), NOSPLIT, $0-32
MOVQ xs_base(FP), AX
MOVQ xs_len+8(FP), CX
XORQ DX, DX
MOVQ xs_base(FP), AX
MOVQ xs_len+8(FP), CX
XORQ DX, DX
loop:
CMPQ CX, $0x00
JE done
ADDQ (AX), DX
ADDQ $0x08, AX
DECQ CX
JMP loop
CMPQ CX, $0x00
JE done
ADDQ (AX), DX
ADDQ $0x08, AX
DECQ CX
JMP loop
done:
MOVQ DX, ret+24(FP)
MOVQ DX, ret+24(FP)
RET