(
fgen: &mut FunctionGenerator,
builder: &mut FunctionBuilder,
_opcode: Opcode,
args: &[Type],
_rets: &[Type],
)
| 150 | } |
| 151 | |
| 152 | fn insert_stack_store( |
| 153 | fgen: &mut FunctionGenerator, |
| 154 | builder: &mut FunctionBuilder, |
| 155 | _opcode: Opcode, |
| 156 | args: &[Type], |
| 157 | _rets: &[Type], |
| 158 | ) -> Result<()> { |
| 159 | let typevar = args[0]; |
| 160 | let type_size = typevar.bytes(); |
| 161 | |
| 162 | let (slot, slot_size, _align, category) = fgen.stack_slot_with_size(type_size)?; |
| 163 | |
| 164 | // `stack_store` doesn't support setting MemFlagsData, and it does not set any |
| 165 | // alias analysis bits, so we can only emit it for `Other` slots. |
| 166 | if category != AACategory::Other { |
| 167 | return Err(arbitrary::Error::IncorrectFormat.into()); |
| 168 | } |
| 169 | |
| 170 | let offset = fgen.u.int_in_range(0..=(slot_size - type_size))? as i32; |
| 171 | |
| 172 | let arg0 = fgen.get_variable_of_type(typevar)?; |
| 173 | let arg0 = builder.use_var(arg0); |
| 174 | |
| 175 | builder.ins().stack_store(arg0, slot, offset); |
| 176 | Ok(()) |
| 177 | } |
| 178 | |
| 179 | fn insert_cmp( |
| 180 | fgen: &mut FunctionGenerator, |
nothing calls this directly
no test coverage detected