Skip to content

Instantly share code, notes, and snippets.

@billglover
Created September 18, 2018 15:11
Show Gist options
  • Save billglover/68ec656e0fe467464f787dc76f16557e to your computer and use it in GitHub Desktop.
Save billglover/68ec656e0fe467464f787dc76f16557e to your computer and use it in GitHub Desktop.
Increment an integer 1000 times
0x0000 00000 (inline.go:8) TEXT "".inc(SB), NOSPLIT, $0-16
0x0000 00000 (inline.go:8) FUNCDATA $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x0000 00000 (inline.go:8) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x0000 00000 (inline.go:8) FUNCDATA $3, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x0000 00000 (inline.go:9) PCDATA $2, $0
0x0000 00000 (inline.go:9) PCDATA $0, $0
0x0000 00000 (inline.go:9) MOVQ "".n+8(SP), AX
0x0005 00005 (inline.go:9) XORL CX, CX
0x0007 00007 (inline.go:9) JMP 15
0x0009 00009 (inline.go:9) INCQ CX
0x000c 00012 (inline.go:10) INCQ AX
0x000f 00015 (inline.go:9) CMPQ CX, $1000
0x0016 00022 (inline.go:9) JLT 9
0x0018 00024 (inline.go:12) MOVQ AX, "".~r1+16(SP)
0x001d 00029 (inline.go:12) RET
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment