mirror of
https://github.com/chai2010/advanced-go-programming-book.git
synced 2025-05-23 20:02:22 +00:00
Merge pull request #522 from damonchen/patch-1
fix: compile error of pkg_amd64.s
This commit is contained in:
commit
e04e007edb
@ -72,7 +72,9 @@ var Id int
|
|||||||
我们将完整的汇编代码放到pkg_amd64.s文件中:
|
我们将完整的汇编代码放到pkg_amd64.s文件中:
|
||||||
|
|
||||||
```
|
```
|
||||||
GLOBL ·Id(SB),$8
|
#include "textflag.h"
|
||||||
|
|
||||||
|
GLOBL ·Id(SB),NOPTR,$8
|
||||||
|
|
||||||
DATA ·Id+0(SB)/1,$0x37
|
DATA ·Id+0(SB)/1,$0x37
|
||||||
DATA ·Id+1(SB)/1,$0x25
|
DATA ·Id+1(SB)/1,$0x25
|
||||||
@ -98,6 +100,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
对于Go包的用户来说,用Go汇编语言或Go语言实现并无任何区别。
|
对于Go包的用户来说,用Go汇编语言或Go语言实现并无任何区别。
|
||||||
|
|
||||||
## 3.1.3 定义字符串变量
|
## 3.1.3 定义字符串变量
|
||||||
|
Loading…
x
Reference in New Issue
Block a user