With the register ABI, it's important to inject sigpanic0 instead of
sigpanic so we can set up function entry registers. This was already
happening on most OSes. This CL gets the remaining ones.
Change-Id: I6bc4d912b6497e03ed54d0a9c1eae8fd099d2cea
Reviewed-on: https://go-review.googlesource.com/c/go/+/308930
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
if usesLR {
c.setpc(funcPC(sigpanictramp))
} else {
- c.setpc(funcPC(sigpanic))
+ c.setpc(funcPC(sigpanic0))
}
return _NCONT
}
*((*uintptr)(sp)) = r.ip()
}
}
- r.set_ip(funcPC(sigpanic))
+ r.set_ip(funcPC(sigpanic0))
return _EXCEPTION_CONTINUE_EXECUTION
}
// Called from linker-generated .initarray; declared for go vet; do NOT call from Go.
func addmoduledata()
-// Injected by the signal handler for panicking signals. On many platforms it just
-// jumps to sigpanic.
+// Injected by the signal handler for panicking signals.
+// Initializes any registers that have fixed meaning at calls but
+// are scratch in bodies and calls sigpanic.
+// On many platforms it just jumps to sigpanic.
func sigpanic0()
// intArgRegs is used by the various register assignment