Skip to content

Commit 1f53815

Browse files
committed
Add missing bracers in classify_arg_ty().
The calculation of required registerd in classify_arg_ty() has a special case for any arguments greater than 32 bits but less than 128 bits in size. The related calculation missed a pair of bracers and therefore always returned a result of one required register per argument bit.
1 parent bba6c06 commit 1f53815

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_target/abi/call/xtensa.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn classify_arg_ty<Ty>(arg: &mut ArgType<'_, Ty>, xlen: u64, remaining_gpr: &mut
2929
if alignment.bits() == 2 * xlen {
3030
required_gpr = 2 + (*remaining_gpr % 2);
3131
} else if arg_size.bits() > xlen && arg_size.bits() <= MAX_ARG_IN_REGS_SIZE {
32-
required_gpr = arg_size.bits() + (xlen - 1) / xlen;
32+
required_gpr = (arg_size.bits() + (xlen - 1)) / xlen;
3333
}
3434

3535
if required_gpr > *remaining_gpr {

0 commit comments

Comments
 (0)