Skip to content

internal/fakecgo: use riscv64 ABI macros for callee-saved register save/restore - #427

Merged
hajimehoshi merged 1 commit into
ebitengine:mainfrom
gdams:riscvabi
Mar 2, 2026
Merged

internal/fakecgo: use riscv64 ABI macros for callee-saved register save/restore#427
hajimehoshi merged 1 commit into
ebitengine:mainfrom
gdams:riscvabi

Conversation

@gdams

@gdams gdams commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

What type of issue is this addressing?

feature

What this PR does | solves

In https://go-review.googlesource.com/c/go/+/749900 I added SAVE_GPR/RESTORE_GPR/SAVE_FPR/RESTORE_FPR macros to the Go toolchain for RISC-V. Pull down abi_riscv64.h with those macros and update asm_riscv64.s and trampolines_riscv64.s to use them instead of manually saving and restoring each callee-saved register.

…ve/restore

In https://go-review.googlesource.com/c/go/+/749900 I added
SAVE_GPR/RESTORE_GPR/SAVE_FPR/RESTORE_FPR macros to the Go toolchain
for RISC-V. Pull down abi_riscv64.h with those macros and update
asm_riscv64.s and trampolines_riscv64.s to use them instead of
manually saving and restoring each callee-saved register.
@gdams gdams changed the title internal/fakecgo: use riscv64 ABI macros for callee-saved register sa… internal/fakecgo: use riscv64 ABI macros for callee-saved register save/restore Mar 1, 2026
Comment thread internal/fakecgo/abi_riscv64.h

@TotallyGamerJet TotallyGamerJet left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hajimehoshi hajimehoshi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hajimehoshi
hajimehoshi merged commit 012b8c4 into ebitengine:main Mar 2, 2026
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants