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

isle: Migrate f32const/f64const to ISLE #3537

Merged
merged 1 commit into from
Nov 16, 2021

Conversation

alexcrichton
Copy link
Member

This moves the f32const and f64const instructions from lower.rs to
ISLE. I was originally going to add something else but due to the
isle.rs's manual use of constructor_imm(..) it necessitated filling
out the imm cases for f32/f64 constants, so I figured I'd go ahead and
move these instructions as well.

The special case for 0 constants which use xorp{s,d} is preserved from
lower.rs today, but a special case isn't added for the all-ones
constant. The comment says to use cmpeqp{s,d} but as discovered on
other recent PRs that's not quite sufficient because comparing a
register against itself which happens to be NaN wouldn't work, so
something else will be required (perhaps pcmpeq or similar? I figured
I'd defer to later)

@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator cranelift:area:x64 Issues related to x64 codegen isle Related to the ISLE domain-specific language labels Nov 16, 2021
@github-actions
Copy link

Subscribe to Label Action

cc @cfallin, @fitzgen

This issue or pull request has been labeled: "cranelift", "cranelift:area:x64", "isle"

Thus the following users have been cc'd because of the following labels:

  • cfallin: isle
  • fitzgen: isle

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

r=me with my previous punctuation in comments

cranelift/codegen/src/isa/x64/inst.isle Outdated Show resolved Hide resolved
cranelift/codegen/src/isa/x64/inst.isle Outdated Show resolved Hide resolved
cranelift/codegen/src/isa/x64/inst.isle Outdated Show resolved Hide resolved
cranelift/codegen/src/isa/x64/inst.isle Outdated Show resolved Hide resolved
cranelift/codegen/src/isa/x64/inst.isle Outdated Show resolved Hide resolved
This moves the `f32const` and `f64const` instructions from `lower.rs` to
ISLE. I was originally going to add something else but due to the
`isle.rs`'s manual use of `constructor_imm(..)` it necessitated filling
out the `imm` cases for f32/f64 constants, so I figured I'd go ahead and
move these instructions as well.

The special case for 0 constants which use `xorp{s,d}` is preserved from
`lower.rs` today, but a special case isn't added for the all-ones
constant. The comment says to use `cmpeqp{s,d}` but as discovered on
other recent PRs that's not quite sufficient because comparing a
register against itself which happens to be NaN wouldn't work, so
something else will be required (perhaps `pcmpeq` or similar? I figured
I'd defer to later)
@alexcrichton alexcrichton merged commit f30c8eb into bytecodealliance:main Nov 16, 2021
@alexcrichton alexcrichton deleted the isle-fconst branch November 16, 2021 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:area:x64 Issues related to x64 codegen cranelift Issues related to the Cranelift code generator isle Related to the ISLE domain-specific language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants