Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't handle opcode 0x23 #9

Open
xyproto opened this issue Aug 1, 2018 · 3 comments
Open

Can't handle opcode 0x23 #9

xyproto opened this issue Aug 1, 2018 · 3 comments

Comments

@xyproto
Copy link
Contributor

xyproto commented Aug 1, 2018

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!")
}
@andoma
Copy link
Owner

andoma commented Aug 11, 2018

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
Copy link
Owner

andoma commented Aug 11, 2018

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.

@xyproto
Copy link
Contributor Author

xyproto commented Aug 12, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants