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_target | |
| 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_target')
| -rw-r--r-- | compiler/rustc_target/src/abi/call/loongarch.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/abi/call/mod.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/abi/call/riscv.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_target/src/abi/call/x86_64.rs | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_target/src/abi/call/loongarch.rs b/compiler/rustc_target/src/abi/call/loongarch.rs index 647b6500c52..35d4b331cb4 100644 --- a/compiler/rustc_target/src/abi/call/loongarch.rs +++ b/compiler/rustc_target/src/abi/call/loongarch.rs @@ -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); } diff --git a/compiler/rustc_target/src/abi/call/mod.rs b/compiler/rustc_target/src/abi/call/mod.rs index db721212f8e..66177d551ba 100644 --- a/compiler/rustc_target/src/abi/call/mod.rs +++ b/compiler/rustc_target/src/abi/call/mod.rs @@ -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 })) } diff --git a/compiler/rustc_target/src/abi/call/riscv.rs b/compiler/rustc_target/src/abi/call/riscv.rs index cbde234d34c..6a38496dc57 100644 --- a/compiler/rustc_target/src/abi/call/riscv.rs +++ b/compiler/rustc_target/src/abi/call/riscv.rs @@ -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); } diff --git a/compiler/rustc_target/src/abi/call/x86_64.rs b/compiler/rustc_target/src/abi/call/x86_64.rs index 6c34585a11b..2eb50cc8dea 100644 --- a/compiler/rustc_target/src/abi/call/x86_64.rs +++ b/compiler/rustc_target/src/abi/call/x86_64.rs @@ -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, |
