From 5df4a6376f4368e55bfb848f27f078f237f01482 Mon Sep 17 00:00:00 2001 From: Mauri de Souza Meneguzzo Date: Tue, 28 Nov 2023 18:50:01 +0000 Subject: [PATCH] doc: document PCALIGN directive 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 Reviewed-by: Keith Randall Reviewed-by: Cherry Mui Auto-Submit: Keith Randall Reviewed-by: Keith Randall --- doc/asm.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/asm.html b/doc/asm.html index f7787a4076..dd395ec833 100644 --- a/doc/asm.html +++ b/doc/asm.html @@ -464,6 +464,23 @@ Function is the outermost frame of the call stack. Traceback should stop at this +

Special instructions

+ +

+The PCALIGN pseudo-instruction is used to indicate that the next instruction should be aligned +to a specified boundary by padding with no-op instructions. +

+ +

+It is currently supported on arm64, amd64, ppc64, loong64 and riscv64. + +For example, the start of the MOVD instruction below is aligned to 32 bytes: +

+PCALIGN $32
+MOVD $2, R0
+
+

+

Interacting with Go types and constants