Lines Matching +full:rs +full:-

20 #include "disas/dis-asm.h"
36 uint32_t addr = ctx->addr; in decode_load_bytes()
38 g_assert(ctx->len == i); in decode_load_bytes()
39 g_assert(n <= ARRAY_SIZE(ctx->bytes)); in decode_load_bytes()
42 ctx->dis->read_memory_func(addr++, &ctx->bytes[i - 1], 1, ctx->dis); in decode_load_bytes()
43 insn |= ctx->bytes[i - 1] << (32 - i * 8); in decode_load_bytes()
45 ctx->addr = addr; in decode_load_bytes()
46 ctx->len = n; in decode_load_bytes()
53 uint32_t addr = ctx->addr; in li()
54 uintptr_t len = ctx->len; in li()
58 g_assert(len + 1 <= ARRAY_SIZE(ctx->bytes)); in li()
59 ctx->addr += 1; in li()
60 ctx->len += 1; in li()
61 ctx->dis->read_memory_func(addr, ctx->bytes + len, 1, ctx->dis); in li()
62 return (int8_t)ctx->bytes[len]; in li()
64 g_assert(len + 2 <= ARRAY_SIZE(ctx->bytes)); in li()
65 ctx->addr += 2; in li()
66 ctx->len += 2; in li()
67 ctx->dis->read_memory_func(addr, ctx->bytes + len, 2, ctx->dis); in li()
68 return ldsw_le_p(ctx->bytes + len); in li()
70 g_assert(len + 3 <= ARRAY_SIZE(ctx->bytes)); in li()
71 ctx->addr += 3; in li()
72 ctx->len += 3; in li()
73 ctx->dis->read_memory_func(addr, ctx->bytes + len, 3, ctx->dis); in li()
74 return (int8_t)ctx->bytes[len + 2] << 16 | lduw_le_p(ctx->bytes + len); in li()
76 g_assert(len + 4 <= ARRAY_SIZE(ctx->bytes)); in li()
77 ctx->addr += 4; in li()
78 ctx->len += 4; in li()
79 ctx->dis->read_memory_func(addr, ctx->bytes + len, 4, ctx->dis); in li()
80 return ldl_le_p(ctx->bytes + len); in li()
89 * 0 -> 8 in bdsp_s()
90 * 1 -> 9 in bdsp_s()
91 * 2 -> 10 in bdsp_s()
92 * 3 -> 3 in bdsp_s()
94 * 7 -> 7 in bdsp_s()
102 /* Include the auto-generated decoder. */
103 #include "decode-insns.c.inc"
107 int i, len = ctx->len; in dump_bytes()
110 ctx->dis->fprintf_func(ctx->dis->stream, "%02x ", ctx->bytes[i]); in dump_bytes()
112 ctx->dis->fprintf_func(ctx->dis->stream, "%*c", (8 - i) * 3, '\t'); in dump_bytes()
118 ctx->dis->fprintf_func(ctx->dis->stream, __VA_ARGS__); \
142 uint32_t addr = ctx->addr; in rx_index_addr()
143 uintptr_t len = ctx->len; in rx_index_addr()
152 g_assert(len + 1 <= ARRAY_SIZE(ctx->bytes)); in rx_index_addr()
153 ctx->addr += 1; in rx_index_addr()
154 ctx->len += 1; in rx_index_addr()
155 ctx->dis->read_memory_func(addr, ctx->bytes + len, 1, ctx->dis); in rx_index_addr()
156 dsp = ctx->bytes[len]; in rx_index_addr()
159 g_assert(len + 2 <= ARRAY_SIZE(ctx->bytes)); in rx_index_addr()
160 ctx->addr += 2; in rx_index_addr()
161 ctx->len += 2; in rx_index_addr()
162 ctx->dis->read_memory_func(addr, ctx->bytes + len, 2, ctx->dis); in rx_index_addr()
163 dsp = lduw_le_p(ctx->bytes + len); in rx_index_addr()
169 sprintf(out, "%u", dsp << (mi < 3 ? mi : 4 - mi)); in rx_index_addr()
173 int ld, int mi, int rs, int rd) in prt_ldmi() argument
180 prt("%s\t%s[r%d]%s, r%d", insn, dsp, rs, sizes[mi], rd); in prt_ldmi()
182 prt("%s\tr%d, r%d", insn, rs, rd); in prt_ldmi()
195 /* mov.[bwl] rs,dsp:[rd] */
198 if (a->dsp > 0) { in trans_MOV_rm()
200 size[a->sz], a->rs, a->dsp << a->sz, a->rd); in trans_MOV_rm()
203 size[a->sz], a->rs, a->rd); in trans_MOV_rm()
208 /* mov.[bwl] dsp:[rs],rd */
211 if (a->dsp > 0) { in trans_MOV_mr()
213 size[a->sz], a->dsp << a->sz, a->rs, a->rd); in trans_MOV_mr()
216 size[a->sz], a->rs, a->rd); in trans_MOV_mr()
226 prt_ir(ctx, "mov.l", a->imm, a->rd); in trans_MOV_ir()
234 if (a->dsp > 0) { in trans_MOV_im()
236 size[a->sz], a->imm, a->dsp << a->sz, a->rd); in trans_MOV_im()
239 size[a->sz], a->imm, a->rd); in trans_MOV_im()
247 prt("mov.%c\t[r%d,r%d], r%d", size[a->sz], a->ri, a->rb, a->rd); in trans_MOV_ar()
254 prt("mov.%c\tr%d, [r%d, r%d]", size[a->sz], a->rs, a->ri, a->rb); in trans_MOV_ra()
259 /* mov.[bwl] dsp:[rs],dsp:[rd] */
260 /* mov.[bwl] rs,dsp:[rd] */
261 /* mov.[bwl] dsp:[rs],rd */
262 /* mov.[bwl] rs,rd */
265 char dspd[8], dsps[8], szc = size[a->sz]; in trans_MOV_mm()
267 if (a->lds == 3 && a->ldd == 3) { in trans_MOV_mm()
268 /* mov.[bwl] rs,rd */ in trans_MOV_mm()
269 prt("mov.%c\tr%d, r%d", szc, a->rs, a->rd); in trans_MOV_mm()
270 } else if (a->lds == 3) { in trans_MOV_mm()
271 rx_index_addr(ctx, dspd, a->ldd, a->sz); in trans_MOV_mm()
272 prt("mov.%c\tr%d, %s[r%d]", szc, a->rs, dspd, a->rd); in trans_MOV_mm()
273 } else if (a->ldd == 3) { in trans_MOV_mm()
274 rx_index_addr(ctx, dsps, a->lds, a->sz); in trans_MOV_mm()
275 prt("mov.%c\t%s[r%d], r%d", szc, dsps, a->rs, a->rd); in trans_MOV_mm()
277 rx_index_addr(ctx, dsps, a->lds, a->sz); in trans_MOV_mm()
278 rx_index_addr(ctx, dspd, a->ldd, a->sz); in trans_MOV_mm()
279 prt("mov.%c\t%s[r%d], %s[r%d]", szc, dsps, a->rs, dspd, a->rd); in trans_MOV_mm()
284 /* mov.[bwl] rs,[rd+] */
285 /* mov.[bwl] rs,[-rd] */
288 if (a->ad) { in trans_MOV_rp()
289 prt("mov.%c\tr%d, [-r%d]", size[a->sz], a->rs, a->rd); in trans_MOV_rp()
291 prt("mov.%c\tr%d, [r%d+]", size[a->sz], a->rs, a->rd); in trans_MOV_rp()
296 /* mov.[bwl] [rd+],rs */
297 /* mov.[bwl] [-rd],rs */
300 if (a->ad) { in trans_MOV_pr()
301 prt("mov.%c\t[-r%d], r%d", size[a->sz], a->rd, a->rs); in trans_MOV_pr()
303 prt("mov.%c\t[r%d+], r%d", size[a->sz], a->rd, a->rs); in trans_MOV_pr()
308 /* movu.[bw] dsp5:[rs],rd */
311 if (a->dsp > 0) { in trans_MOVU_mr()
312 prt("movu.%c\t%d[r%d], r%d", size[a->sz], in trans_MOVU_mr()
313 a->dsp << a->sz, a->rs, a->rd); in trans_MOVU_mr()
315 prt("movu.%c\t[r%d], r%d", size[a->sz], a->rs, a->rd); in trans_MOVU_mr()
320 /* movu.[bw] rs,rd */
323 prt("movu.%c\tr%d, r%d", size[a->sz], a->rs, a->rd); in trans_MOVU_rr()
330 prt("mov.%c\t[r%d,r%d], r%d", size[a->sz], a->ri, a->rb, a->rd); in trans_MOVU_ar()
334 /* movu.[bw] [rs+],rd */
335 /* movu.[bw] [-rs],rd */
338 if (a->ad) { in trans_MOVU_pr()
339 prt("movu.%c\t[-r%d], r%d", size[a->sz], a->rd, a->rs); in trans_MOVU_pr()
341 prt("movu.%c\t[r%d+], r%d", size[a->sz], a->rd, a->rs); in trans_MOVU_pr()
349 prt("pop\tr%d", a->rd); in trans_POP()
356 prt("pop\tr%s", rx_crname(a->cr)); in trans_POPC()
360 /* popm rd-rd2 */
363 prt("popm\tr%d-r%d", a->rd, a->rd2); in trans_POPM()
367 /* push rs */
370 prt("push\tr%d", a->rs); in trans_PUSH_r()
374 /* push dsp[rs] */
379 rx_index_addr(ctx, dsp, a->ld, a->sz); in trans_PUSH_m()
380 prt("push\t%s[r%d]", dsp, a->rs); in trans_PUSH_m()
387 prt("push\t%s", rx_crname(a->cr)); in trans_PUSHC()
391 /* pushm rs-rs2*/
394 prt("pushm\tr%d-r%d", a->rs, a->rs2); in trans_PUSHM()
398 /* xchg rs,rd */
401 prt("xchg\tr%d, r%d", a->rs, a->rd); in trans_XCHG_rr()
404 /* xchg dsp[rs].<mi>,rd */
407 prt_ldmi(ctx, "xchg", a->ld, a->mi, a->rs, a->rd); in trans_XCHG_mr()
414 prt_ir(ctx, "stz", a->imm, a->rd); in trans_STZ()
421 prt_ir(ctx, "stnz", a->imm, a->rd); in trans_STNZ()
428 prt("rtsd\t#%d", a->imm << 2); in trans_RTSD_i()
432 /* rtsd #imm, rd-rd2 */
435 prt("rtsd\t#%d, r%d - r%d", a->imm << 2, a->rd, a->rd2); in trans_RTSD_irr()
443 prt_ir(ctx, "and", a->imm, a->rd); in trans_AND_ir()
447 /* and dsp[rs], rd */
448 /* and rs,rd */
451 prt_ldmi(ctx, "and", a->ld, a->mi, a->rs, a->rd); in trans_AND_mr()
455 /* and rs,rs2,rd */
458 prt("and\tr%d,r%d, r%d", a->rs, a->rs2, a->rd); in trans_AND_rrr()
466 prt_ir(ctx, "or", a->imm, a->rd); in trans_OR_ir()
470 /* or dsp[rs], rd */
471 /* or rs,rd */
474 prt_ldmi(ctx, "or", a->ld, a->mi, a->rs, a->rd); in trans_OR_mr()
478 /* or rs,rs2,rd */
481 prt("or\tr%d, r%d, r%d", a->rs, a->rs2, a->rd); in trans_OR_rrr()
488 prt_ir(ctx, "xor", a->imm, a->rd); in trans_XOR_ir()
492 /* xor dsp[rs], rd */
493 /* xor rs,rd */
496 prt_ldmi(ctx, "xor", a->ld, a->mi, a->rs, a->rd); in trans_XOR_mr()
503 prt_ir(ctx, "tst", a->imm, a->rd); in trans_TST_ir()
507 /* tst dsp[rs], rd */
508 /* tst rs, rd */
511 prt_ldmi(ctx, "tst", a->ld, a->mi, a->rs, a->rd); in trans_TST_mr()
516 /* not rs, rd */
519 if (a->rs != a->rd) { in trans_NOT_rr()
520 prt("not\tr%d, r%d", a->rs, a->rd); in trans_NOT_rr()
522 prt("not\tr%d", a->rs); in trans_NOT_rr()
528 /* neg rs, rd */
531 if (a->rs != a->rd) { in trans_NEG_rr()
532 prt("neg\tr%d, r%d", a->rs, a->rd); in trans_NEG_rr()
534 prt("neg\tr%d", a->rs); in trans_NEG_rr()
542 prt_ir(ctx, "adc", a->imm, a->rd); in trans_ADC_ir()
546 /* adc rs, rd */
549 prt("adc\tr%d, r%d", a->rs, a->rd); in trans_ADC_rr()
553 /* adc dsp[rs], rd */
558 rx_index_addr(ctx, dsp, a->ld, 2); in trans_ADC_mr()
559 prt("adc\t%s[r%d], r%d", dsp, a->rs, a->rd); in trans_ADC_mr()
564 /* add #imm, rs, rd */
567 if (a->imm < 0x10 && a->rs2 == a->rd) { in trans_ADD_irr()
568 prt("add\t#%d, r%d", a->imm, a->rd); in trans_ADD_irr()
570 prt("add\t#0x%08x, r%d, r%d", a->imm, a->rs2, a->rd); in trans_ADD_irr()
575 /* add rs, rd */
576 /* add dsp[rs], rd */
579 prt_ldmi(ctx, "add", a->ld, a->mi, a->rs, a->rd); in trans_ADD_mr()
583 /* add rs, rs2, rd */
586 prt("add\tr%d, r%d, r%d", a->rs, a->rs2, a->rd); in trans_ADD_rrr()
595 prt_ir(ctx, "cmp", a->imm, a->rs2); in trans_CMP_ir()
599 /* cmp rs, rs2 */
600 /* cmp dsp[rs], rs2 */
603 prt_ldmi(ctx, "cmp", a->ld, a->mi, a->rs, a->rd); in trans_CMP_mr()
610 prt("sub\t#%d, r%d", a->imm, a->rd); in trans_SUB_ir()
614 /* sub rs, rd */
615 /* sub dsp[rs], rd */
618 prt_ldmi(ctx, "sub", a->ld, a->mi, a->rs, a->rd); in trans_SUB_mr()
622 /* sub rs, rs2, rd */
625 prt("sub\tr%d, r%d, r%d", a->rs, a->rs2, a->rd); in trans_SUB_rrr()
629 /* sbb rs, rd */
632 prt("sbb\tr%d, r%d", a->rs, a->rd); in trans_SBB_rr()
636 /* sbb dsp[rs], rd */
639 prt_ldmi(ctx, "sbb", a->ld, RX_IM_LONG, a->rs, a->rd); in trans_SBB_mr()
644 /* abs rs, rd */
647 if (a->rs != a->rd) { in trans_ABS_rr()
648 prt("abs\tr%d, r%d", a->rs, a->rd); in trans_ABS_rr()
650 prt("abs\tr%d", a->rs); in trans_ABS_rr()
658 prt_ir(ctx, "max", a->imm, a->rd); in trans_MAX_ir()
662 /* max rs, rd */
663 /* max dsp[rs], rd */
666 prt_ldmi(ctx, "max", a->ld, a->mi, a->rs, a->rd); in trans_MAX_mr()
673 prt_ir(ctx, "min", a->imm, a->rd); in trans_MIN_ir()
677 /* min rs, rd */
678 /* min dsp[rs], rd */
681 prt_ldmi(ctx, "min", a->ld, a->mi, a->rs, a->rd); in trans_MIN_mr()
689 prt_ir(ctx, "mul", a->imm, a->rd); in trans_MUL_ir()
693 /* mul rs, rd */
694 /* mul dsp[rs], rd */
697 prt_ldmi(ctx, "mul", a->ld, a->mi, a->rs, a->rd); in trans_MUL_mr()
701 /* mul rs, rs2, rd */
704 prt("mul\tr%d,r%d,r%d", a->rs, a->rs2, a->rd); in trans_MUL_rrr()
711 prt_ir(ctx, "emul", a->imm, a->rd); in trans_EMUL_ir()
715 /* emul rs, rd */
716 /* emul dsp[rs], rd */
719 prt_ldmi(ctx, "emul", a->ld, a->mi, a->rs, a->rd); in trans_EMUL_mr()
726 prt_ir(ctx, "emulu", a->imm, a->rd); in trans_EMULU_ir()
730 /* emulu rs, rd */
731 /* emulu dsp[rs], rd */
734 prt_ldmi(ctx, "emulu", a->ld, a->mi, a->rs, a->rd); in trans_EMULU_mr()
741 prt_ir(ctx, "div", a->imm, a->rd); in trans_DIV_ir()
745 /* div rs, rd */
746 /* div dsp[rs], rd */
749 prt_ldmi(ctx, "div", a->ld, a->mi, a->rs, a->rd); in trans_DIV_mr()
756 prt_ir(ctx, "divu", a->imm, a->rd); in trans_DIVU_ir()
760 /* divu rs, rd */
761 /* divu dsp[rs], rd */
764 prt_ldmi(ctx, "divu", a->ld, a->mi, a->rs, a->rd); in trans_DIVU_mr()
770 /* shll #imm:5, rs, rd */
773 if (a->rs2 != a->rd) { in trans_SHLL_irr()
774 prt("shll\t#%d, r%d, r%d", a->imm, a->rs2, a->rd); in trans_SHLL_irr()
776 prt("shll\t#%d, r%d", a->imm, a->rd); in trans_SHLL_irr()
781 /* shll rs, rd */
784 prt("shll\tr%d, r%d", a->rs, a->rd); in trans_SHLL_rr()
789 /* shar #imm:5, rs, rd */
792 if (a->rs2 != a->rd) { in trans_SHAR_irr()
793 prt("shar\t#%d, r%d, r%d", a->imm, a->rs2, a->rd); in trans_SHAR_irr()
795 prt("shar\t#%d, r%d", a->imm, a->rd); in trans_SHAR_irr()
800 /* shar rs, rd */
803 prt("shar\tr%d, r%d", a->rs, a->rd); in trans_SHAR_rr()
808 /* shlr #imm:5, rs, rd */
811 if (a->rs2 != a->rd) { in trans_SHLR_irr()
812 prt("shlr\t#%d, r%d, r%d", a->imm, a->rs2, a->rd); in trans_SHLR_irr()
814 prt("shlr\t#%d, r%d", a->imm, a->rd); in trans_SHLR_irr()
819 /* shlr rs, rd */
822 prt("shlr\tr%d, r%d", a->rs, a->rd); in trans_SHLR_rr()
829 prt("rorc\tr%d", a->rd); in trans_ROLC()
836 prt("rorc\tr%d", a->rd); in trans_RORC()
843 prt("rotl\t#%d, r%d", a->imm, a->rd); in trans_ROTL_ir()
847 /* rotl rs, rd */
850 prt("rotl\tr%d, r%d", a->rs, a->rd); in trans_ROTL_rr()
857 prt("rotr\t#%d, r%d", a->imm, a->rd); in trans_ROTR_ir()
861 /* rotr rs, rd */
864 prt("rotr\tr%d, r%d", a->rs, a->rd); in trans_ROTR_rr()
868 /* revl rs, rd */
871 prt("revl\tr%d, r%d", a->rs, a->rd); in trans_REVL()
875 /* revw rs, rd */
878 prt("revw\tr%d, r%d", a->rs, a->rd); in trans_REVW()
886 prt("b%s.%c\t%08x", cond[cd], sz[len - 1], ctx->pc + dst); in rx_bcnd_main()
900 rx_bcnd_main(ctx, a->cd, a->sz, a->dsp); in trans_BCnd()
910 rx_bcnd_main(ctx, 14, a->sz, a->dsp); in trans_BRA()
914 /* bra rs */
917 prt("bra.l\tr%d", a->rd); in trans_BRA_l()
921 /* jmp rs */
924 prt("jmp\tr%d", a->rs); in trans_JMP()
928 /* jsr rs */
931 prt("jsr\tr%d", a->rs); in trans_JSR()
940 prt("bsr.%c\t%08x", sz[a->sz - 3], ctx->pc + a->dsp); in trans_BSR()
944 /* bsr rs */
947 prt("bsr.l\tr%d", a->rd); in trans_BSR_l()
996 prt("suntil.%c", size[a->sz]); in trans_SUNTIL()
1003 prt("swhile.%c", size[a->sz]); in trans_SWHILE()
1009 prt("sstr.%c", size[a->sz]); in trans_SSTR()
1016 prt("rmpa.%c", size[a->sz]); in trans_RMPA()
1020 /* mulhi rs,rs2 */
1023 prt("mulhi\tr%d,r%d", a->rs, a->rs2); in trans_MULHI()
1027 /* mullo rs,rs2 */
1030 prt("mullo\tr%d, r%d", a->rs, a->rs2); in trans_MULLO()
1034 /* machi rs,rs2 */
1037 prt("machi\tr%d, r%d", a->rs, a->rs2); in trans_MACHI()
1041 /* maclo rs,rs2 */
1044 prt("maclo\tr%d, r%d", a->rs, a->rs2); in trans_MACLO()
1051 prt("mvfachi\tr%d", a->rd); in trans_MVFACHI()
1058 prt("mvfacmi\tr%d", a->rd); in trans_MVFACMI()
1062 /* mvtachi rs */
1065 prt("mvtachi\tr%d", a->rs); in trans_MVTACHI()
1069 /* mvtaclo rs */
1072 prt("mvtaclo\tr%d", a->rs); in trans_MVTACLO()
1079 prt("racw\t#%d", a->imm + 1); in trans_RACW()
1086 prt("sat\tr%d", a->rd); in trans_SAT()
1100 prt("fadd\t#%d,r%d", li(ctx, 0), a->rd); in trans_FADD_ir()
1104 /* fadd dsp[rs], rd */
1105 /* fadd rs, rd */
1108 prt_ldmi(ctx, "fadd", a->ld, RX_IM_LONG, a->rs, a->rd); in trans_FADD_mr()
1115 prt("fadd\t#%d,r%d", li(ctx, 0), a->rd); in trans_FCMP_ir()
1119 /* fcmp dsp[rs], rd */
1120 /* fcmp rs, rd */
1123 prt_ldmi(ctx, "fcmp", a->ld, RX_IM_LONG, a->rs, a->rd); in trans_FCMP_mr()
1130 prt("fsub\t#%d,r%d", li(ctx, 0), a->rd); in trans_FSUB_ir()
1134 /* fsub dsp[rs], rd */
1135 /* fsub rs, rd */
1138 prt_ldmi(ctx, "fsub", a->ld, RX_IM_LONG, a->rs, a->rd); in trans_FSUB_mr()
1142 /* ftoi dsp[rs], rd */
1143 /* ftoi rs, rd */
1146 prt_ldmi(ctx, "ftoi", a->ld, RX_IM_LONG, a->rs, a->rd); in trans_FTOI()
1153 prt("fmul\t#%d,r%d", li(ctx, 0), a->rd); in trans_FMUL_ir()
1157 /* fmul dsp[rs], rd */
1158 /* fmul rs, rd */
1161 prt_ldmi(ctx, "fmul", a->ld, RX_IM_LONG, a->rs, a->rd); in trans_FMUL_mr()
1168 prt("fdiv\t#%d,r%d", li(ctx, 0), a->rd); in trans_FDIV_ir()
1172 /* fdiv dsp[rs], rd */
1173 /* fdiv rs, rd */
1176 prt_ldmi(ctx, "fdiv", a->ld, RX_IM_LONG, a->rs, a->rd); in trans_FDIV_mr()
1180 /* round dsp[rs], rd */
1181 /* round rs, rd */
1184 prt_ldmi(ctx, "round", a->ld, RX_IM_LONG, a->rs, a->rd); in trans_ROUND()
1188 /* itof rs, rd */
1189 /* itof dsp[rs], rd */
1192 prt_ldmi(ctx, "itof", a->ld, RX_IM_LONG, a->rs, a->rd); in trans_ITOF()
1199 rx_index_addr(ctx, dsp, a->ld, RX_MEMORY_BYTE); \
1200 prt("b%s\t#%d, %s[r%d]", #name, a->imm, dsp, reg); \
1207 rx_index_addr(ctx, dsp, a->ld, RX_MEMORY_BYTE); \
1208 prt("b%s\tr%d, %s[r%d]", #name, a->rd, dsp, a->rs); \
1215 BOP_IM(bset, a->rs); in trans_BSET_im()
1218 /* bset rs, dsp[rd] */
1224 /* bset rs, rd */
1227 prt("bset\tr%d,r%d", a->rs, a->rd); in trans_BSET_rr()
1234 prt("bset\t#%d, r%d", a->imm, a->rd); in trans_BSET_ir()
1241 BOP_IM(clr, a->rs); in trans_BCLR_im()
1244 /* bclr rs, dsp[rd] */
1250 /* bclr rs, rd */
1253 prt("bclr\tr%d, r%d", a->rs, a->rd); in trans_BCLR_rr()
1260 prt("bclr\t#%d,r%d", a->imm, a->rd); in trans_BCLR_ir()
1267 BOP_IM(tst, a->rs); in trans_BTST_im()
1270 /* btst rs, dsp[rd] */
1276 /* btst rs, rd */
1279 prt("btst\tr%d, r%d", a->rs, a->rd); in trans_BTST_rr()
1286 prt("btst\t#%d, r%d", a->imm, a->rd); in trans_BTST_ir()
1290 /* bnot rs, dsp[rd] */
1296 /* bnot rs, rd */
1299 prt("bnot\tr%d, r%d", a->rs, a->rd); in trans_BNOT_rr()
1306 BOP_IM(not, a->rs); in trans_BNOT_im()
1312 prt("bnot\t#%d, r%d", a->imm, a->rd); in trans_BNOT_ir()
1321 rx_index_addr(ctx, dsp, a->ld, RX_MEMORY_BYTE); in trans_BMCnd_im()
1322 prt("bm%s\t#%d, %s[r%d]", cond[a->cd], a->imm, dsp, a->rd); in trans_BMCnd_im()
1329 prt("bm%s\t#%d, r%d", cond[a->cd], a->imm, a->rd); in trans_BMCnd_ir()
1336 prt("clrpsw\t%c", psw[a->cb]); in trans_CLRPSW()
1343 prt("setpsw\t%c", psw[a->cb]); in trans_SETPSW()
1350 prt("movtipl\t#%d", a->imm); in trans_MVTIPL()
1357 prt("mvtc\t#0x%08x, %s", a->imm, rx_crname(a->cr)); in trans_MVTC_i()
1361 /* mvtc rs, rd */
1364 prt("mvtc\tr%d, %s", a->rs, rx_crname(a->cr)); in trans_MVTC_r()
1368 /* mvfc rs, rd */
1371 prt("mvfc\t%s, r%d", rx_crname(a->cr), a->rd); in trans_MVFC()
1399 prt("int\t#%d", a->imm); in trans_INT()
1414 if (a->ld < 3) { in trans_SCCnd()
1416 rx_index_addr(ctx, dsp, a->sz, a->ld); in trans_SCCnd()
1417 prt("sc%s.%c\t%s[r%d]", cond[a->cd], size[a->sz], dsp, a->rd); in trans_SCCnd()
1419 prt("sc%s.%c\tr%d", cond[a->cd], size[a->sz], a->rd); in trans_SCCnd()
1436 ctx.dis->fprintf_func(ctx.dis->stream, ".byte\t"); in print_insn_rx()
1437 for (i = 0; i < ctx.addr - addr; i++) { in print_insn_rx()
1439 ctx.dis->fprintf_func(ctx.dis->stream, ","); in print_insn_rx()
1441 ctx.dis->fprintf_func(ctx.dis->stream, "0x%02x", insn >> 24); in print_insn_rx()
1445 return ctx.addr - addr; in print_insn_rx()