]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/runtime/proc1.go
[dev.cc] all: merge dev.power64 (7667e41f3ced) into dev.cc
[gostls13.git] / src / runtime / proc1.go
index a19bf144c181bcad9133994f099ce74ccff66c79..81b211d0d35039a0b5c4099a04a63722ec1c326f 100644 (file)
@@ -1888,7 +1888,7 @@ func malg(stacksize int32) *g {
 //go:nosplit
 func newproc(siz int32, fn *funcval) {
        argp := add(unsafe.Pointer(&fn), ptrSize)
-       if thechar == '5' {
+       if hasLinkRegister {
                argp = add(argp, ptrSize) // skip caller's saved LR
        }
 
@@ -1940,7 +1940,7 @@ func newproc1(fn *funcval, argp *uint8, narg int32, nret int32, callerpc uintptr
        sp -= 4 * regSize // extra space in case of reads slightly beyond frame
        sp -= uintptr(siz)
        memmove(unsafe.Pointer(sp), unsafe.Pointer(argp), uintptr(narg))
-       if thechar == '5' {
+       if hasLinkRegister {
                // caller's LR
                sp -= ptrSize
                *(*unsafe.Pointer)(unsafe.Pointer(sp)) = nil