Skip to content

Commit

Permalink
sparc ABI issue - structure returning from function is returned
Browse files Browse the repository at this point in the history
in 64bit registers

Fixes: #52638
  • Loading branch information
psumbera committed Jul 26, 2018
1 parent fefe816 commit 051eddd
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/librustc_target/abi/call/sparc64.rs
Expand Up @@ -57,16 +57,7 @@ fn classify_ret_ty<'a, Ty, C>(cx: C, ret: &mut ArgType<'a, Ty>)
let size = ret.layout.size;
let bits = size.bits();
if bits <= 256 {
let unit = if bits <= 8 {
Reg::i8()
} else if bits <= 16 {
Reg::i16()
} else if bits <= 32 {
Reg::i32()
} else {
Reg::i64()
};

let unit = Reg::i64();
ret.cast_to(Uniform {
unit,
total: size
Expand Down

0 comments on commit 051eddd

Please sign in to comment.