]> Cypherpunks repositories - gostls13.git/commitdiff
doc: document PCALIGN directive
authorMauri de Souza Meneguzzo <mauri870@gmail.com>
Tue, 28 Nov 2023 18:50:01 +0000 (18:50 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 28 Nov 2023 19:15:27 +0000 (19:15 +0000)
Fixes #64283

Change-Id: Ie0167410fc5557143f0b2e17af56ad9fe34605cf
GitHub-Last-Rev: 77144c76d38ca261b6728ba12ff128d22553efa5
GitHub-Pull-Request: golang/go#64296
Reviewed-on: https://go-review.googlesource.com/c/go/+/544115
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
doc/asm.html

index f7787a4076ce600dbce55eef8b1dbdccdf2898c5..dd395ec8331467cd237355b280b92b687ee8c8da 100644 (file)
@@ -464,6 +464,23 @@ Function is the outermost frame of the call stack. Traceback should stop at this
 </li>
 </ul>
 
+<h3 id="special-instructions">Special instructions</h3>
+
+<p>
+The <code>PCALIGN</code> pseudo-instruction is used to indicate that the next instruction should be aligned
+to a specified boundary by padding with no-op instructions.
+</p>
+
+<p>
+It is currently supported on arm64, amd64, ppc64, loong64 and riscv64.
+
+For example, the start of the <code>MOVD</code> instruction below is aligned to 32 bytes:
+<pre>
+PCALIGN $32
+MOVD $2, R0
+</pre>
+</p>
+
 <h3 id="data-offsets">Interacting with Go types and constants</h3>
 
 <p>