From 84e0458c99b490d359facf6997db29399559c916 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Wed, 3 Feb 2016 11:36:14 +1100 Subject: [PATCH 1/2] Use target_endian, not target.arch in cabi_powerpc64 Now target_arch is powerpc64 on both big and little endian, we need to use target_endian when there are differences in the two ABIs. --- src/librustc_trans/trans/cabi_powerpc64.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_trans/trans/cabi_powerpc64.rs b/src/librustc_trans/trans/cabi_powerpc64.rs index cba73004279d..f76bb4f9eebc 100644 --- a/src/librustc_trans/trans/cabi_powerpc64.rs +++ b/src/librustc_trans/trans/cabi_powerpc64.rs @@ -158,7 +158,7 @@ fn classify_ret_ty(ccx: &CrateContext, ty: Type) -> ArgType { } // The PowerPC64 big endian ABI doesn't return aggregates in registers - if ccx.sess().target.target.arch == "powerpc64" { + if ccx.sess().target.target.target_endian == "big" { return ArgType::indirect(ty, Some(Attribute::StructRet)) } From afdf179d84dc4aa290c38604b5f35b1ef669fd65 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Thu, 4 Feb 2016 06:48:26 +1100 Subject: [PATCH 2/2] target_arch is always powerpc64, remove powerpc64le check We no longer need to check for powerpc64le, so remove it. --- src/liballoc_jemalloc/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/liballoc_jemalloc/lib.rs b/src/liballoc_jemalloc/lib.rs index 8bdbd1a926fe..d02e9e4ba130 100644 --- a/src/liballoc_jemalloc/lib.rs +++ b/src/liballoc_jemalloc/lib.rs @@ -56,8 +56,7 @@ const MIN_ALIGN: usize = 8; #[cfg(all(any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64", - target_arch = "powerpc64", - target_arch = "powerpc64le")))] + target_arch = "powerpc64")))] const MIN_ALIGN: usize = 16; // MALLOCX_ALIGN(a) macro