Commit e8b4c5bf authored by Shenghou Ma's avatar Shenghou Ma Committed by Minux Ma

runtime, runtime/internal/sys: fix build for linux/{mips64,mips64le}

Change-Id: I37bac9680efdfd797ca5dca90bd9a9e1001bfb68
Reviewed-on: https://go-review.googlesource.com/16874Reviewed-by: 's avatarMichael Matloob <matloob@golang.org>
parent 7c38ae08
// generated by gengoos.go using 'go generate'
package sys
const TheGoarch = `mips64`
const Goarch386 = 0
const GoarchAmd64 = 0
const GoarchAmd64p32 = 0
const GoarchArm = 0
const GoarchArmbe = 0
const GoarchArm64 = 0
const GoarchArm64be = 0
const GoarchPpc64 = 0
const GoarchPpc64le = 0
const GoarchMips = 0
const GoarchMipsle = 0
const GoarchMips64 = 1
const GoarchMips64le = 0
const GoarchMips64p32 = 0
const GoarchMips64p32le = 0
const GoarchPpc = 0
const GoarchS390 = 0
const GoarchS390x = 0
const GoarchSparc = 0
const GoarchSparc64 = 0
// generated by gengoos.go using 'go generate'
package sys
const TheGoarch = `mips64le`
const Goarch386 = 0
const GoarchAmd64 = 0
const GoarchAmd64p32 = 0
const GoarchArm = 0
const GoarchArmbe = 0
const GoarchArm64 = 0
const GoarchArm64be = 0
const GoarchPpc64 = 0
const GoarchPpc64le = 0
const GoarchMips = 0
const GoarchMipsle = 0
const GoarchMips64 = 0
const GoarchMips64le = 1
const GoarchMips64p32 = 0
const GoarchMips64p32le = 0
const GoarchPpc = 0
const GoarchS390 = 0
const GoarchS390x = 0
const GoarchSparc = 0
const GoarchSparc64 = 0
......@@ -7,7 +7,10 @@
package runtime
import "unsafe"
import (
"runtime/internal/sys"
"unsafe"
)
type sigctxt struct {
info *siginfo
......@@ -63,5 +66,5 @@ func (c *sigctxt) set_link(x uint64) { c.regs().sc_regs[31] = x }
func (c *sigctxt) set_sigcode(x uint32) { c.info.si_code = int32(x) }
func (c *sigctxt) set_sigaddr(x uint64) {
*(*uintptr)(add(unsafe.Pointer(c.info), 2*ptrSize)) = uintptr(x)
*(*uintptr)(add(unsafe.Pointer(c.info), 2*sys.PtrSize)) = uintptr(x)
}
......@@ -7,7 +7,10 @@
package runtime
import "unsafe"
import (
"runtime/internal/sys"
"unsafe"
)
func dumpregs(c *sigctxt) {
print("r0 ", hex(c.r0()), "\t")
......@@ -80,7 +83,7 @@ func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g) {
// functions are correctly handled. This smashes
// the stack frame but we're not going back there
// anyway.
sp := c.sp() - ptrSize
sp := c.sp() - sys.PtrSize
c.set_sp(sp)
*(*uint64)(unsafe.Pointer(uintptr(sp))) = c.link()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment