Skip to content

Commit e5da6cc

Browse files
nicholasbishopMrmaxmeier
authored andcommitted
Add f16/f128 handling in a couple places
1 parent a5ee5cb commit e5da6cc

File tree

2 files changed

+4
-0
lines changed
  • compiler

2 files changed

+4
-0
lines changed

compiler/rustc_codegen_llvm/src/abi.rs

+2
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,10 @@ impl LlvmType for Reg {
119119
match self.kind {
120120
RegKind::Integer => cx.type_ix(self.size.bits()),
121121
RegKind::Float => match self.size.bits() {
122+
16 => cx.type_f16(),
122123
32 => cx.type_f32(),
123124
64 => cx.type_f64(),
125+
128 => cx.type_f128(),
124126
_ => bug!("unsupported float: {:?}", self),
125127
},
126128
RegKind::Vector => cx.type_vector(cx.type_i8(), self.size.bytes()),

compiler/rustc_target/src/abi/call/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,10 @@ impl Reg {
238238
_ => panic!("unsupported integer: {self:?}"),
239239
},
240240
RegKind::Float => match self.size.bits() {
241+
16 => dl.f16_align.abi,
241242
32 => dl.f32_align.abi,
242243
64 => dl.f64_align.abi,
244+
128 => dl.f128_align.abi,
243245
_ => panic!("unsupported float: {self:?}"),
244246
},
245247
RegKind::Vector => dl.vector_align(self.size).abi,

0 commit comments

Comments
 (0)