Skip to content

Commit 95908f6

Browse files
committed
Add unimpl! for cast between 128bit int and float
1 parent ae428a2 commit 95908f6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/cast.rs

+8
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,21 @@ pub fn clif_int_or_float_cast(
6464
from_signed, // FIXME is this correct?
6565
)
6666
} else if from_ty.is_int() && to_ty.is_float() {
67+
if from_ty == types::I128 {
68+
unimpl!("u/i128 -> float");
69+
}
70+
6771
// int-like -> float
6872
if from_signed {
6973
fx.bcx.ins().fcvt_from_sint(to_ty, from)
7074
} else {
7175
fx.bcx.ins().fcvt_from_uint(to_ty, from)
7276
}
7377
} else if from_ty.is_float() && to_ty.is_int() {
78+
if to_ty == types::I128 {
79+
unimpl!("float -> u/i128");
80+
}
81+
7482
// float -> int-like
7583
if to_ty == types::I8 || to_ty == types::I16 {
7684
// FIXME implement fcvt_to_*int_sat.i8/i16

0 commit comments

Comments
 (0)