]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: work around vet asmdecl checks for openbsd/386 mstart_stub
authorJoel Sing <joel@sing.id.au>
Fri, 30 Apr 2021 18:47:00 +0000 (04:47 +1000)
committerJoel Sing <joel@sing.id.au>
Fri, 30 Apr 2021 19:26:14 +0000 (19:26 +0000)
Include a NOP with the SP in order to disable/bypass vet asmdecl checks
for runtime.mstart_stub on openbsd/386. Without this we get:

runtime/sys_openbsd_386.s:33:1: [386] mstart_stub: use of 32(SP) points beyond argument frame

Change-Id: I834ae3dbceffcb5776481b076ec2afe3700671cf
Reviewed-on: https://go-review.googlesource.com/c/go/+/315789
Trust: Joel Sing <joel@sing.id.au>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Joel Sing <joel@sing.id.au>

src/runtime/sys_openbsd_386.s

index f1911a588de7642d8503d4161a9b3207f8bc2e48..2701097c6495030b376bd64de125ea2baf9d1ac4 100644 (file)
@@ -22,6 +22,8 @@ TEXT runtime·setldt(SB),NOSPLIT,$0
 // It just does some low-level setup and then calls mstart.
 // Note: called with the C calling convention.
 TEXT runtime·mstart_stub(SB),NOSPLIT,$28
+       NOP     SP      // tell vet SP changed - stop checking offsets
+
        // We are already on m's g0 stack.
 
        // Save callee-save registers.