Skip to content

Commit 0799cbf

Browse files
committed
fixup! Use a C-safe return type for __rust_[ui]128_* overflowing intrinsics
1 parent 7f881e5 commit 0799cbf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/rustc_codegen_cranelift/src/codegen_i128.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ pub(crate) fn maybe_codegen_checked<'tcx>(
9898
);
9999
let mul = ret[0];
100100
let oflow = oflow_out_place.to_cvalue(fx).load_scalar(fx);
101+
let oflow = clif_intcast(fx, oflow, types::I8, false);
101102
let layout = fx.layout_of(Ty::new_tup(fx.tcx, &[lhs.layout().ty, fx.tcx.types.bool]));
102103
Some(CValue::by_val_pair(mul, oflow, layout))
103104
}

0 commit comments

Comments
 (0)