Skip to content

Commit

Permalink
fix ceil division error
Browse files Browse the repository at this point in the history
  • Loading branch information
lenawanel committed Jul 2, 2024
1 parent 5dd731e commit ed98774
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/codegen/src/convert/abi/aarch64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fn classify_ret(ret: Intern<Ty>) -> Option<PassMode> {
Some(hfa)
} else if ret.size() <= 16 {
Some(PassMode::cast(
ArrayVec::from_array_len([I64, I64, I64, I64], (ret.size() + 8) as usize / 8),
ArrayVec::from_array_len([I64, I64, I64, I64], (ret.size() + 7) as usize / 8),
ret,
))
} else {
Expand All @@ -74,7 +74,7 @@ fn classify_arg(arg: Intern<Ty>) -> Option<PassMode> {
} else if arg.size() <= 16 {
if arg.align() != 128 {
Some(PassMode::cast(
ArrayVec::from_array_len([I64, I64, I64, I64], (arg.size() + 8) as usize / 8),
ArrayVec::from_array_len([I64, I64, I64, I64], (arg.size() + 7) as usize / 8),
arg,
))
} else {
Expand Down

0 comments on commit ed98774

Please sign in to comment.