]> git.lizzy.rs Git - rust.git/commitdiff
Fix it
authorbjorn3 <bjorn3@users.noreply.github.com>
Sat, 29 Jun 2019 14:53:20 +0000 (16:53 +0200)
committerbjorn3 <bjorn3@users.noreply.github.com>
Fri, 26 Jul 2019 09:28:28 +0000 (11:28 +0200)
src/intrinsics.rs

index aaf4622178526b869aa1f070e3bee611b7404adc..f521a07d91f0478612bc3a6a1983978f0ebbbd2b 100644 (file)
@@ -494,7 +494,13 @@ fn swap(bcx: &mut FunctionBuilder, v: Value) -> Value {
                         let or_tmp6 = bcx.ins().bor(or_tmp3, or_tmp4);
                         bcx.ins().bor(or_tmp5, or_tmp6)
                     }
-                    ty => unimplemented!("bwap {}", ty),
+                    types::I128 => {
+                        let (lo, hi) = bcx.ins().isplit(v);
+                        let lo = swap(bcx, lo);
+                        let hi = swap(bcx, hi);
+                        bcx.ins().iconcat(hi, lo)
+                    }
+                    ty => unimplemented!("bswap {}", ty),
                 }
             };
             let res = CValue::by_val(swap(&mut fx.bcx, arg), fx.layout_of(T));