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
fix: fixes vendoring issue #22
fix: fixes vendoring issue #22
Conversation
@Ko- @marten-seemann @alxdavids can you guys take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me. Although, should probably should get the other approvals as I am not an expert with assembly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work now. Thanks for the fix!
p503/consts.go
Outdated
@@ -23,6 +24,17 @@ const ( | |||
NumWords = 8 | |||
) | |||
|
|||
// CPU Capabilities. Those flags are reffered by assembly code. According to | |||
// https://github.com/golang/go/issues/28230, variables reffered from the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: referred. (2x here + 2x in p751)
* Assembly code can't reffer to variables which are not in the same package. * utils/cpu.go keeps flags indicating CPU capabilities. Currently this file keeps flags specific to X86, those flags are set only if program is run on X86, hence on ARM they always be false. Flags are coppied to variables which are local to P503 and P751 (so that assembly code can access them). * we dont need workaround in utils/utils.go anymore as utils/cpu.go is never ignored by the buildtags. See also: golang/go#28230 Fixes #21
Thnx guys! |
fix: fixes vendoring issue * Assembly code can't reffer to variables which are not in the same package. * utils/cpu.go keeps flags indicating CPU capabilities. Currently this file keeps flags specific to X86, those flags are set only if program is run on X86, hence on ARM they always be false. Flags are coppied to variables which are local to P503 and P751 (so that assembly code can access them). * we dont need workaround in utils/utils.go anymore as utils/cpu.go is never ignored by the buildtags. See also: golang/go#28230
Fixes #21