This commit is contained in:
bjorn3 2021-02-21 12:34:21 +01:00
parent ee36a1fbb1
commit b0f870edd6
2 changed files with 6 additions and 4 deletions

View File

@ -11,7 +11,11 @@ pub(crate) fn maybe_codegen<'tcx>(
lhs: CValue<'tcx>,
rhs: CValue<'tcx>,
) -> Option<CValue<'tcx>> {
if lhs.layout().ty != fx.tcx.types.u128 && lhs.layout().ty != fx.tcx.types.i128 {
if lhs.layout().ty != fx.tcx.types.u128
&& lhs.layout().ty != fx.tcx.types.i128
&& rhs.layout().ty != fx.tcx.types.u128
&& rhs.layout().ty != fx.tcx.types.i128
{
return None;
}

View File

@ -167,9 +167,7 @@ impl Pointer {
) -> Value {
match self.base {
PointerBase::Addr(base_addr) => fx.bcx.ins().load(ty, flags, base_addr, self.offset),
PointerBase::Stack(stack_slot) => {
fx.bcx.ins().stack_load(ty, stack_slot, self.offset)
}
PointerBase::Stack(stack_slot) => fx.bcx.ins().stack_load(ty, stack_slot, self.offset),
PointerBase::Dangling(_align) => unreachable!(),
}
}