Lines Matching refs:a
65 static bool trans_MFHI1(DisasContext *ctx, arg_r *a) in trans_MFHI1() argument
67 gen_store_gpr(cpu_HI[1], a->rd); in trans_MFHI1()
72 static bool trans_MFLO1(DisasContext *ctx, arg_r *a) in trans_MFLO1() argument
74 gen_store_gpr(cpu_LO[1], a->rd); in trans_MFLO1()
79 static bool trans_MTHI1(DisasContext *ctx, arg_r *a) in trans_MTHI1() argument
81 gen_load_gpr(cpu_HI[1], a->rs); in trans_MTHI1()
86 static bool trans_MTLO1(DisasContext *ctx, arg_r *a) in trans_MTLO1() argument
88 gen_load_gpr(cpu_LO[1], a->rs); in trans_MTLO1()
117 static bool trans_parallel_arith(DisasContext *ctx, arg_r *a, in trans_parallel_arith() argument
122 if (a->rd == 0) { in trans_parallel_arith()
131 gen_load_gpr(ax, a->rs); in trans_parallel_arith()
132 gen_load_gpr(bx, a->rt); in trans_parallel_arith()
133 gen_logic_i64(cpu_gpr[a->rd], ax, bx); in trans_parallel_arith()
136 gen_load_gpr_hi(ax, a->rs); in trans_parallel_arith()
137 gen_load_gpr_hi(bx, a->rt); in trans_parallel_arith()
138 gen_logic_i64(cpu_gpr_hi[a->rd], ax, bx); in trans_parallel_arith()
143 static bool trans_PSUBB(DisasContext *ctx, arg_r *a) in trans_PSUBB() argument
145 return trans_parallel_arith(ctx, a, tcg_gen_vec_sub8_i64); in trans_PSUBB()
149 static bool trans_PSUBH(DisasContext *ctx, arg_r *a) in trans_PSUBH() argument
151 return trans_parallel_arith(ctx, a, tcg_gen_vec_sub16_i64); in trans_PSUBH()
155 static bool trans_PSUBW(DisasContext *ctx, arg_r *a) in trans_PSUBW() argument
157 return trans_parallel_arith(ctx, a, tcg_gen_vec_sub32_i64); in trans_PSUBW()
186 static bool trans_PAND(DisasContext *ctx, arg_r *a) in trans_PAND() argument
188 return trans_parallel_arith(ctx, a, tcg_gen_and_i64); in trans_PAND()
192 static bool trans_POR(DisasContext *ctx, arg_r *a) in trans_POR() argument
194 return trans_parallel_arith(ctx, a, tcg_gen_or_i64); in trans_POR()
198 static bool trans_PXOR(DisasContext *ctx, arg_r *a) in trans_PXOR() argument
200 return trans_parallel_arith(ctx, a, tcg_gen_xor_i64); in trans_PXOR()
204 static bool trans_PNOR(DisasContext *ctx, arg_r *a) in trans_PNOR() argument
206 return trans_parallel_arith(ctx, a, tcg_gen_nor_i64); in trans_PNOR()
234 static bool trans_parallel_compare(DisasContext *ctx, arg_r *a, in trans_parallel_compare() argument
239 if (a->rd == 0) { in trans_parallel_compare()
253 gen_load_gpr(ax, a->rs); in trans_parallel_compare()
254 gen_load_gpr(bx, a->rt); in trans_parallel_compare()
259 tcg_gen_deposit_i64(cpu_gpr[a->rd], cpu_gpr[a->rd], t2, wlen * i, wlen); in trans_parallel_compare()
262 gen_load_gpr_hi(ax, a->rs); in trans_parallel_compare()
263 gen_load_gpr_hi(bx, a->rt); in trans_parallel_compare()
268 tcg_gen_deposit_i64(cpu_gpr_hi[a->rd], cpu_gpr_hi[a->rd], t2, wlen * i, wlen); in trans_parallel_compare()
274 static bool trans_PCGTB(DisasContext *ctx, arg_r *a) in trans_PCGTB() argument
276 return trans_parallel_compare(ctx, a, TCG_COND_GE, 8); in trans_PCGTB()
280 static bool trans_PCEQB(DisasContext *ctx, arg_r *a) in trans_PCEQB() argument
282 return trans_parallel_compare(ctx, a, TCG_COND_EQ, 8); in trans_PCEQB()
286 static bool trans_PCGTH(DisasContext *ctx, arg_r *a) in trans_PCGTH() argument
288 return trans_parallel_compare(ctx, a, TCG_COND_GE, 16); in trans_PCGTH()
292 static bool trans_PCEQH(DisasContext *ctx, arg_r *a) in trans_PCEQH() argument
294 return trans_parallel_compare(ctx, a, TCG_COND_EQ, 16); in trans_PCEQH()
298 static bool trans_PCGTW(DisasContext *ctx, arg_r *a) in trans_PCGTW() argument
300 return trans_parallel_compare(ctx, a, TCG_COND_GE, 32); in trans_PCGTW()
304 static bool trans_PCEQW(DisasContext *ctx, arg_r *a) in trans_PCEQW() argument
306 return trans_parallel_compare(ctx, a, TCG_COND_EQ, 32); in trans_PCEQW()
322 static bool trans_LQ(DisasContext *ctx, arg_i *a) in trans_LQ() argument
327 if (a->rt == 0) { in trans_LQ()
335 gen_base_offset_addr(ctx, addr, a->base, a->offset); in trans_LQ()
344 gen_store_gpr(t0, a->rt); in trans_LQ()
349 gen_store_gpr_hi(t0, a->rt); in trans_LQ()
353 static bool trans_SQ(DisasContext *ctx, arg_i *a) in trans_SQ() argument
358 gen_base_offset_addr(ctx, addr, a->base, a->offset); in trans_SQ()
366 gen_load_gpr(t0, a->rt); in trans_SQ()
371 gen_load_gpr_hi(t0, a->rt); in trans_SQ()
417 static bool trans_PPACW(DisasContext *ctx, arg_r *a) in trans_PPACW() argument
421 if (a->rd == 0) { in trans_PPACW()
430 gen_load_gpr(a0, a->rs); in trans_PPACW()
431 gen_load_gpr(b0, a->rt); in trans_PPACW()
433 gen_load_gpr_hi(t0, a->rt); /* b1 */ in trans_PPACW()
434 tcg_gen_deposit_i64(cpu_gpr[a->rd], b0, t0, 32, 32); in trans_PPACW()
436 gen_load_gpr_hi(t0, a->rs); /* a1 */ in trans_PPACW()
437 tcg_gen_deposit_i64(cpu_gpr_hi[a->rd], a0, t0, 32, 32); in trans_PPACW()
441 static void gen_pextw(TCGv_i64 dl, TCGv_i64 dh, TCGv_i64 a, TCGv_i64 b) in gen_pextw() argument
443 tcg_gen_deposit_i64(dl, b, a, 32, 32); in gen_pextw()
445 tcg_gen_deposit_i64(dh, a, b, 0, 32); in gen_pextw()
448 static bool trans_PEXTLx(DisasContext *ctx, arg_r *a, unsigned wlen) in trans_PEXTLx() argument
452 if (a->rd == 0) { in trans_PEXTLx()
460 gen_load_gpr(ax, a->rs); in trans_PEXTLx()
461 gen_load_gpr(bx, a->rt); in trans_PEXTLx()
465 tcg_gen_deposit_i64(cpu_gpr[a->rd], in trans_PEXTLx()
466 cpu_gpr[a->rd], bx, 2 * wlen * i, wlen); in trans_PEXTLx()
467 tcg_gen_deposit_i64(cpu_gpr[a->rd], in trans_PEXTLx()
468 cpu_gpr[a->rd], ax, 2 * wlen * i + wlen, wlen); in trans_PEXTLx()
474 tcg_gen_deposit_i64(cpu_gpr_hi[a->rd], in trans_PEXTLx()
475 cpu_gpr_hi[a->rd], bx, 2 * wlen * i, wlen); in trans_PEXTLx()
476 tcg_gen_deposit_i64(cpu_gpr_hi[a->rd], in trans_PEXTLx()
477 cpu_gpr_hi[a->rd], ax, 2 * wlen * i + wlen, wlen); in trans_PEXTLx()
485 static bool trans_PEXTLB(DisasContext *ctx, arg_r *a) in trans_PEXTLB() argument
487 return trans_PEXTLx(ctx, a, 8); in trans_PEXTLB()
491 static bool trans_PEXTLH(DisasContext *ctx, arg_r *a) in trans_PEXTLH() argument
493 return trans_PEXTLx(ctx, a, 16); in trans_PEXTLH()
497 static bool trans_PEXTLW(DisasContext *ctx, arg_r *a) in trans_PEXTLW() argument
501 if (a->rd == 0) { in trans_PEXTLW()
509 gen_load_gpr(ax, a->rs); in trans_PEXTLW()
510 gen_load_gpr(bx, a->rt); in trans_PEXTLW()
511 gen_pextw(cpu_gpr[a->rd], cpu_gpr_hi[a->rd], ax, bx); in trans_PEXTLW()
516 static bool trans_PEXTUW(DisasContext *ctx, arg_r *a) in trans_PEXTUW() argument
520 if (a->rd == 0) { in trans_PEXTUW()
528 gen_load_gpr_hi(ax, a->rs); in trans_PEXTUW()
529 gen_load_gpr_hi(bx, a->rt); in trans_PEXTUW()
530 gen_pextw(cpu_gpr[a->rd], cpu_gpr_hi[a->rd], ax, bx); in trans_PEXTUW()
556 static bool trans_PCPYH(DisasContext *s, arg_r *a) in trans_PCPYH() argument
558 if (a->rd == 0) { in trans_PCPYH()
563 if (a->rt == 0) { in trans_PCPYH()
564 tcg_gen_movi_i64(cpu_gpr[a->rd], 0); in trans_PCPYH()
565 tcg_gen_movi_i64(cpu_gpr_hi[a->rd], 0); in trans_PCPYH()
569 tcg_gen_deposit_i64(cpu_gpr[a->rd], cpu_gpr[a->rt], cpu_gpr[a->rt], 16, 16); in trans_PCPYH()
570 tcg_gen_deposit_i64(cpu_gpr[a->rd], cpu_gpr[a->rd], cpu_gpr[a->rd], 32, 32); in trans_PCPYH()
571 tcg_gen_deposit_i64(cpu_gpr_hi[a->rd], cpu_gpr_hi[a->rt], cpu_gpr_hi[a->rt], 16, 16); in trans_PCPYH()
572 tcg_gen_deposit_i64(cpu_gpr_hi[a->rd], cpu_gpr_hi[a->rd], cpu_gpr_hi[a->rd], 32, 32); in trans_PCPYH()
578 static bool trans_PCPYLD(DisasContext *s, arg_r *a) in trans_PCPYLD() argument
580 if (a->rd == 0) { in trans_PCPYLD()
585 if (a->rs == 0) { in trans_PCPYLD()
586 tcg_gen_movi_i64(cpu_gpr_hi[a->rd], 0); in trans_PCPYLD()
588 tcg_gen_mov_i64(cpu_gpr_hi[a->rd], cpu_gpr[a->rs]); in trans_PCPYLD()
591 if (a->rt == 0) { in trans_PCPYLD()
592 tcg_gen_movi_i64(cpu_gpr[a->rd], 0); in trans_PCPYLD()
593 } else if (a->rd != a->rt) { in trans_PCPYLD()
594 tcg_gen_mov_i64(cpu_gpr[a->rd], cpu_gpr[a->rt]); in trans_PCPYLD()
601 static bool trans_PCPYUD(DisasContext *s, arg_r *a) in trans_PCPYUD() argument
603 if (a->rd == 0) { in trans_PCPYUD()
608 gen_load_gpr_hi(cpu_gpr[a->rd], a->rs); in trans_PCPYUD()
610 if (a->rt == 0) { in trans_PCPYUD()
611 tcg_gen_movi_i64(cpu_gpr_hi[a->rd], 0); in trans_PCPYUD()
612 } else if (a->rd != a->rt) { in trans_PCPYUD()
613 tcg_gen_mov_i64(cpu_gpr_hi[a->rd], cpu_gpr_hi[a->rt]); in trans_PCPYUD()
620 static bool trans_PROT3W(DisasContext *ctx, arg_r *a) in trans_PROT3W() argument
624 if (a->rd == 0) { in trans_PROT3W()
628 if (a->rt == 0) { in trans_PROT3W()
629 tcg_gen_movi_i64(cpu_gpr[a->rd], 0); in trans_PROT3W()
630 tcg_gen_movi_i64(cpu_gpr_hi[a->rd], 0); in trans_PROT3W()
636 tcg_gen_mov_i64(ax, cpu_gpr_hi[a->rt]); in trans_PROT3W()
637 tcg_gen_deposit_i64(cpu_gpr_hi[a->rd], ax, cpu_gpr[a->rt], 0, 32); in trans_PROT3W()
639 tcg_gen_deposit_i64(cpu_gpr[a->rd], cpu_gpr[a->rt], ax, 0, 32); in trans_PROT3W()
640 tcg_gen_rotri_i64(cpu_gpr[a->rd], cpu_gpr[a->rd], 32); in trans_PROT3W()