Lines Matching refs:imm
145 let x = (mem.as_ptr() as u64 + (insn.imm as u32) as u64) as *const u8; in execute_program()
152 let x = (mem.as_ptr() as u64 + (insn.imm as u32) as u64) as *const u16; in execute_program()
159 let x = (mem.as_ptr() as u64 + (insn.imm as u32) as u64) as *const u32; in execute_program()
165 log::info!("executing LD_ABS_DW, set reg[{}] to {:#x}", _dst, insn.imm); in execute_program()
167 let x = (mem.as_ptr() as u64 + (insn.imm as u32) as u64) as *const u64; in execute_program()
175 (mem.as_ptr() as u64 + reg[_src] + (insn.imm as u32) as u64) as *const u8; in execute_program()
183 (mem.as_ptr() as u64 + reg[_src] + (insn.imm as u32) as u64) as *const u16; in execute_program()
191 (mem.as_ptr() as u64 + reg[_src] + (insn.imm as u32) as u64) as *const u32; in execute_program()
199 (mem.as_ptr() as u64 + reg[_src] + (insn.imm as u32) as u64) as *const u64; in execute_program()
213 reg[_dst] = ((insn.imm as u32) as u64) + ((next_insn.imm as u64) << 32); in execute_program()
260 x.write_unaligned(insn.imm as u8); in execute_program()
266 x.write_unaligned(insn.imm as u16); in execute_program()
272 x.write_unaligned(insn.imm as u32); in execute_program()
278 x.write_unaligned(insn.imm as u64); in execute_program()
312 …ebpf::ADD32_IMM => reg[_dst] = (reg[_dst] as i32).wrapping_add(insn.imm) as u64, //((reg[_dst] & U… in execute_program()
314 ebpf::SUB32_IMM => reg[_dst] = (reg[_dst] as i32).wrapping_sub(insn.imm) as u64, in execute_program()
316 ebpf::MUL32_IMM => reg[_dst] = (reg[_dst] as i32).wrapping_mul(insn.imm) as u64, in execute_program()
318 ebpf::DIV32_IMM if insn.imm as u32 == 0 => reg[_dst] = 0, in execute_program()
319 ebpf::DIV32_IMM => reg[_dst] = (reg[_dst] as u32 / insn.imm as u32) as u64, in execute_program()
322 ebpf::OR32_IMM => reg[_dst] = (reg[_dst] as u32 | insn.imm as u32) as u64, in execute_program()
324 ebpf::AND32_IMM => reg[_dst] = (reg[_dst] as u32 & insn.imm as u32) as u64, in execute_program()
328 ebpf::LSH32_IMM => reg[_dst] = (reg[_dst] as u32).wrapping_shl(insn.imm as u32) as u64, in execute_program()
330 ebpf::RSH32_IMM => reg[_dst] = (reg[_dst] as u32).wrapping_shr(insn.imm as u32) as u64, in execute_program()
336 ebpf::MOD32_IMM if insn.imm as u32 == 0 => (), in execute_program()
337 ebpf::MOD32_IMM => reg[_dst] = (reg[_dst] as u32 % insn.imm as u32) as u64, in execute_program()
340 ebpf::XOR32_IMM => reg[_dst] = (reg[_dst] as u32 ^ insn.imm as u32) as u64, in execute_program()
342 ebpf::MOV32_IMM => reg[_dst] = insn.imm as u32 as u64, in execute_program()
347 reg[_dst] = (reg[_dst] as i32).wrapping_shr(insn.imm as u32) as u64; in execute_program()
355 reg[_dst] = match insn.imm { in execute_program()
363 reg[_dst] = match insn.imm { in execute_program()
372 ebpf::ADD64_IMM => reg[_dst] = reg[_dst].wrapping_add(insn.imm as u64), in execute_program()
374 ebpf::SUB64_IMM => reg[_dst] = reg[_dst].wrapping_sub(insn.imm as u64), in execute_program()
376 ebpf::MUL64_IMM => reg[_dst] = reg[_dst].wrapping_mul(insn.imm as u64), in execute_program()
378 ebpf::DIV64_IMM if insn.imm == 0 => reg[_dst] = 0, in execute_program()
379 ebpf::DIV64_IMM => reg[_dst] /= insn.imm as u64, in execute_program()
382 ebpf::OR64_IMM => reg[_dst] |= insn.imm as u64, in execute_program()
384 ebpf::AND64_IMM => reg[_dst] &= insn.imm as u64, in execute_program()
386 ebpf::LSH64_IMM => reg[_dst] <<= insn.imm as u64 & SHIFT_MASK_64, in execute_program()
388 ebpf::RSH64_IMM => reg[_dst] >>= insn.imm as u64 & SHIFT_MASK_64, in execute_program()
391 ebpf::MOD64_IMM if insn.imm == 0 => (), in execute_program()
392 ebpf::MOD64_IMM => reg[_dst] %= insn.imm as u64, in execute_program()
395 ebpf::XOR64_IMM => reg[_dst] ^= insn.imm as u64, in execute_program()
397 ebpf::MOV64_IMM => reg[_dst] = insn.imm as u64, in execute_program()
400 reg[_dst] = (reg[_dst] as i64 >> (insn.imm as u64 & SHIFT_MASK_64)) as u64 in execute_program()
410 if reg[_dst] == insn.imm as u64 { in execute_program()
420 if reg[_dst] > insn.imm as u64 { in execute_program()
430 if reg[_dst] >= insn.imm as u64 { in execute_program()
440 if reg[_dst] < insn.imm as u64 { in execute_program()
450 if reg[_dst] <= insn.imm as u64 { in execute_program()
460 if reg[_dst] & insn.imm as u64 != 0 { in execute_program()
470 if reg[_dst] != insn.imm as u64 { in execute_program()
480 if reg[_dst] as i64 > insn.imm as i64 { in execute_program()
490 if reg[_dst] as i64 >= insn.imm as i64 { in execute_program()
500 if (reg[_dst] as i64) < insn.imm as i64 { in execute_program()
510 if reg[_dst] as i64 <= insn.imm as i64 { in execute_program()
522 if reg[_dst] as u32 == insn.imm as u32 { in execute_program()
532 if reg[_dst] as u32 > insn.imm as u32 { in execute_program()
542 if reg[_dst] as u32 >= insn.imm as u32 { in execute_program()
552 if (reg[_dst] as u32) < insn.imm as u32 { in execute_program()
562 if reg[_dst] as u32 <= insn.imm as u32 { in execute_program()
572 if reg[_dst] as u32 & insn.imm as u32 != 0 { in execute_program()
582 if reg[_dst] as u32 != insn.imm as u32 { in execute_program()
592 if reg[_dst] as i32 > insn.imm { in execute_program()
602 if reg[_dst] as i32 >= insn.imm { in execute_program()
612 if (reg[_dst] as i32) < insn.imm { in execute_program()
622 if reg[_dst] as i32 <= insn.imm { in execute_program()
640 if let Some(function) = helpers.get(&(insn.imm as u32)) { in execute_program()
646 insn.imm as u32,BPF_FUNC_MAPPER[insn.imm as usize],insn_ptr in execute_program()
667 …g::trace!("BPF TO BPF CALL: new pc: {} + {} = {}",insn_ptr ,insn.imm,insn_ptr + insn.imm as usize); in execute_program()
670 insn_ptr += insn.imm as usize; in execute_program()
677 insn.imm as u32,BPF_FUNC_MAPPER[insn.imm as usize],insn_ptr in execute_program()