]> Cypherpunks repositories - gostls13.git/commitdiff
doc: add mips, mips64 information to asm.html
authorVladimir Stefanovic <vladimir.stefanovic@imgtec.com>
Tue, 20 Dec 2016 17:24:40 +0000 (18:24 +0100)
committerRob Pike <r@golang.org>
Tue, 20 Dec 2016 20:58:12 +0000 (20:58 +0000)
Fixes #18105

Change-Id: Id56e8782ff618761ec44b6dc20891c8b48fea8df
Reviewed-on: https://go-review.googlesource.com/34632
Reviewed-by: Rob Pike <r@golang.org>
doc/asm.html

index 3e03c548fd189b8c014f5fc0b443ccdad326ef39..79dc7df322fadb6a58b2674d5aadbb8a0db55e6f 100644 (file)
@@ -838,6 +838,44 @@ It is a scaled mode as on the x86, but the only scale allowed is <code>1</code>.
 
 </ul>
 
+<h3 id="mips">MIPS, MIPS64</h3>
+
+<p>
+General purpose registers are named <code>R0</code> through <code>R31</code>,
+floating point registers are <code>F0</code> through <code>F31</code>.
+</p>
+
+<p>
+<code>R30</code> is reserved to point to <code>g</code>.
+<code>R23</code> is used as a temporary register.
+</p>
+
+<p>
+In a <code>TEXT</code> directive, the frame size <code>$-4</code> for MIPS or
+<code>$-8</code> for MIPS64 instructs the linker not to save <code>LR</code>.
+</p>
+
+<p>
+<code>SP</code> refers to the virtual stack pointer.
+For the hardware register, use <code>R29</code>.
+</p>
+
+<p>
+Addressing modes:
+</p>
+
+<ul>
+
+<li>
+<code>16(R1)</code>: The location at <code>R1</code> plus 16.
+</li>
+
+<li>
+<code>(R1)</code>: Alias for <code>0(R1)</code>.
+</li>
+
+</ul>
+
 <h3 id="unsupported_opcodes">Unsupported opcodes</h3>
 
 <p>