-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
x64: Implement SIMD fma
#4474
x64: Implement SIMD fma
#4474
Conversation
This uses a similar builder pattern to the EVEX Encoder. Does not yet support memory accesses.
Subscribe to Label Actioncc @fitzgen, @peterhuene
This issue or pull request has been labeled: "cranelift", "cranelift:area:x64", "cranelift:meta", "fuzzing", "wasmtime:api"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
c4cf522
to
f9ef5bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New 4-register form looks good except for the pretty-print, where I think a few of the args are unintentionally reordered.
👋 Hey,
Following the discussion in #4462, this PR adds a VEX encoder and lowering for SIMD
fma
with FMA extension instructions.The VEX Encoder has an API similar to the EVEX encoder, however instead of writing the instruction as the caller is calling the fields, we store them all and later write the full instruction in
encode
.This is because the VEX instruction format is much less predictable than EVEX and I couldn't find a way to cleanly write the bit fields, since at any time we can switch from 2 to 3 byte prefixes.
@abrown mentioned in #4462, there are potentially some improvements that we may want to do.
Right now this implements
AvxOpcode
and always lowers it in VEX encoding. However I like the idea of choosing the encoding based on what is available and most efficient. Suggestions on how we would implement this would be appreciated!Fixes #4462