Lines Matching refs:imm
726 u32 imm = 0; in do_apf_run() local
731 … imm = decode_imm(ctx, imm_len); /* 1st imm, at worst bytes 1-4 past opcode/program_len */ in do_apf_run()
733 signed_imm = (s32)(imm << ((4 - imm_len) * 8)); in do_apf_run()
739 arith_imm = (ctx->v6) ? (len_field ? imm : OTHER_REG) : (reg_num ? ctx->R[1] : imm); in do_apf_run()
745 if (imm) { in do_apf_run()
746 if (4 * imm > ctx->ram_len) return EXCEPTION; in do_apf_run()
747 counter[-(s32)imm]++; in do_apf_run()
758 u32 offs = imm; in do_apf_run()
797 ctx->pc += imm; in do_apf_run()
812 case JEQ_OPCODE: if (ctx->R[0] == cmp_imm) ctx->pc += imm; break; in do_apf_run()
813 case JNE_OPCODE: if (ctx->R[0] != cmp_imm) ctx->pc += imm; break; in do_apf_run()
814 case JGT_OPCODE: if (ctx->R[0] > cmp_imm) ctx->pc += imm; break; in do_apf_run()
815 case JLT_OPCODE: if (ctx->R[0] < cmp_imm) ctx->pc += imm; break; in do_apf_run()
816 case JSET_OPCODE: if (ctx->R[0] & cmp_imm) ctx->pc += imm; break; in do_apf_run()
844 if (matched ^ !reg_num) ctx->pc += imm; in do_apf_run()
872 pktcopy_src_offset = imm; in do_apf_run()
873 imm = PKTDATACOPYIMM_EXT_OPCODE; in do_apf_run()
877 imm < (LDM_EXT_OPCODE + MEMORY_ITEMS)) { in do_apf_run()
878 REG = ctx->mem.slot[imm - LDM_EXT_OPCODE]; in do_apf_run()
879 } else if (imm >= STM_EXT_OPCODE && imm < (STM_EXT_OPCODE + MEMORY_ITEMS)) { in do_apf_run()
880 ctx->mem.slot[imm - STM_EXT_OPCODE] = REG; in do_apf_run()
881 } else switch (imm) { in do_apf_run()
945 if (imm != EPKTDATACOPYR1_EXT_OPCODE) { in do_apf_run()
970 if (imm & 1) { /* JDNSQMATCH & JDNSQMATCHSAFE are *odd* extended opcodes */ in do_apf_run()
983 return (imm >= JDNSQMATCHSAFE_EXT_OPCODE) ? PASS : DROP; in do_apf_run()
998 const u32 write_len = 1 << (imm - EWRITE1_EXT_OPCODE); in do_apf_run()
1035 if (!imm) return EXCEPTION; in do_apf_run()
1036 if (imm > 0xFFFF) return EXCEPTION; in do_apf_run()
1037 if (imm * 4 > ctx->ram_len) return EXCEPTION; in do_apf_run()
1039 REG = counter[-(s32)imm]; in do_apf_run()
1041 counter[-(s32)imm] = REG; in do_apf_run()
1073 (u8)(imm >> (write_len - 1 - i) * 8); in do_apf_run()