Skip to content

Commit 051eddd

Browse files
committed
sparc ABI issue - structure returning from function is returned
in 64bit registers Fixes: #52638
1 parent fefe816 commit 051eddd

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/librustc_target/abi/call/sparc64.rs

+1-10
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,7 @@ fn classify_ret_ty<'a, Ty, C>(cx: C, ret: &mut ArgType<'a, Ty>)
5757
let size = ret.layout.size;
5858
let bits = size.bits();
5959
if bits <= 256 {
60-
let unit = if bits <= 8 {
61-
Reg::i8()
62-
} else if bits <= 16 {
63-
Reg::i16()
64-
} else if bits <= 32 {
65-
Reg::i32()
66-
} else {
67-
Reg::i64()
68-
};
69-
60+
let unit = Reg::i64();
7061
ret.cast_to(Uniform {
7162
unit,
7263
total: size

0 commit comments

Comments
 (0)