Fix abi for checked multiplication

This commit is contained in:
bjorn3 2023-02-18 18:32:37 +01:00
parent 4991d08bc6
commit bb933d26dc
3 changed files with 3 additions and 1 deletions

View file

@ -46,7 +46,7 @@ pub(crate) fn maybe_codegen<'tcx>(
let lhs = lhs.load_scalar(fx);
let rhs = rhs.load_scalar(fx);
let oflow_ptr = oflow.to_ptr().get_addr(fx);
let res = fx.lib_call(
let res = fx.lib_call_unadjusted(
"__muloti4",
vec![
AbiParam::new(types::I128),

View file

@ -39,6 +39,7 @@ builtin_functions! {
// integers
fn __multi3(a: i128, b: i128) -> i128;
fn __muloti4(n: i128, d: i128, oflow: &mut i32) -> i128;
fn __udivti3(n: u128, d: u128) -> u128;
fn __divti3(n: i128, d: i128) -> i128;
fn __umodti3(n: u128, d: u128) -> u128;