diff --git a/crates/rustc_codegen_nvvm/src/abi.rs b/crates/rustc_codegen_nvvm/src/abi.rs index bb438795..712b9a55 100644 --- a/crates/rustc_codegen_nvvm/src/abi.rs +++ b/crates/rustc_codegen_nvvm/src/abi.rs @@ -213,8 +213,10 @@ impl LlvmType for Reg { match self.kind { RegKind::Integer => cx.type_ix(self.size.bits()), RegKind::Float => match self.size.bits() { + 16 => cx.type_f16(), 32 => cx.type_f32(), 64 => cx.type_f64(), + 128 => cx.type_f128(), _ => bug!("unsupported float: {:?}", self), }, RegKind::Vector => cx.type_vector(cx.type_i8(), self.size.bytes()), diff --git a/crates/rustc_codegen_nvvm/src/llvm.rs b/crates/rustc_codegen_nvvm/src/llvm.rs index a9cbcad3..2fea8e12 100644 --- a/crates/rustc_codegen_nvvm/src/llvm.rs +++ b/crates/rustc_codegen_nvvm/src/llvm.rs @@ -292,6 +292,9 @@ pub(crate) enum TypeKind { Half = 1, Float = 2, Double = 3, + X86_FP80 = 4, + FP128 = 5, + PPC_FP128 = 6, Label = 7, Integer = 8, Function = 9, @@ -312,6 +315,9 @@ impl TypeKind { TypeKind::Half => rustc_codegen_ssa::common::TypeKind::Half, TypeKind::Float => rustc_codegen_ssa::common::TypeKind::Float, TypeKind::Double => rustc_codegen_ssa::common::TypeKind::Double, + TypeKind::X86_FP80 => rustc_codegen_ssa::common::TypeKind::X86_FP80, + TypeKind::FP128 => rustc_codegen_ssa::common::TypeKind::FP128, + TypeKind::PPC_FP128 => rustc_codegen_ssa::common::TypeKind::PPC_FP128, TypeKind::Label => rustc_codegen_ssa::common::TypeKind::Label, TypeKind::Integer => rustc_codegen_ssa::common::TypeKind::Integer, TypeKind::Function => rustc_codegen_ssa::common::TypeKind::Function,