v0.9.0-alpha.1 907f1d9

abi_amd64.h RawHistoryFolder

1// Copyright 2021 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Macros for transitioning from the host ABI to Go ABI0.
6//
7// These save the frame pointer, so in general, functions that use
8// these should have zero frame size to suppress the automatic frame
9// pointer, though it's harmless to not do this.
10
11#ifdef GOOS_windows
12
13// REGS_HOST_TO_ABI0_STACK is the stack bytes used by
14// PUSH_REGS_HOST_TO_ABI0.
15#define REGS_HOST_TO_ABI0_STACK (28*8 + 8)
16
17// PUSH_REGS_HOST_TO_ABI0 prepares for transitioning from
18// the host ABI to Go ABI0 code. It saves all registers that are
19// callee-save in the host ABI and caller-save in Go ABI0 and prepares
20// for entry to Go.
21//
22// Save DI SI BP BX R12 R13 R14 R15 X6-X15 registers and the DF flag.
23// Clear the DF flag for the Go ABI.
24// MXCSR matches the Go ABI, so we don't have to set that,
25// and Go doesn't modify it, so we don't have to save it.
26#define PUSH_REGS_HOST_TO_ABI0()	\
27	PUSHFQ			\
28	CLD			\
29	ADJSP	$(REGS_HOST_TO_ABI0_STACK - 8)	\
30	MOVQ	DI, (0*0)(SP)	\
31	MOVQ	SI, (1*8)(SP)	\
32	MOVQ	BP, (2*8)(SP)	\
33	MOVQ	BX, (3*8)(SP)	\
34	MOVQ	R12, (4*8)(SP)	\
35	MOVQ	R13, (5*8)(SP)	\
36	MOVQ	R14, (6*8)(SP)	\
37	MOVQ	R15, (7*8)(SP)	\
38	MOVUPS	X6, (8*8)(SP)	\
39	MOVUPS	X7, (10*8)(SP)	\
40	MOVUPS	X8, (12*8)(SP)	\
41	MOVUPS	X9, (14*8)(SP)	\
42	MOVUPS	X10, (16*8)(SP)	\
43	MOVUPS	X11, (18*8)(SP)	\
44	MOVUPS	X12, (20*8)(SP)	\
45	MOVUPS	X13, (22*8)(SP)	\
46	MOVUPS	X14, (24*8)(SP)	\
47	MOVUPS	X15, (26*8)(SP)
48
49#define POP_REGS_HOST_TO_ABI0()	\
50	MOVQ	(0*0)(SP), DI	\
51	MOVQ	(1*8)(SP), SI	\
52	MOVQ	(2*8)(SP), BP	\
53	MOVQ	(3*8)(SP), BX	\
54	MOVQ	(4*8)(SP), R12	\
55	MOVQ	(5*8)(SP), R13	\
56	MOVQ	(6*8)(SP), R14	\
57	MOVQ	(7*8)(SP), R15	\
58	MOVUPS	(8*8)(SP), X6	\
59	MOVUPS	(10*8)(SP), X7	\
60	MOVUPS	(12*8)(SP), X8	\
61	MOVUPS	(14*8)(SP), X9	\
62	MOVUPS	(16*8)(SP), X10	\
63	MOVUPS	(18*8)(SP), X11	\
64	MOVUPS	(20*8)(SP), X12	\
65	MOVUPS	(22*8)(SP), X13	\
66	MOVUPS	(24*8)(SP), X14	\
67	MOVUPS	(26*8)(SP), X15	\
68	ADJSP	$-(REGS_HOST_TO_ABI0_STACK - 8)	\
69	POPFQ
70
71#else
72// SysV ABI
73
74#define REGS_HOST_TO_ABI0_STACK (6*8)
75
76// SysV MXCSR matches the Go ABI, so we don't have to set that,
77// and Go doesn't modify it, so we don't have to save it.
78// Both SysV and Go require DF to be cleared, so that's already clear.
79// The SysV and Go frame pointer conventions are compatible.
80#define PUSH_REGS_HOST_TO_ABI0()	\
81	ADJSP	$(REGS_HOST_TO_ABI0_STACK)	\
82	MOVQ	BP, (5*8)(SP)	\
83	LEAQ	(5*8)(SP), BP	\
84	MOVQ	BX, (0*8)(SP)	\
85	MOVQ	R12, (1*8)(SP)	\
86	MOVQ	R13, (2*8)(SP)	\
87	MOVQ	R14, (3*8)(SP)	\
88	MOVQ	R15, (4*8)(SP)
89
90#define POP_REGS_HOST_TO_ABI0()	\
91	MOVQ	(0*8)(SP), BX	\
92	MOVQ	(1*8)(SP), R12	\
93	MOVQ	(2*8)(SP), R13	\
94	MOVQ	(3*8)(SP), R14	\
95	MOVQ	(4*8)(SP), R15	\
96	MOVQ	(5*8)(SP), BP	\
97	ADJSP	$-(REGS_HOST_TO_ABI0_STACK)
98
99#endif

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