Lines Matching refs:imm
17 unsigned int imm = insn.reg1i20_format.immediate; in simu_pc() local
26 regs->regs[rd] = pc + sign_extend64(imm << 2, 21); in simu_pc()
29 regs->regs[rd] = pc + sign_extend64(imm << 12, 31); in simu_pc()
32 regs->regs[rd] = pc + sign_extend64(imm << 18, 37); in simu_pc()
35 regs->regs[rd] = pc + sign_extend64(imm << 12, 31); in simu_pc()
48 unsigned int imm, imm_l, imm_h, rd, rj; in simu_branch() local
86 imm = insn.reg2i16_format.immediate; in simu_branch()
92 regs->csr_era = pc + sign_extend64(imm << 2, 17); in simu_branch()
98 regs->csr_era = pc + sign_extend64(imm << 2, 17); in simu_branch()
104 regs->csr_era = pc + sign_extend64(imm << 2, 17); in simu_branch()
110 regs->csr_era = pc + sign_extend64(imm << 2, 17); in simu_branch()
116 regs->csr_era = pc + sign_extend64(imm << 2, 17); in simu_branch()
122 regs->csr_era = pc + sign_extend64(imm << 2, 17); in simu_branch()
127 regs->csr_era = regs->regs[rj] + sign_extend64(imm << 2, 17); in simu_branch()
256 u32 larch_insn_gen_break(int imm) in larch_insn_gen_break() argument
260 if (imm < 0 || imm >= SZ_32K) { in larch_insn_gen_break()
265 emit_break(&insn, imm); in larch_insn_gen_break()
284 u32 larch_insn_gen_lu12iw(enum loongarch_gpr rd, int imm) in larch_insn_gen_lu12iw() argument
288 if (imm < -SZ_512K || imm >= SZ_512K) { in larch_insn_gen_lu12iw()
293 emit_lu12iw(&insn, rd, imm); in larch_insn_gen_lu12iw()
298 u32 larch_insn_gen_lu32id(enum loongarch_gpr rd, int imm) in larch_insn_gen_lu32id() argument
302 if (imm < -SZ_512K || imm >= SZ_512K) { in larch_insn_gen_lu32id()
307 emit_lu32id(&insn, rd, imm); in larch_insn_gen_lu32id()
312 u32 larch_insn_gen_lu52id(enum loongarch_gpr rd, enum loongarch_gpr rj, int imm) in larch_insn_gen_lu52id() argument
316 if (imm < -SZ_2K || imm >= SZ_2K) { in larch_insn_gen_lu52id()
321 emit_lu52id(&insn, rd, rj, imm); in larch_insn_gen_lu52id()
326 u32 larch_insn_gen_jirl(enum loongarch_gpr rd, enum loongarch_gpr rj, int imm) in larch_insn_gen_jirl() argument
330 if ((imm & 3) || imm < -SZ_128K || imm >= SZ_128K) { in larch_insn_gen_jirl()
335 emit_jirl(&insn, rj, rd, imm >> 2); in larch_insn_gen_jirl()