1
Fork 0

Add f16 and f128 to rustc_type_ir::FloatTy and rustc_abi::Primitive

Make changes necessary to support these types in the compiler.
This commit is contained in:
Trevor Gross 2024-02-28 03:44:23 -05:00
parent ef324565d0
commit e3f63d9375
31 changed files with 107 additions and 14 deletions

View file

@ -141,8 +141,10 @@ fn layout_of_uncached<'tcx>(
ty::Int(ity) => scalar(Int(Integer::from_int_ty(dl, ity), true)),
ty::Uint(ity) => scalar(Int(Integer::from_uint_ty(dl, ity), false)),
ty::Float(fty) => scalar(match fty {
ty::FloatTy::F16 => F16,
ty::FloatTy::F32 => F32,
ty::FloatTy::F64 => F64,
ty::FloatTy::F128 => F128,
}),
ty::FnPtr(_) => {
let mut ptr = scalar_unit(Pointer(dl.instruction_address_space));