]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/runtime/panic.go
[dev.cc] all: merge dev.power64 (7667e41f3ced) into dev.cc
[gostls13.git] / src / runtime / panic.go
index 8debd33560e5001ecc02082b2fcd53b1dae34cfc..8929467025e5f7b2276a473374a33c9bcdf58129 100644 (file)
@@ -66,7 +66,7 @@ func deferproc(siz int32, fn *funcval) { // arguments of fn follow fn
        // we can only call nosplit routines.
        argp := uintptr(unsafe.Pointer(&fn))
        argp += unsafe.Sizeof(fn)
-       if GOARCH == "arm" {
+       if GOARCH == "arm" || GOARCH == "power64" || GOARCH == "power64le" {
                argp += ptrSize // skip caller's saved link register
        }
        callerpc := getcallerpc(unsafe.Pointer(&siz))
@@ -498,12 +498,12 @@ func throw(s *byte) {
 
 //go:nosplit
 func gothrow(s string) {
+       print("fatal error: ", s, "\n")
        gp := getg()
        if gp.m.throwing == 0 {
                gp.m.throwing = 1
        }
        startpanic()
-       print("fatal error: ", s, "\n")
        dopanic(0)
        *(*int)(nil) = 0 // not reached
 }