-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Fixes sparc64 cabi fixes. #47541
Fixes sparc64 cabi fixes. #47541
Conversation
Argument up to 16 bytes size is provided in registers. Return value up to 32 bytes size is stored in registers. Fixes: #46679
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @eddyb (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
src/librustc_trans/cabi_sparc64.rs
Outdated
@@ -24,7 +24,7 @@ fn is_homogeneous_aggregate<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>, arg: &mut ArgTyp | |||
let valid_unit = match unit.kind { | |||
RegKind::Integer => false, | |||
RegKind::Float => true, | |||
RegKind::Vector => arg.layout.size.bits() == 128 | |||
RegKind::Vector => arg.layout.size.bits() == 256 |
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.
Should this be either 128
or 256
, or just 256
?
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.
On a second look, is this change needed at all? is_homogeneous_aggregate
refers to a very specific shape of struct
and this check is for SIMD vectors - which I doubt you are using. The other two changes in this file seem more relevant.
@bors r+ |
📌 Commit af632bc has been approved by |
src/librustc_trans/cabi_sparc64.rs
Outdated
@@ -84,6 +84,11 @@ fn classify_arg_ty<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>, arg: &mut ArgType<'tcx>) | |||
} | |||
|
|||
let total = arg.layout.size; | |||
if total.bits() > 128 { | |||
arg.make_indirect(cx); |
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.
This method call does not need a parameter.
@bors r+ |
📌 Commit 1203b3d has been approved by |
Fixes sparc64 cabi fixes. Argument up to 16 bytes size is provided in registers. Return value up to 32 bytes size is stored in registers. Fixes: rust-lang#46679 --- Firefox now (almost) build on sparc. Original rust issue seems to be gone. Note that I'm not rust expert and the fix was suggested in bug.
Argument up to 16 bytes size is provided in registers.
Return value up to 32 bytes size is stored in registers.
Fixes: #46679
Firefox now (almost) build on sparc. Original rust issue seems to be gone. Note that I'm not rust expert and the fix was suggested in bug.