diff options
| author | Trevor Gross <tmgross@umich.edu> | 2024-02-28 03:44:23 -0500 |
|---|---|---|
| committer | Trevor Gross <tmgross@umich.edu> | 2024-02-28 12:58:32 -0500 |
| commit | e3f63d93755f2f62b4a52686f608b9664e87f092 (patch) | |
| tree | 6d29765020fdfbd6bd2d049b5079baa83c4a4382 /compiler/rustc_codegen_cranelift/src | |
| parent | ef324565d071c6d7e2477a195648549e33d6a465 (diff) | |
| download | rust-e3f63d93755f2f62b4a52686f608b9664e87f092.tar.gz rust-e3f63d93755f2f62b4a52686f608b9664e87f092.zip | |
Add `f16` and `f128` to `rustc_type_ir::FloatTy` and `rustc_abi::Primitive`
Make changes necessary to support these types in the compiler.
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/common.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/common.rs b/compiler/rustc_codegen_cranelift/src/common.rs index 1e37825b548..e35ec4fe1c7 100644 --- a/compiler/rustc_codegen_cranelift/src/common.rs +++ b/compiler/rustc_codegen_cranelift/src/common.rs @@ -33,8 +33,10 @@ pub(crate) fn scalar_to_clif_type(tcx: TyCtxt<'_>, scalar: Scalar) -> Type { Integer::I64 => types::I64, Integer::I128 => types::I128, }, + Primitive::F16 => unimplemented!("f16_f128"), Primitive::F32 => types::F32, Primitive::F64 => types::F64, + Primitive::F128 => unimplemented!("f16_f128"), // FIXME(erikdesjardins): handle non-default addrspace ptr sizes Primitive::Pointer(_) => pointer_ty(tcx), } @@ -61,8 +63,10 @@ fn clif_type_from_ty<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Option<types::Typ }, ty::Char => types::I32, ty::Float(size) => match size { + FloatTy::F16 => unimplemented!("f16_f128"), FloatTy::F32 => types::F32, FloatTy::F64 => types::F64, + FloatTy::F128 => unimplemented!("f16_f128"), }, ty::FnPtr(_) => pointer_ty(tcx), ty::RawPtr(TypeAndMut { ty: pointee_ty, mutbl: _ }) | ty::Ref(_, pointee_ty, _) => { |
