vmir icon indicating copy to clipboard operation
vmir copied to clipboard

Can't handle opcode 0x23

Open xyproto opened this issue 7 years ago • 3 comments
trafficstars

When checking out the latest commit of the Go compiler and building a simple "hello world" program with:

GOARCH=wasm GOOS=js go build

And then running it with vmir, I get the following error:

Skipping named section go.buildid
Can't handle opcode 0x23

Dump of faildump function (null) (i32 (*)())
.0: "Preamble"
         (i64)%0 = move (i64)%32#0x0
         (i64)%1 = move (i64)%33#0x0
         (i64)%2 = move (i64)%34#0x0
         (i64)%3 = move (i64)%35#0x0
         (i64)%4 = move (i64)%36#0x0
         (i64)%5 = move (i64)%37#0x0
         (i64)%6 = move (i64)%38#0x0
         (i64)%7 = move (i64)%39#0x0
         (i64)%8 = move (i64)%40#0x0
         (i64)%9 = move (i64)%41#0x0
         (i64)%10 = move (i64)%42#0x0
         (i64)%11 = move (i64)%43#0x0
         (i64)%12 = move (i64)%44#0x0
         (i64)%13 = move (i64)%45#0x0
         (i64)%14 = move (i64)%46#0x0
         (i64)%15 = move (i64)%47#0x0
         (double)%16 = move (double)%48#0.000000
         (double)%17 = move (double)%49#0.000000
         (double)%18 = move (double)%50#0.000000
         (double)%19 = move (double)%51#0.000000
         (double)%20 = move (double)%52#0.000000
         (double)%21 = move (double)%53#0.000000
         (double)%22 = move (double)%54#0.000000
         (double)%23 = move (double)%55#0.000000
         (double)%24 = move (double)%56#0.000000
         (double)%25 = move (double)%57#0.000000
         (double)%26 = move (double)%58#0.000000
         (double)%27 = move (double)%59#0.000000
         (double)%28 = move (double)%60#0.000000
         (double)%29 = move (double)%61#0.000000
         (double)%30 = move (double)%62#0.000000
         (double)%31 = move (double)%63#0.000000
         b .1

.1: "Func block"
         b .3

.3: "Loop start"

.10: "Block exit"

.9: "Block exit"

.8: "Block exit"

.7: "Block exit"

.6: "Block exit"

.5: "Block exit"

.4: "Block exit"

.2: "Block exit"

Here's the "hello world" program, main.go:

package main

import "fmt"

func main() {
        fmt.Println("Hello, World!")
}

xyproto avatar Aug 01 '18 10:08 xyproto

I've never really tested it with GO's backend. I'll test and see if I can figure out what's going on.

andoma avatar Aug 11 '18 15:08 andoma

Apparently there is a lot of stuff missing to be able to run GO binaries.

But It's an interesting challenge. I'm gonna work on it and keep adding missing things and see where it takes us.

andoma avatar Aug 11 '18 17:08 andoma

Cool, it would be fun to be able to run wasm executables as if they were native console applications.

xyproto avatar Aug 12 '18 00:08 xyproto