(
isa: &dyn TargetIsa,
func: &mut ir::Function,
inst: ir::Inst,
stack_slot: ir::StackSlot,
offset: ir::immediates::Offset32,
)
| 237 | } |
| 238 | |
| 239 | fn expand_stack_load( |
| 240 | isa: &dyn TargetIsa, |
| 241 | func: &mut ir::Function, |
| 242 | inst: ir::Inst, |
| 243 | stack_slot: ir::StackSlot, |
| 244 | offset: ir::immediates::Offset32, |
| 245 | ) -> WalkCommand { |
| 246 | let mut pos = FuncCursor::new(func).at_inst(inst); |
| 247 | pos.use_srcloc(inst); |
| 248 | |
| 249 | let ty = pos.func.dfg.value_type(pos.func.dfg.first_result(inst)); |
| 250 | let addr_ty = isa.pointer_type(); |
| 251 | |
| 252 | let addr = pos.ins().stack_addr(addr_ty, stack_slot, offset); |
| 253 | |
| 254 | // Stack slots are required to be accessible. |
| 255 | // We can't currently ensure that they are aligned. |
| 256 | let mut mflags = MemFlagsData::new(); |
| 257 | mflags.set_notrap(); |
| 258 | |
| 259 | pos.func.replace(inst).load(ty, mflags, addr, 0); |
| 260 | |
| 261 | WalkCommand::Continue |
| 262 | } |
no test coverage detected