mirror of
https://github.com/golang/go.git
synced 2025-12-27 22:25:05 +00:00
cmd/compile: update ABI document for riscv64
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>
This commit is contained in:
parent
245bcdd478
commit
927c89bbc5
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user