[go] runtime/cgo: add abi_riscv64.h for callee-saved register macros

0 views
Skip to first unread message

Quim Muntal (Gerrit)

unread,
9:21 AM (8 hours ago) 9:21 AM
to George Adams, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, David Chase, Russ Cox, Michael Pratt, Go LUCI, golang-co...@googlegroups.com

Quim Muntal submitted the change

Change information

Commit message:
runtime/cgo: add abi_riscv64.h for callee-saved register macros

Add abi_riscv64.h with SAVE_GPR/SAVE_FPR macros for saving and
restoring the RISC-V callee-saved registers, following the pattern
established by the other abi_*.h headers.

Refactor asm_riscv64.s (cgo crosscall2), asm_riscv64.s (runtime
_rt0_riscv64_lib), and race_riscv64.s (racecallbackthunk) to use
the new macros, replacing inline register save/restore sequences.
Change-Id: I83cef17a35c57fc8b5e045e7181460283ae5b423
Reviewed-by: David Chase <drc...@google.com>
Reviewed-by: Quim Muntal <quimm...@gmail.com>
Reviewed-by: Russ Cox <r...@golang.org>
Files:
  • M src/runtime/asm_riscv64.s
  • A src/runtime/cgo/abi_riscv64.h
  • M src/runtime/cgo/asm_riscv64.s
  • M src/runtime/race_riscv64.s
Change size: M
Delta: 4 files changed, 89 insertions(+), 144 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Russ Cox, +2 by Quim Muntal, +2 by David Chase
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I83cef17a35c57fc8b5e045e7181460283ae5b423
Gerrit-Change-Number: 749900
Gerrit-PatchSet: 5
Gerrit-Owner: George Adams <georgea...@gmail.com>
Gerrit-Reviewer: David Chase <drc...@google.com>
Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
Gerrit-Reviewer: Quim Muntal <quimm...@gmail.com>
Gerrit-Reviewer: Russ Cox <r...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages