about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2019-08-19 16:43:25 +0200
committerbjorn3 <bjorn3@users.noreply.github.com>2019-08-19 16:43:25 +0200
commit95908f61a0c4e0cb874f5fbb882399a82003ae51 (patch)
treed9abb2a47644ec99d2bd8fdad3d9445c56d65df2
parentae428a2d702fe9a8ae7993b720c59d184a9d239c (diff)
downloadrust-95908f61a0c4e0cb874f5fbb882399a82003ae51.tar.gz
rust-95908f61a0c4e0cb874f5fbb882399a82003ae51.zip
Add unimpl! for cast between 128bit int and float
-rw-r--r--src/cast.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cast.rs b/src/cast.rs
index 7e411438875..ddfe91966dd 100644
--- a/src/cast.rs
+++ b/src/cast.rs
@@ -64,6 +64,10 @@ pub fn clif_int_or_float_cast(
             from_signed, // FIXME is this correct?
         )
     } else if from_ty.is_int() && to_ty.is_float() {
+        if from_ty == types::I128 {
+            unimpl!("u/i128 -> float");
+        }
+
         // int-like -> float
         if from_signed {
             fx.bcx.ins().fcvt_from_sint(to_ty, from)
@@ -71,6 +75,10 @@ pub fn clif_int_or_float_cast(
             fx.bcx.ins().fcvt_from_uint(to_ty, from)
         }
     } else if from_ty.is_float() && to_ty.is_int() {
+        if to_ty == types::I128 {
+            unimpl!("float -> u/i128");
+        }
+
         // float -> int-like
         if to_ty == types::I8 || to_ty == types::I16 {
             // FIXME implement fcvt_to_*int_sat.i8/i16