Skip to content

Add windows implementation of wasm2c runtime - #1843

Merged
sbc100 merged 3 commits into
mainfrom
wasm_rt_win
Mar 10, 2022
Merged

sbc100 merged 3 commits into
mainfrom
wasm_rt_win

Conversation

@sbc100

@sbc100 sbc100 commented Mar 2, 2022 •

Copy link
Copy Markdown
Member

All tests are now passing with cl.exe under x64. With x86 there are some test failure that I believe relate
the use of the x87 registers to pass floating point numbers. I suggest we look into fixing those as a followup.

Split out from #1833

@sbc100
sbc100 force-pushed the wasm_rt_win branch 10 times, most recently from a8cff25 to 954e37d Compare March 2, 2022 16:16
sbc100 added a commit that referenced this pull request Mar 2, 2022
Use stricter compiler settings and fix all the resulting warnings.
This is precursor to landing windows compiler support for wasm2c.
See #1843.
sbc100 added a commit that referenced this pull request Mar 2, 2022
Use stricter compiler settings and fix all the resulting warnings.
This is precursor to landing windows compiler support for wasm2c.
See #1843.
sbc100 added a commit that referenced this pull request Mar 2, 2022
Use stricter compiler settings and fix all the resulting warnings.
This is precursor to landing windows compiler support for wasm2c.
See #1843.
@sbc100
sbc100 changed the base branch from main to fix_warnings_wasm2c March 2, 2022 17:51
sbc100 added a commit that referenced this pull request Mar 2, 2022
Use stricter compiler settings and fix all the resulting warnings.
This is precursor to landing windows compiler support for wasm2c.
See #1843.
@sbc100
sbc100 force-pushed the fix_warnings_wasm2c branch from c3bc893 to 9a1e140 Compare March 2, 2022 22:36
sbc100 added a commit that referenced this pull request Mar 2, 2022
Use stricter compiler settings and fix all the resulting warnings.
This is precursor to landing windows compiler support for wasm2c.
See #1843.
@sbc100
sbc100 force-pushed the fix_warnings_wasm2c branch from 9a1e140 to 8a1ba54 Compare March 2, 2022 22:53
sbc100 added a commit that referenced this pull request Mar 3, 2022
Use stricter compiler settings and fix all the resulting warnings.
This is precursor to landing windows compiler support for wasm2c.
See #1843.
@sbc100
sbc100 force-pushed the fix_warnings_wasm2c branch from 8a1ba54 to 0ade258 Compare March 3, 2022 01:14
sbc100 added a commit that referenced this pull request Mar 3, 2022
Use stricter compiler settings and fix all the resulting warnings.
This is precursor to landing windows compiler support for wasm2c.
See #1843.
@sbc100
sbc100 force-pushed the fix_warnings_wasm2c branch from 0ade258 to 1566bba Compare March 3, 2022 01:34
sbc100 added a commit that referenced this pull request Mar 3, 2022
Use stricter compiler settings and fix all the resulting warnings.
This is precursor to landing windows compiler support for wasm2c.
See #1843.
@sbc100
sbc100 force-pushed the fix_warnings_wasm2c branch from 1566bba to 6616e46 Compare March 3, 2022 01:54
@sbc100
sbc100 force-pushed the wasm_rt_win branch 2 times, most recently from 52a5c08 to 2285eba Compare March 4, 2022 01:00
@binji

binji commented Mar 4, 2022

Copy link
Copy Markdown
Member

@sbc100 In my incomplete windows patch, I ended up having to do a few more tweaks to handle floating-point values on Windows, see the description of this commit: 3d09896

@sbc100

sbc100 commented Mar 4, 2022

Copy link
Copy Markdown
Member Author

@sbc100 In my incomplete windows patch, I ended up having to do a few more tweaks to handle floating-point values on Windows, see the description of this commit: 3d09896

Thanks! I didn't know about that.

A lot of the issue I was seeing went away when I switch from i386 to x64, but now I see new issues. I will see if I can get any insight from your work.

@sbc100
sbc100 force-pushed the wasm_rt_win branch 3 times, most recently from a15d120 to ec759cc Compare March 9, 2022 04:01
sbc100 added a commit that referenced this pull request Mar 9, 2022
sbc100 added a commit that referenced this pull request Mar 9, 2022
Split out from #1843.

This also avoids adding -DWABT_BIG_ENDIAN=0 pointlessly to all build commands on little endian machines.
sbc100 added a commit that referenced this pull request Mar 9, 2022
@sbc100
sbc100 force-pushed the wasm_rt_win branch 2 times, most recently from 26ce566 to a15ef4b Compare March 9, 2022 04:59
sbc100 added a commit that referenced this pull request Mar 9, 2022
@sbc100

sbc100 commented Mar 9, 2022

Copy link
Copy Markdown
Member Author

I removed a lot of the extra complexity from this change. It now doesn't add any new .c files to wasm2c.. and just includes the very minimum needed to get windows to pass all the tests.

@sbc100

sbc100 commented Mar 9, 2022

Copy link
Copy Markdown
Member Author

This is now a much smaller PR and does not include a bunch of the stuff from #1833 such as mmap alignment, or splitting the rt library into several C files. All that can come later once its needed/justified I think.

@sbc100

sbc100 commented Mar 9, 2022

Copy link
Copy Markdown
Member Author

@binji PTAL

@binji binji left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice, looks much better

Comment thread wasm2c/wasm-rt-impl.c Resolved
Comment thread wasm2c/wasm-rt-impl.c Resolved
Comment thread wasm2c/wasm-rt.h Resolved
@rathann

rathann commented Apr 4, 2022

Copy link
Copy Markdown
Contributor

[...] With x86 there are some test failure that I believe relate the use of the x87 registers to pass floating point numbers. I suggest we look into fixing those as a followup.

Maybe compare with #1044 as a number of tests are still failing on Linux/x86, too.

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.

5 participants