英文:
What does "MOVOU" mean in golang assembly
问题
当我阅读一些 Golang 的汇编代码时,我发现了 MOVOU
这个指令。但是在谷歌上搜索时,我找不到关于这个指令的任何信息。
例如:src/runtime/asm_amd64.s#L933
MOVOU -16(AX), X1
英文:
When I was reading some Golang's asm codes, I found MOVOU
. And I can't get anything about this instruction by searching on Google.
For example: src/runtime/asm_amd64.s#L933
MOVOU -16(AX), X1
答案1
得分: 6
很不幸,Go x86语法中存在许多奇怪的名称、不一致和问题。
正如评论中指出的那样,MOVOU应该是MOVDQU。
我试图维护一个Go汇编补充参考,填补官方文档中的一些空白,但目前它已经过时了,需要进行一些清理工作。
计划在实现细节稳定后,在那里编写AVX512的详细信息。
我希望它对于快速搜索一些Go汇编问题时能有所帮助。
对于你的具体问题,它绝对有用:
你可能会发现x86.v0.2.csv很有用,因为它为每个列出的指令提供了Intel、GNU和Go语法。
正如名称中的v0.2
所暗示的,未来将会有更新和修复。
更糟糕的是,还有一些别名,允许你使用PADDD
代替PADDL
。
由于向后兼容性,这不太可能会改变。
为了避免完全负面的印象,Go汇编也有一些做得很好的地方。例如,它会检查指令的立即操作数宽度,以确保只设置了较低的N位。
它还不允许对于“无符号”立即操作数使用负常数。
(作为额外的奖励,这里有一个包含一些Russ Cox关于这个主题的想法的问题:issue21528。)
英文:
Unfortunately, there are lots of weird names, inconsistencies and issues in Go x86 syntax.
As already pointed in comments, the MOVOU is MOVDQU.
I try to maintain Go assembly complementary reference, which fills some documentation gaps of official documentation, but currently it's pretty out-of-date and requires some cleanup.
Planning to write AVX512 details there, when implementation details are stabilized.
I hope it is useful for quick ctrl+F
search for some Go asm questions.
For your particular question, it's definitely useful:
You may find x86.v0.2.csv useful, as it gives you Intel, GNU and Go syntax for each listed instruction.
As v0.2
in name suggests, there will be updates and fixes in future.
To make things worse, there are aliases that allow you to write, for example, PADDD
instead of PADDL
.
This is unlikely to ever change due to backwards-compatibility.
To avoid completely negative impression, there are some stuff that Go asm "does well". For example, it checks immediate operands widths for instructions that expect only lower N bits to be set.
It also does not permit negative constants for "unsigned" immediate operands.
(as a bonus, here is an issue that contains some Russ Cox thoughts on this topic: issue21528.)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论