cranelift: Translate stack_* accesses as unaligned (#6016)
We can't currently ensure that these will be aligned, so we shouldn't mark them as such.
This commit is contained in:
@@ -82,8 +82,10 @@ pub fn simple_legalize(func: &mut ir::Function, cfg: &mut ControlFlowGraph, isa:
|
||||
|
||||
let addr = pos.ins().stack_addr(addr_ty, stack_slot, offset);
|
||||
|
||||
// Stack slots are required to be accessible and aligned.
|
||||
let mflags = MemFlags::trusted();
|
||||
// Stack slots are required to be accessible.
|
||||
// We can't currently ensure that they are aligned.
|
||||
let mut mflags = MemFlags::new();
|
||||
mflags.set_notrap();
|
||||
pos.func.dfg.replace(inst).load(ty, mflags, addr, 0);
|
||||
}
|
||||
InstructionData::StackStore {
|
||||
@@ -99,10 +101,10 @@ pub fn simple_legalize(func: &mut ir::Function, cfg: &mut ControlFlowGraph, isa:
|
||||
|
||||
let addr = pos.ins().stack_addr(addr_ty, stack_slot, offset);
|
||||
|
||||
// Stack slots are required to be accessible.
|
||||
// We can't currently ensure that they are aligned.
|
||||
let mut mflags = MemFlags::new();
|
||||
// Stack slots are required to be accessible and aligned.
|
||||
mflags.set_notrap();
|
||||
mflags.set_aligned();
|
||||
pos.func.dfg.replace(inst).store(mflags, arg, addr, 0);
|
||||
}
|
||||
InstructionData::DynamicStackLoad {
|
||||
|
||||
Reference in New Issue
Block a user