mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 15:54:15 +00:00
Implement f*_fast intrinsics
This commit is contained in:
parent
f5f24c7a5c
commit
c674a32ab8
@ -987,6 +987,18 @@ pub(crate) fn codegen_intrinsic_call<'tcx>(
|
||||
let ret_val = CValue::const_val(fx, ret.layout(), 0);
|
||||
ret.write_cvalue(fx, ret_val);
|
||||
};
|
||||
|
||||
fadd_fast | fsub_fast | fmul_fast | fdiv_fast | frem_fast, (c x, c y) {
|
||||
let res = crate::num::trans_float_binop(fx, match intrinsic {
|
||||
"fadd_fast" => BinOp::Add,
|
||||
"fsub_fast" => BinOp::Sub,
|
||||
"fmul_fast" => BinOp::Mul,
|
||||
"fdiv_fast" => BinOp::Div,
|
||||
"frem_fast" => BinOp::Rem,
|
||||
_ => unreachable!(),
|
||||
}, x, y);
|
||||
ret.write_cvalue(fx, res);
|
||||
};
|
||||
}
|
||||
|
||||
if let Some((_, dest)) = destination {
|
||||
|
Loading…
Reference in New Issue
Block a user