]> Cypherpunks repositories - gostls13.git/commitdiff
runtime, runtime/internal/sys: fix build for linux/{mips64,mips64le}
authorShenghou Ma <minux@golang.org>
Thu, 12 Nov 2015 20:43:18 +0000 (15:43 -0500)
committerMinux Ma <minux@golang.org>
Thu, 12 Nov 2015 20:59:56 +0000 (20:59 +0000)
Change-Id: I37bac9680efdfd797ca5dca90bd9a9e1001bfb68
Reviewed-on: https://go-review.googlesource.com/16874
Reviewed-by: Michael Matloob <matloob@golang.org>
src/runtime/internal/sys/zgoarch_mips64.go [new file with mode: 0644]
src/runtime/internal/sys/zgoarch_mips64le.go [new file with mode: 0644]
src/runtime/signal_linux_mips64x.go
src/runtime/signal_mips64x.go

diff --git a/src/runtime/internal/sys/zgoarch_mips64.go b/src/runtime/internal/sys/zgoarch_mips64.go
new file mode 100644 (file)
index 0000000..b4a97d6
--- /dev/null
@@ -0,0 +1,26 @@
+// 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
diff --git a/src/runtime/internal/sys/zgoarch_mips64le.go b/src/runtime/internal/sys/zgoarch_mips64le.go
new file mode 100644 (file)
index 0000000..3328a35
--- /dev/null
@@ -0,0 +1,26 @@
+// 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
index c550f69908267c1da129c62cd1dabc8a8b9c1770..671b9167b836cdbbe41360e95712d80be998e748 100644 (file)
@@ -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)
 }
index 81ce59594a592512ccdd7679e123237405e24bf1..51598e8e5a9c54ff3193349306a25a453ce919bb 100644 (file)
@@ -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()