mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 17:18:32 +03:00
Remove workaround for stack_{load,store}.i128 not being implemented
This commit is contained in:
+2
-15
@@ -168,13 +168,7 @@ pub(crate) fn load<'a, 'tcx>(
|
||||
match self.base {
|
||||
PointerBase::Addr(base_addr) => fx.bcx.ins().load(ty, flags, base_addr, self.offset),
|
||||
PointerBase::Stack(stack_slot) => {
|
||||
if ty == types::I128 || ty.is_vector() {
|
||||
// WORKAROUND for stack_load.i128 and stack_load.iXxY not being implemented
|
||||
let base_addr = fx.bcx.ins().stack_addr(fx.pointer_type, stack_slot, 0);
|
||||
fx.bcx.ins().load(ty, flags, base_addr, self.offset)
|
||||
} else {
|
||||
fx.bcx.ins().stack_load(ty, stack_slot, self.offset)
|
||||
}
|
||||
fx.bcx.ins().stack_load(ty, stack_slot, self.offset)
|
||||
}
|
||||
PointerBase::Dangling(_align) => unreachable!(),
|
||||
}
|
||||
@@ -191,14 +185,7 @@ pub(crate) fn store<'a, 'tcx>(
|
||||
fx.bcx.ins().store(flags, value, base_addr, self.offset);
|
||||
}
|
||||
PointerBase::Stack(stack_slot) => {
|
||||
let val_ty = fx.bcx.func.dfg.value_type(value);
|
||||
if val_ty == types::I128 || val_ty.is_vector() {
|
||||
// WORKAROUND for stack_store.i128 and stack_store.iXxY not being implemented
|
||||
let base_addr = fx.bcx.ins().stack_addr(fx.pointer_type, stack_slot, 0);
|
||||
fx.bcx.ins().store(flags, value, base_addr, self.offset);
|
||||
} else {
|
||||
fx.bcx.ins().stack_store(value, stack_slot, self.offset);
|
||||
}
|
||||
fx.bcx.ins().stack_store(value, stack_slot, self.offset);
|
||||
}
|
||||
PointerBase::Dangling(_align) => unreachable!(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user