-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
Description
What version of Go are you using (go version
)?
1.9.3 and tip(1b69d19)
What did you do?
Create the following file.
Run GOARCH=mips GOOS=linux go tool asm asm.s
or GOARCH=mips64 GOOS=linux go tool asm asm.s
asm.s
TEXT ·a(SB),0,$0
NEGW R1, R1
RET
What did you expect to see?
Success or a failure without panic.
What did you see instead?
$ GOARCH=mips64 GOOS=linux go tool asm asm.s
# package/path
asm: illegal combination NEGW REG NONE REG
00000 (./asm.s:2) NEGW R1, R1
asm: illegal combination NEGW REG NONE REG
00000 (./asm.s:2) NEGW R1, R1
asm: illegal combination NEGW REG NONE REG
00000 (./asm.s:2) NEGW R1, R1
asm: bad irr opcode NEGW
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xa0 pc=0x10ec707]
goroutine 1 [running]:
cmd/internal/obj/mips.(*ctxt0).asmout(0xc420055bc8, 0xc420093380, 0x127e940, 0xc420055b60, 0x4, 0x4)
$GOROOT/src/cmd/internal/obj/mips/asm0.go:1237 +0xac7
cmd/internal/obj/mips.span0(0xc4200bc000, 0xc4200c6000, 0xc42005e3c0)
$GOROOT/src/cmd/internal/obj/mips/asm0.go:500 +0x7c8
cmd/internal/obj.Flushplist(0xc4200bc000, 0xc420055e50, 0xc42005e3c0, 0x0, 0x0)
$GOROOT/src/cmd/internal/obj/plist.go:107 +0x6ca
main.main()
$GOROOT/src/cmd/asm/main.go:75 +0x543