Skip to content

Commit 48f918e

Browse files
committed
Fix it
1 parent 451ac96 commit 48f918e

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/base.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,11 @@ fn trans_stmt<'a, 'tcx: 'a>(
593593
| StatementKind::AscribeUserType(..) => {}
594594

595595
StatementKind::InlineAsm { .. } => {
596-
crate::trap::trap_panic(fx, "Inline assembly is not supported");
596+
crate::trap::trap_unreachable_ret_value(
597+
fx,
598+
fx.layout_of(fx.tcx.mk_unit()),
599+
"Inline assembly is not supported",
600+
);
597601
}
598602
}
599603
}

src/intrinsics.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,13 @@ pub fn codegen_intrinsic_call<'a, 'tcx: 'a>(
494494
let or_tmp6 = bcx.ins().bor(or_tmp3, or_tmp4);
495495
bcx.ins().bor(or_tmp5, or_tmp6)
496496
}
497-
ty => unimplemented!("bwap {}", ty),
497+
types::I128 => {
498+
let (lo, hi) = bcx.ins().isplit(v);
499+
let lo = swap(bcx, lo);
500+
let hi = swap(bcx, hi);
501+
bcx.ins().iconcat(hi, lo)
502+
}
503+
ty => unimplemented!("bswap {}", ty),
498504
}
499505
};
500506
let res = CValue::by_val(swap(&mut fx.bcx, arg), fx.layout_of(T));

0 commit comments

Comments
 (0)