Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ch3-05-control-flow.md #420

Merged
merged 2 commits into from
Feb 21, 2019
Merged

Update ch3-05-control-flow.md #420

merged 2 commits into from
Feb 21, 2019

Conversation

whtiehack
Copy link
Contributor

fix errors.

不知道为什么,这个标志NOSPLIT 不可以有,报错如下:

# mypkg/xch3/ch304/tmain
xch3\ch304\tmain\main_amd64.s:37: illegal or missing addressing mode for symbol NOSPLIT
asm: assembly of xch3\ch304\tmain\main_amd64.s failed

然后 汇编里面应该是没有goto指令吧。。goto应该是JMP。

@chai2010
Copy link
Owner

NOSPLITtextflag.h头文件定义,需要包含进来。
真实的值其实是一个bit组成的整数。

可能是这个原因

@whtiehack
Copy link
Contributor Author

感谢解惑。加上没有报错了。

// Don't insert stack check preamble.
#define NOSPLIT	4

textflag.hgo/src/runtime/ 路径下

@chai2010 chai2010 merged commit cd7b74f into chai2010:master Feb 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants