Golang: what building instructions are available

I have a program that I am running on ARM and I am writing one of its functions in assembly. I have had great success with this, although sometimes it was difficult for me to figure out how to write certain instructions for the assembler, for example, I did not expect a shift to the right to look like this:

MOVW R3 → 8, R3

Now I want to do multiplication and accumulation (MLA), according to this document, not all opcodes are supported, so maybe there is no MLA, but I don't know how to say it or not. I see mentions of MLA regarding ARM in the golang report, but I'm not really sure what to do with what I see there.

Are there any documents anywhere which instructions are supported and how to write them down? Can anyone give me some helpful pointers?


source to share

1 answer

Here is some scrappy doc I wrote on how to write ARM assembler

I wrote this from the perspective of an experienced ARM person trying to figure out how the Go assembler works.

Here is an excerpt from the beginning. Feel free to email me if you have any more questions!

The Go assembler is based on the plan 9 assembler, which is described here.


A good introduction to ARM





  • The appointment is not the first to proceed
  • The options seem to be completely overridden.
  • Can be compressed to 2 operands, so
    • ADD r0, r0, r1; [ARM] r0 <-r0 + r1
    • written as
    • ADD r1, r0, r0
    • or
    • ADD r1, r0
  • Constants denoted by '$' not '#'