Fix float type coercion and compilation

This commit is contained in:
Sofia 2025-07-21 16:54:50 +03:00
parent ec0c7fa194
commit f0f828d1eb
2 changed files with 14 additions and 7 deletions

View File

@ -487,13 +487,13 @@ impl ConstValue {
ConstValue::U128(_) => U128,
ConstValue::StringPtr(_) => Ptr(Box::new(I8)),
ConstValue::Bool(_) => Bool,
ConstValue::F16(_) => todo!(),
ConstValue::F32B(_) => todo!(),
ConstValue::F32(_) => todo!(),
ConstValue::F64(_) => todo!(),
ConstValue::F80(_) => todo!(),
ConstValue::F128(_) => todo!(),
ConstValue::F128PPC(_) => todo!(),
ConstValue::F16(_) => F16,
ConstValue::F32B(_) => F32B,
ConstValue::F32(_) => F32,
ConstValue::F64(_) => F64,
ConstValue::F80(_) => F80,
ConstValue::F128(_) => F128,
ConstValue::F128PPC(_) => F128PPC,
}
}
}

View File

@ -1353,6 +1353,13 @@ impl TypeKind {
TypeKind::U16 | TypeKind::U32 | TypeKind::U64 | TypeKind::U128 => {
DwarfEncoding::Unsigned
}
TypeKind::F16
| TypeKind::F32
| TypeKind::F32B
| TypeKind::F64
| TypeKind::F80
| TypeKind::F128
| TypeKind::F128PPC => DwarfEncoding::Float,
TypeKind::Void => DwarfEncoding::Address,
TypeKind::StringPtr => DwarfEncoding::Address,
TypeKind::Array(_, _) => DwarfEncoding::Address,