Correctly align returned addr for to_addr on NoPlace
This commit is contained in:
parent
fc826a7525
commit
4a8b0ca274
@ -334,7 +334,15 @@ impl<'tcx> CPlace<'tcx> {
|
||||
fx.bcx.ins().stack_addr(fx.pointer_type, stack_slot, 0),
|
||||
None,
|
||||
),
|
||||
CPlaceInner::NoPlace => (fx.bcx.ins().iconst(fx.pointer_type, 45), None),
|
||||
CPlaceInner::NoPlace => {
|
||||
(
|
||||
fx.bcx.ins().iconst(
|
||||
fx.pointer_type,
|
||||
i64::try_from(self.layout.align.pref.bytes()).unwrap(),
|
||||
),
|
||||
None
|
||||
)
|
||||
}
|
||||
CPlaceInner::Var(_) => bug!("Expected CPlace::Addr, found CPlace::Var"),
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user