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

Winch: Float conversion instructions #7773

Conversation

jeffcharles
Copy link
Contributor

Part of #6528. Adds support for the following instructions to Winch:

  • i32.trunc_f32_s
  • i32.trunc_f32_u
  • i32.trunc_f64_s
  • i32.trunc_f64_u
  • i64.trunc_f32_s
  • i64.trunc_f32_u
  • i64.trunc_f64_s
  • i64.trunc_f64_u
  • i32.reinterpret_f32
  • i64.reinterpret_f64
  • f32.convert_i32_s
  • f32.convert_i32_u
  • f32.convert_i64_s
  • f32.convert_i64_u
  • f64.convert_i32_s
  • f64.convert_i32_u
  • f64.convert_i64_s
  • f64.convert_i64_u
  • f32.reinterpret_i32
  • f64.reinterpret_i64
  • f32.demote_f64
  • f64.promote_f32

@jeffcharles jeffcharles requested review from a team as code owners January 12, 2024 15:19
@jeffcharles jeffcharles requested review from fitzgen and removed request for a team January 12, 2024 15:19
Copy link
Member

@saulecabrera saulecabrera left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@saulecabrera saulecabrera added this pull request to the merge queue Jan 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 12, 2024
@jeffcharles
Copy link
Contributor Author

Not sure why https://github.com/bytecodealliance/wasmtime/actions/runs/7504830983/job/20432782059 failed. Running cargo test --target=x86_64-apple-darwin -- wast::Winch --nocapture locally shows everything as passing.

@saulecabrera
Copy link
Member

It's because the conversion spec tests assert for traps https://github.com/bytecodealliance/wasmtime/pull/7773/files#diff-823efed0acf795e9245a551aadae26695321f840cbe4b51b12410b26bde35c45R70 and currently since Winch doesn't fully encode unwind information, any tests that trap will fail on Windows. You need to add the conversion suites that trap here https://github.com/bytecodealliance/wasmtime/blob/main/build.rs#L210

@jeffcharles jeffcharles requested a review from a team as a code owner January 12, 2024 19:03
@saulecabrera saulecabrera added this pull request to the merge queue Jan 12, 2024
Merged via the queue into bytecodealliance:main with commit b546a5f Jan 12, 2024
18 checks passed
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