detached 39261b6

cleanup assembly (#81)

On amd64, AX should be zero. This commit replaces AX with BX and then zeros AX.

On arm64, R26 is a callee-saved register. Replace R26 with R0 as that register is about to be overwritten anyways.
commit
39261b6e83511eee15c3e9f793990f7f48da0ea8
author
TotallyGamerJet · · 2022-12-16 15:39 UTC
committer
GitHub · · 2022-12-16 15:39 UTC
parent
2a13cf5
signature
GPG Unverified4AEE18F83AFDEB23 The key is unknown
2 files · +8 -7
M internal/fakecgo/trampolines_amd64.s +4 -3
@@ -75,13 +75,14 @@ TEXT threadentry_trampoline(SB), NOSPLIT, $16
7575 CALL CX
7676 RET
7777
78-TEXT ·call5(SB), NOSPLIT, $0-0
79- MOVQ fn+0(FP), AX
78+TEXT ·call5(SB), NOSPLIT, $0-56
79+ MOVQ fn+0(FP), BX
8080 MOVQ a1+8(FP), DI
8181 MOVQ a2+16(FP), SI
8282 MOVQ a3+24(FP), DX
8383 MOVQ a4+32(FP), CX
8484 MOVQ a5+40(FP), R8
85- CALL AX
85+ XORL AX, AX
86+ CALL BX
8687 MOVQ AX, ret+48(FP)
8788 RET
@@ -75,13 +75,14 @@ TEXT threadentry_trampoline(SB), NOSPLIT, $16
75 CALL CX75 CALL CX
76 RET76 RET
77 77
78-TEXT ·call5(SB), NOSPLIT, $0-078+TEXT ·call5(SB), NOSPLIT, $0-56
79- MOVQ fn+0(FP), AX79+ MOVQ fn+0(FP), BX
80 MOVQ a1+8(FP), DI80 MOVQ a1+8(FP), DI
81 MOVQ a2+16(FP), SI81 MOVQ a2+16(FP), SI
82 MOVQ a3+24(FP), DX82 MOVQ a3+24(FP), DX
83 MOVQ a4+32(FP), CX83 MOVQ a4+32(FP), CX
84 MOVQ a5+40(FP), R884 MOVQ a5+40(FP), R8
85- CALL AX85+ XORL AX, AX
86+ CALL BX
86 MOVQ AX, ret+48(FP)87 MOVQ AX, ret+48(FP)
87 RET88 RET
M sys_darwin_arm64.s +4 -4
@@ -90,10 +90,10 @@ TEXT callbackasm1(SB), NOSPLIT, $208-0
9090 // Move parameters into registers
9191 // Get the ABIInternal function pointer
9292 // without <ABIInternal> by using a closure.
93- MOVD ·callbackWrap_call(SB), R26
94- MOVD (R26), R0 // fn unsafe.Pointer
95- MOVD R13, R1 // frame (&callbackArgs{...})
96- MOVD $0, R3 // ctxt uintptr
93+ MOVD ·callbackWrap_call(SB), R0
94+ MOVD (R0), R0 // fn unsafe.Pointer
95+ MOVD R13, R1 // frame (&callbackArgs{...})
96+ MOVD $0, R3 // ctxt uintptr
9797
9898 BL crosscall2(SB)
9999
@@ -90,10 +90,10 @@ TEXT callbackasm1(SB), NOSPLIT, $208-0
90 // Move parameters into registers90 // Move parameters into registers
91 // Get the ABIInternal function pointer91 // Get the ABIInternal function pointer
92 // without <ABIInternal> by using a closure.92 // without <ABIInternal> by using a closure.
93- MOVD ·callbackWrap_call(SB), R2693+ MOVD ·callbackWrap_call(SB), R0
94- MOVD (R26), R0 // fn unsafe.Pointer94+ MOVD (R0), R0 // fn unsafe.Pointer
95- MOVD R13, R1 // frame (&callbackArgs{...})95+ MOVD R13, R1 // frame (&callbackArgs{...})
96- MOVD $0, R3 // ctxt uintptr96+ MOVD $0, R3 // ctxt uintptr
97 97
98 BL crosscall2(SB)98 BL crosscall2(SB)
99 99

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