-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
aarch64: Implement uextend/sextend for i128 values #3005
Conversation
a609e77
to
2deb46e
Compare
2deb46e
to
c771ab3
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.
Thanks! Just a suggestion for a clarification to the branching logic below but otherwise looks good.
|
||
let needs_extend = from_bits < to_bits && to_bits <= 64; | ||
// For i128, we want to extend the lower half, except if it is already 64 bits. | ||
let needs_lower_extend = to_bits > 64 && from_bits < 64; |
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.
Can we clarify the logic a bit by adding a let pass_through_lower = to_bits > 64 && !needs_lower_extend
here, then moving the move-emission below (will comment separately)?
}); | ||
} | ||
} | ||
|
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.
With the above pass_through_lower
, could we do an else if pass_through_lower { ctx.emit(/* move */) }
here? I like that arrangement a bit better as it gives a clear separation between "produce lower register" and "produce upper register" parts of the code.
c771ab3
to
f25f5b2
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.
Thanks!
Hey, a few more ops for i128 support