main 3a10209

trampolines_riscv64.s RawHistoryFolder

1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: 2026 The Ebitengine Authors
3
4//go:build !cgo && linux
5
6#include "textflag.h"
7#include "go_asm.h"
8#include "abi_riscv64.h"
9
10// these trampolines map the gcc ABI to Go ABI and then calls into the Go equivalent functions.
11// X5 is used as temporary register.
12
13TEXT x_cgo_init_trampoline(SB), NOSPLIT, $16
14	MOV  ·x_cgo_init_call(SB), X5
15	MOV  (X5), X5
16	CALL X5
17	RET
18
19TEXT x_cgo_thread_start_trampoline(SB), NOSPLIT, $8
20	MOV  ·x_cgo_thread_start_call(SB), X5
21	MOV  (X5), X5
22	CALL X5
23	RET
24
25TEXT x_cgo_setenv_trampoline(SB), NOSPLIT, $8
26	MOV  ·x_cgo_setenv_call(SB), X5
27	MOV  (X5), X5
28	CALL X5
29	RET
30
31TEXT x_cgo_unsetenv_trampoline(SB), NOSPLIT, $8
32	MOV  ·x_cgo_unsetenv_call(SB), X5
33	MOV  (X5), X5
34	CALL X5
35	RET
36
37TEXT x_cgo_notify_runtime_init_done_trampoline(SB), NOSPLIT, $0
38	CALL ·x_cgo_notify_runtime_init_done(SB)
39	RET
40
41TEXT x_cgo_bindm_trampoline(SB), NOSPLIT, $0
42	CALL ·x_cgo_bindm(SB)
43	RET
44
45// func setg_trampoline(setg uintptr, g uintptr)
46TEXT ·setg_trampoline(SB), NOSPLIT, $0
47	MOV  gp+8(FP), X10
48	MOV  setg+0(FP), X5
49	CALL X5
50	RET
51
52TEXT threadentry_trampoline(SB), NOSPLIT, $200
53	MOV X10, 8(SP)
54
55	SAVE_GPR(8*2)
56	SAVE_FPR(8*14)
57
58	MOV  ·threadentry_call(SB), X5
59	MOV  (X5), X5
60	CALL X5
61
62	RESTORE_GPR(8*2)
63	RESTORE_FPR(8*14)
64
65	RET
66
67TEXT ·call5(SB), NOSPLIT, $0-48
68	MOV  fn+0(FP), X5
69	MOV  a1+8(FP), X10
70	MOV  a2+16(FP), X11
71	MOV  a3+24(FP), X12
72	MOV  a4+32(FP), X13
73	MOV  a5+40(FP), X14
74	CALL X5
75	MOV  X10, ret+48(FP)
76	RET

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close