“MOVOU” 在 golang 汇编中的含义是什么?

huangapple go评论82阅读模式
英文:

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汇编问题时能有所帮助。

对于你的具体问题,它绝对有用:

“MOVOU” 在 golang 汇编中的含义是什么?

你可能会发现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:

“MOVOU” 在 golang 汇编中的含义是什么?

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.)

huangapple
  • 本文由 发表于 2016年12月24日 23:55:44
  • 转载请务必保留本文链接:https://go.coder-hub.com/41314733.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定