-
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
pulley: Implement the wide-arithmetic proposal #9944
pulley: Implement the wide-arithmetic proposal #9944
Conversation
Add a few minor instructions/lowerings for the new operations added as part of the wide-arithmetic proposal. These are all part of the "extended" opcode set since they shouldn't be common and if they're performance critical you probably want a native backend instead.
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.
I'm new to Pulley and don't have much context for this, but LGTM. I'll leave it for someone with more experience to to approve.
Subscribe to Label Actioncc @fitzgen
This issue or pull request has been labeled: "cranelift", "cranelift:meta", "pulley"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
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!
pulley/src/lib.rs
Outdated
@@ -1278,6 +1278,39 @@ macro_rules! for_each_extended_op { | |||
vfma32x4 = Vfma32x4 { dst: VReg, a: VReg, b: VReg, c: VReg }; | |||
/// `dst = ieee_fma(a, b, c)` | |||
vfma64x2 = Vfma64x2 { dst: VReg, a: VReg, b: VReg, c: VReg }; | |||
|
|||
/// `dst_lo:dst_hi = lhs_lo:lhs_hi + rhs_lo:rhs_hi` |
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.
maybe a style thing, or Verilog influence, or something, but usually I write a:b
concat syntax MSB-first (as the concrete values would be written) -- so dst_hi:dst_lo = ...
maybe?
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.
It's ok I have no influence so I think I swap lo:hi every time I write it, happy to canonicalize to hi:lo!
Add a few minor instructions/lowerings for the new operations added as part of the wide-arithmetic proposal. These are all part of the "extended" opcode set since they shouldn't be common and if they're performance critical you probably want a native backend instead.