1
0
mirror of https://github.com/chai2010/advanced-go-programming-book.git synced 2025-05-24 04:22:22 +00:00

Update ch3-05-control-flow.md

This commit is contained in:
smallwhite 2019-02-21 13:41:43 +08:00 committed by GitHub
parent a801c6c00d
commit 2c371feef4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -213,8 +213,10 @@ LOOP_END:
下面用汇编语言重新实现LoopAdd函数
```
#include "textflag.h"
// func LoopAdd(cnt, v0, step int) int
TEXT ·LoopAdd(SB), $0-32
TEXT ·LoopAdd(SB), NOSPLIT, $0-32
MOVQ cnt+0(FP), AX // cnt
MOVQ v0+8(FP), BX // v0/result
MOVQ step+16(FP), CX // step