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

Fixes sparc64 cabi fixes. #47541

Merged
merged 3 commits into from
Jan 23, 2018
Merged

Fixes sparc64 cabi fixes. #47541

merged 3 commits into from
Jan 23, 2018

Conversation

psumbera
Copy link
Contributor

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.

Argument up to 16 bytes size is provided in registers.
Return value up to 32 bytes size is stored in registers.

Fixes: #46679
@rust-highfive
Copy link
Collaborator

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.

@@ -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
Copy link
Member

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?

Copy link
Member

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.

@kennytm kennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 18, 2018
@eddyb
Copy link
Member

eddyb commented Jan 18, 2018

@bors r+

@bors
Copy link
Contributor

bors commented Jan 18, 2018

📌 Commit af632bc has been approved by eddyb

@@ -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);
Copy link
Contributor

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.

@eddyb
Copy link
Member

eddyb commented Jan 18, 2018

@bors r+

@bors
Copy link
Contributor

bors commented Jan 18, 2018

📌 Commit 1203b3d has been approved by eddyb

@carols10cents carols10cents added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 22, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Jan 23, 2018
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.
bors added a commit that referenced this pull request Jan 23, 2018
Rollup of 14 pull requests

- Successful merges: #47423, #47425, #47440, #47541, #47549, #47554, #47558, #47610, #47635, #47655, #47661, #47662, #47667, #47672
- Failed merges:
@bors bors merged commit 1203b3d into rust-lang:master Jan 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sparc issue when calling C++ functions which returns >16bytes structure
7 participants