Skip to content

Conversation

@froydnj
Copy link
Contributor

@froydnj froydnj commented Feb 14, 2018

Running wasm2asm on files in test/ revealed some errors in handling float operations. This pull request is a first attempt at handling them. More complex operations, like conversion, reinterpretation, and copysign, are left for later.

@kripken
Copy link
Member

kripken commented Feb 14, 2018

These changes don't require updates in the existing wasm2asm tests?

We weren't handling them before, but it wasn't obvious.  Make the (non-)
handling of them explicit in the code.  We'll add handlers for them
shortly.
min, max, and copysign will require more sophisticated handling.
It was previously grouped with the i32 ops.
@froydnj froydnj force-pushed the binary-float-handling branch from e9983bc to 12bd93d Compare February 15, 2018 16:38
@froydnj
Copy link
Contributor Author

froydnj commented Feb 15, 2018

These changes don't require updates in the existing wasm2asm tests?

Good point, added tests for translating everything (no assertions yet, though). The asm.js looks a little funny (multiple returns, for instance), but that can be handled in a followup.


}

function $$1($$0, $$1) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, it would be nice to have wasm2asm emit proper function names (same name as in the wasm)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For ease of debugging?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think it would help debugging and also reading the testcases.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should only do it with -g or something like that?

@kripken
Copy link
Member

kripken commented Feb 15, 2018

Looks good, thanks!

@kripken kripken merged commit 85ae8cc into WebAssembly:master Feb 15, 2018
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

Successfully merging this pull request may close these issues.

2 participants