[Pkg-rust-maintainers] Bug#888757: rustc: Please backport upstream patch to fix sparc64 CABI
John Paul Adrian Glaubitz
glaubitz at physik.fu-berlin.de
Mon Jan 29 15:23:11 UTC 2018
Source: rustc
Version: 1.23.0+dfsg1-1
Severity: important
Tags: patch
User: debian-sparc at lists.debian.org
Usertags: sparc64
Hello!
rustc upstream contains an important fix in the master branch
that fixes the definitions for the CABI on sparc64 [1].
I have backported this patch for rustc 1.23 and attached it
to this bug report.
Could you include the patch in the next upload of rustc 1.23?
Thanks,
Adrian
> [1] https://github.com/rust-lang/rust/commit/f4bcfc5317258c77e25ab5c0f3eec5599287fdbd
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz at debian.org
`. `' Freie Universitaet Berlin - glaubitz at physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
-------------- next part --------------
--- a/src/librustc_trans/cabi_sparc64.rs
+++ b/src/librustc_trans/cabi_sparc64.rs
@@ -26,7 +26,7 @@ fn is_homogeneous_aggregate<'a, 'tcx>(cc
let valid_unit = match unit.kind {
RegKind::Integer => false,
RegKind::Float => true,
- RegKind::Vector => size.bits() == 128
+ RegKind::Vector => size.bits() == 256
};
if valid_unit {
@@ -52,7 +52,7 @@ fn classify_ret_ty<'a, 'tcx>(ccx: &Crate
}
let size = ret.layout.size(ccx);
let bits = size.bits();
- if bits <= 128 {
+ if bits <= 256 {
let unit = if bits <= 8 {
Reg::i8()
} else if bits <= 16 {
@@ -86,6 +86,10 @@ fn classify_arg_ty<'a, 'tcx>(ccx: &Crate
}
let total = arg.layout.size(ccx);
+ if total.bits() > 128 {
+ arg.make_indirect(ccx);
+ return;
+ }
arg.cast_to(ccx, Uniform {
unit: Reg::i64(),
total
More information about the Pkg-rust-maintainers
mailing list