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:
parent
ef324565d0
commit
e3f63d9375
31 changed files with 107 additions and 14 deletions
|
@ -59,7 +59,7 @@ where
|
|||
_ => return Err(CannotUseFpConv),
|
||||
}
|
||||
}
|
||||
abi::F32 | abi::F64 => {
|
||||
abi::F16 | abi::F32 | abi::F64 | abi::F128 => {
|
||||
if arg_layout.size.bits() > flen {
|
||||
return Err(CannotUseFpConv);
|
||||
}
|
||||
|
|
|
@ -412,7 +412,7 @@ impl<'a, Ty> TyAndLayout<'a, Ty> {
|
|||
Abi::Scalar(scalar) => {
|
||||
let kind = match scalar.primitive() {
|
||||
abi::Int(..) | abi::Pointer(_) => RegKind::Integer,
|
||||
abi::F32 | abi::F64 => RegKind::Float,
|
||||
abi::F16 | abi::F32 | abi::F64 | abi::F128 => RegKind::Float,
|
||||
};
|
||||
Ok(HomogeneousAggregate::Homogeneous(Reg { kind, size: self.size }))
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ where
|
|||
_ => return Err(CannotUseFpConv),
|
||||
}
|
||||
}
|
||||
abi::F32 | abi::F64 => {
|
||||
abi::F16 | abi::F32 | abi::F64 | abi::F128 => {
|
||||
if arg_layout.size.bits() > flen {
|
||||
return Err(CannotUseFpConv);
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ where
|
|||
|
||||
Abi::Scalar(scalar) => match scalar.primitive() {
|
||||
abi::Int(..) | abi::Pointer(_) => Class::Int,
|
||||
abi::F32 | abi::F64 => Class::Sse,
|
||||
abi::F16 | abi::F32 | abi::F64 | abi::F128 => Class::Sse,
|
||||
},
|
||||
|
||||
Abi::Vector { .. } => Class::Sse,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue