• Home
  • Raw
  • Download

Lines Matching refs:imm

144 static inline bool is_range16(s32 imm)  in is_range16()  argument
146 return !(imm >= SBIT(15) || imm < -SBIT(15)); in is_range16()
161 static inline void emit_load_imm(unsigned int dst, u32 imm, struct jit_ctx *ctx) in emit_load_imm() argument
165 if (!is_range16(imm)) { in emit_load_imm()
167 uasm_i_lui(&p, r_tmp_imm, (s32)imm >> 16); in emit_load_imm()
169 uasm_i_ori(&p, dst, r_tmp_imm, imm & 0xffff); in emit_load_imm()
172 uasm_i_addiu(&p, dst, r_zero, imm); in emit_load_imm()
177 if (!is_range16(imm)) in emit_load_imm()
187 static inline void emit_ori(unsigned int dst, unsigned src, u32 imm, in emit_ori() argument
190 if (imm >= BIT(16)) { in emit_ori()
191 emit_load_imm(r_tmp, imm, ctx); in emit_ori()
194 emit_instr(ctx, ori, dst, src, imm); in emit_ori()
199 int imm, struct jit_ctx *ctx) in emit_daddiu() argument
205 emit_instr(ctx, daddiu, dst, src, imm); in emit_daddiu()
209 u32 imm, struct jit_ctx *ctx) in emit_addiu() argument
211 if (!is_range16(imm)) { in emit_addiu()
212 emit_load_imm(r_tmp, imm, ctx); in emit_addiu()
215 emit_instr(ctx, addiu, dst, src, imm); in emit_addiu()
226 u32 imm, struct jit_ctx *ctx) in emit_andi() argument
229 if (imm >= BIT(16)) { in emit_andi()
230 emit_load_imm(r_tmp, imm, ctx); in emit_andi()
233 emit_instr(ctx, andi, dst, src, imm); in emit_andi()
243 static inline void emit_xori(ptr dst, ptr src, u32 imm, struct jit_ctx *ctx) in emit_xori() argument
246 if (imm >= BIT(16)) { in emit_xori()
247 emit_load_imm(r_tmp, imm, ctx); in emit_xori()
250 emit_instr(ctx, xori, dst, src, imm); in emit_xori()
317 unsigned int imm, struct jit_ctx *ctx) in emit_sltiu() argument
320 if (!is_range16((s32)imm)) { in emit_sltiu()
321 emit_load_imm(r_tmp, imm, ctx); in emit_sltiu()
324 emit_instr(ctx, sltiu, dst, src, imm); in emit_sltiu()
424 int imm, struct jit_ctx *ctx) in emit_load_ptr() argument
427 emit_long_instr(ctx, LW, dst, imm, src); in emit_load_ptr()
431 static inline void emit_load_func(unsigned int reg, ptr imm, in emit_load_func() argument
436 emit_load_imm(r_tmp, (u64)imm >> 32, ctx); in emit_load_func()
438 emit_ori(r_tmp, r_tmp_imm, (imm >> 16) & 0xffff, ctx); in emit_load_func()
440 emit_ori(reg, r_tmp_imm, imm & 0xffff, ctx); in emit_load_func()
442 emit_load_imm(reg, imm, ctx); in emit_load_func()
482 unsigned int imm, struct jit_ctx *ctx) in emit_bcond() argument
489 uasm_i_beq(&p, reg1, reg2, imm); in emit_bcond()
492 uasm_i_bne(&p, reg1, reg2, imm); in emit_bcond()
495 uasm_i_b(&p, imm); in emit_bcond()
505 static inline void emit_b(unsigned int imm, struct jit_ctx *ctx) in emit_b() argument
507 emit_bcond(MIPS_COND_ALL, r_zero, r_zero, imm, ctx); in emit_b()