Fix type in load_scalar

This commit is contained in:
bjorn3 2019-06-17 21:19:08 +02:00
parent d629d97f25
commit 596fdd5a64
2 changed files with 3 additions and 3 deletions

View File

@ -103,7 +103,7 @@ pub fn codegen_intrinsic_call<'a, 'tcx: 'a>(
// Insert non returning intrinsics here
match intrinsic {
"abort" => {
trap_panic(fx, "Called intrinisc::abort.");
trap_panic(fx, "Called intrinsic::abort.");
}
"unreachable" => {
trap_unreachable(fx, "[corruption] Called intrinsic::unreachable.");

View File

@ -51,8 +51,8 @@ fn load_scalar<'a, 'tcx: 'a>(
offset: i32,
) -> Value {
if clif_ty == types::I128 {
let a = fx.bcx.ins().load(clif_ty, MemFlags::new(), addr, offset);
let b = fx.bcx.ins().load(clif_ty, MemFlags::new(), addr, offset + 8);
let a = fx.bcx.ins().load(types::I64, MemFlags::new(), addr, offset);
let b = fx.bcx.ins().load(types::I64, MemFlags::new(), addr, offset + 8);
fx.bcx.ins().iconcat(a, b)
} else {
fx.bcx.ins().load(clif_ty, MemFlags::new(), addr, offset)