]> git.feebdaed.xyz Git - 0xmirror/go.git/commitdiff
cmd/compile: update ABI document for riscv64
authorMeng Zhuo <mengzhuo@iscas.ac.cn>
Wed, 10 Dec 2025 13:08:01 +0000 (21:08 +0800)
committerDavid Chase <drchase@google.com>
Thu, 11 Dec 2025 23:07:30 +0000 (15:07 -0800)
The duff device has been dropped on riscv64, we can
remove related documentation now.

Change-Id: Iffe5093bde6854bca236e290b91ab9f48d3f8c06
Reviewed-on: https://go-review.googlesource.com/c/go/+/728901
Reviewed-by: Mark Ryan <markdryan@rivosinc.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/cmd/compile/abi-internal.md

index 8de8356132ad14cc4cff0b2084371923af30082c..a04b5aed3faccc4f8aa469d529c91b955c08903a 100644 (file)
@@ -799,17 +799,15 @@ assembly code are as follows:
 | X2  | Stack pointer | Same | Same |
 | X3  | Global pointer | Same | Used by dynamic linker |
 | X4  | TLS (thread pointer) | TLS | Scratch |
-| X24,X25 | Scratch | Scratch | Used by duffcopy, duffzero |
 | X26 | Closure context pointer | Scratch | Scratch |
 | X27 | Current goroutine | Same | Same |
 | X31 | Scratch | Scratch | Scratch |
 
 *Rationale*: These register meanings are compatible with Go’s
-stack-based calling convention. Context register X20 will change to X26,
-duffcopy, duffzero register will change to X24, X25 before this register ABI been adopted.
+stack-based calling convention.
 X10 – X17, X8, X9, X18 – X23, is the same order as A0 – A7, S0 – S7 in platform ABI.
 F10 – F17, F8, F9, F18 – F23, is the same order as FA0 – FA7, FS0 – FS7 in platform ABI.
-X8 – X23, F8 – F15 are used for compressed instruction (RVC) which will benefit code size in the future.
+X8 – X23, F8 – F15 are used for compressed instruction (RVC) which benefits code size.
 
 #### Stack layout