Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "MOVOU" mean in golang assembly

Tags:

x86

assembly

go

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
like image 531
templexxx Avatar asked Dec 24 '16 15:12

templexxx


1 Answers

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:

enter image description here

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

like image 122
Iskander Sharipov Avatar answered Sep 18 '22 13:09

Iskander Sharipov