Skip to content

Commit 84e0458

Browse files
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.
1 parent fc1c118 commit 84e0458

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_trans/trans/cabi_powerpc64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ fn classify_ret_ty(ccx: &CrateContext, ty: Type) -> ArgType {
158158
}
159159

160160
// The PowerPC64 big endian ABI doesn't return aggregates in registers
161-
if ccx.sess().target.target.arch == "powerpc64" {
161+
if ccx.sess().target.target.target_endian == "big" {
162162
return ArgType::indirect(ty, Some(Attribute::StructRet))
163163
}
164164

0 commit comments

Comments
 (0)