detached 58aa9be

purego: remove go:nosplit at SyscallN (#24)

this is allowed because SyscallN also uses go:uintptrescapes which forces any objects that get passed as uintptr's to be placed on the heap where a stack split won't affect them. See the compile docs for an explanation.

I've tested this change on Oto (amd64 & arm64) without optimizations. I also ran all the test for ebitengine (amd64 & arm64) with OpenGL and Metal.

All this to say, this won't break anything.

This change fixes Oto#182
commit
58aa9be54b86ebaa662778658ecf943a3d1976ac
author
TotallyGamerJet · · 2022-08-23 12:44 UTC
committer
GitHub · · 2022-08-23 12:44 UTC
parent
c1f3f96
signature
GPG Unverified4AEE18F83AFDEB23 The key is unknown
1 file · +5 -1
M syscall.go +5 -1
@@ -18,7 +18,11 @@ const maxArgs = 9
1818 //
1919 // On amd64, if there are more than 8 floats the 9th and so on will be placed incorrectly on the
2020 // stack.
21-//go:nosplit
21+//
22+// The pragma go:nosplit is not needed at this function declaration because it uses go:uintptrescapes
23+// which forces all the objects that the uintptrs point to onto the heap where a stack split won't affect
24+// their memory location.
25+//
2226 //go:uintptrescapes
2327 func SyscallN(fn uintptr, args ...uintptr) (r1, r2, err uintptr) {
2428 if fn == 0 {
@@ -18,7 +18,11 @@ const maxArgs = 9
18 //18 //
19 // On amd64, if there are more than 8 floats the 9th and so on will be placed incorrectly on the19 // On amd64, if there are more than 8 floats the 9th and so on will be placed incorrectly on the
20 // stack.20 // stack.
21-//go:nosplit21+//
22+// The pragma go:nosplit is not needed at this function declaration because it uses go:uintptrescapes
23+// which forces all the objects that the uintptrs point to onto the heap where a stack split won't affect
24+// their memory location.
25+//
22 //go:uintptrescapes26 //go:uintptrescapes
23 func SyscallN(fn uintptr, args ...uintptr) (r1, r2, err uintptr) {27 func SyscallN(fn uintptr, args ...uintptr) (r1, r2, err uintptr) {
24 if fn == 0 {28 if fn == 0 {

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