Closed
Description
hi,
Running go
(latest) or any compiled (with latest go) prog on a MIPS 24Kc V7.4
running OpenWRT (linux) results in the following
root@wgw:~# go env
SIGILL: illegal instruction
PC=0x47a6cc m=0 sigcode=128
goroutine 1 [running, locked to thread]:
runtime.asyncPreempt()
/usr/lib/go-1.14/src/runtime/preempt_mipsx.s:40 +0x7c fp=0x142876c sp=0x1428678 pc=0x47a6cc
context.init()
/usr/lib/go-1.14/src/context/context.go:157 fp=0x1428770 sp=0x1428770 pc=0x535854
runtime.doInit(0xe43bc0)
/usr/lib/go-1.14/src/runtime/proc.go:5414 +0xcc fp=0x1428784 sp=0x1428770 pc=0x4515ec
runtime.doInit(0xe46140)
/usr/lib/go-1.14/src/runtime/proc.go:5409 +0x80 fp=0x1428798 sp=0x1428784 pc=0x4515a0
runtime.doInit(0xe46e00)
/usr/lib/go-1.14/src/runtime/proc.go:5409 +0x80 fp=0x14287ac sp=0x1428798 pc=0x4515a0
runtime.doInit(0xe48100)
/usr/lib/go-1.14/src/runtime/proc.go:5409 +0x80 fp=0x14287c0 sp=0x14287ac pc=0x4515a0
runtime.main()
/usr/lib/go-1.14/src/runtime/proc.go:190 +0x22c fp=0x14287ec sp=0x14287c0 pc=0x441dc0
runtime.goexit()
/usr/lib/go-1.14/src/runtime/asm_mipsx.s:651 +0x4 fp=0x14287ec sp=0x14287ec pc=0x479f38
r0 0x0 r1 0x4
r2 0x0 r3 0x535854
r4 0x4 r5 0x1
r6 0xe0 r7 0x1464540
r8 0x5 r9 0x1
r10 0x4 r11 0x8
r12 0x1 r13 0xd
r14 0xf r15 0xb328d9
r16 0xb328db r17 0x3
r18 0xf8 r19 0x0
r20 0x1464570 r21 0xa38f84
r22 0xe43bdc r23 0xfffffffb
r24 0x1000002 r25 0x77fae67c
r26 0x0 r27 0x0
r28 0x77fe32a0 r29 0x1428678
r30 0x14000e0 r31 0x535854
pc 0x47a6cc link 0x535854
lo 0x0 hi 0x0
other example
root@wgw:~# cat test.go
package main
import (
"fmt"
"runtime"
)
func main() {
fmt.Println(runtime.GOOS)
}
root@wgw:~# go run test.go
SIGILL: illegal instruction
PC=0x47a6cc m=0 sigcode=128
goroutine 1 [running, locked to thread]:
runtime.asyncPreempt()
/usr/lib/go-1.14/src/runtime/preempt_mipsx.s:40 +0x7c fp=0x102a758 sp=0x102a664 pc=0x47a6cc
go/parser.init()
/usr/lib/go-1.14/src/go/parser/parser.go:171 fp=0x102a75c sp=0x102a75c pc=0x5b7154
runtime.doInit(0xe46440)
/usr/lib/go-1.14/src/runtime/proc.go:5414 +0xcc fp=0x102a770 sp=0x102a75c pc=0x4515ec
runtime.doInit(0xe47660)
/usr/lib/go-1.14/src/runtime/proc.go:5409 +0x80 fp=0x102a784 sp=0x102a770 pc=0x4515a0
runtime.doInit(0xe45bc0)
/usr/lib/go-1.14/src/runtime/proc.go:5409 +0x80 fp=0x102a798 sp=0x102a784 pc=0x4515a0
runtime.doInit(0xe46e00)
/usr/lib/go-1.14/src/runtime/proc.go:5409 +0x80 fp=0x102a7ac sp=0x102a798 pc=0x4515a0
runtime.doInit(0xe48100)
/usr/lib/go-1.14/src/runtime/proc.go:5409 +0x80 fp=0x102a7c0 sp=0x102a7ac pc=0x4515a0
runtime.main()
/usr/lib/go-1.14/src/runtime/proc.go:190 +0x22c fp=0x102a7ec sp=0x102a7c0 pc=0x441dc0
runtime.goexit()
/usr/lib/go-1.14/src/runtime/asm_mipsx.s:651 +0x4 fp=0x102a7ec sp=0x102a7ec pc=0x479f38
r0 0x0 r1 0x55
r2 0x0 r3 0x5b7154
r4 0x4 r5 0x1
r6 0x69 r7 0x1080000
r8 0x3 r9 0x1
r10 0x1 r11 0x8
r12 0x1 r13 0xd
r14 0xf r15 0xb327f9
r16 0x0 r17 0x0
r18 0xf1 r19 0x18
r20 0x1080020 r21 0xa395e3
r22 0xe46480 r23 0xe80000
r24 0x1000002 r25 0x77f6667c
r26 0x0 r27 0x0
r28 0x77f9b2a0 r29 0x102a664
r30 0x10000e0 r31 0x5b7154
pc 0x47a6cc link 0x5b7154
lo 0x0 hi 0x0
root@wgw:~# Connection to 192.168.8.1 closed.
me@box:/opt/go/src/test $ GOARCH=mips GOOS=linux CGO_ENABLED=0 go build -a -o test -gcflags="all=-d softfloat"
me@box:/opt/go/src/test $ scp test [email protected]:
test 100% 1572KB 1.7MB/s 00:00
me@box:/opt/go/src/test $ ssh [email protected]
BusyBox v1.31.1 () built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt SNAPSHOT, r12565-32726846c8
-----------------------------------------------------
root@wgw:~# ./test
linux
root@wgw:~#