Lines Matching refs:R

216 static void gen_add_CHf(TCGv R, TCGv Rd, TCGv Rr)  in gen_add_CHf()  argument
223 tcg_gen_andc_tl(t2, Rd, R); /* t2 = Rd & ~R */ in gen_add_CHf()
224 tcg_gen_andc_tl(t3, Rr, R); /* t3 = Rr & ~R */ in gen_add_CHf()
233 static void gen_add_Vf(TCGv R, TCGv Rd, TCGv Rr) in gen_add_Vf() argument
240 tcg_gen_xor_tl(t1, Rd, R); in gen_add_Vf()
247 static void gen_sub_CHf(TCGv R, TCGv Rd, TCGv Rr) in gen_sub_CHf() argument
256 tcg_gen_and_tl(t3, t3, R); in gen_sub_CHf()
264 static void gen_sub_Vf(TCGv R, TCGv Rd, TCGv Rr) in gen_sub_Vf() argument
271 tcg_gen_xor_tl(t1, Rd, R); in gen_sub_Vf()
278 static void gen_NSf(TCGv R) in gen_NSf() argument
280 tcg_gen_shri_tl(cpu_Nf, R, 7); /* Nf = R(7) */ in gen_NSf()
284 static void gen_ZNSf(TCGv R) in gen_ZNSf() argument
286 tcg_gen_setcondi_tl(TCG_COND_EQ, cpu_Zf, R, 0); /* Zf = R == 0 */ in gen_ZNSf()
289 tcg_gen_shri_tl(cpu_Nf, R, 7); /* Nf = R(7) */ in gen_ZNSf()
301 TCGv R = tcg_temp_new_i32(); in trans_ADD() local
303 tcg_gen_add_tl(R, Rd, Rr); /* Rd = Rd + Rr */ in trans_ADD()
304 tcg_gen_andi_tl(R, R, 0xff); /* make it 8 bits */ in trans_ADD()
307 gen_add_CHf(R, Rd, Rr); in trans_ADD()
308 gen_add_Vf(R, Rd, Rr); in trans_ADD()
309 gen_ZNSf(R); in trans_ADD()
312 tcg_gen_mov_tl(Rd, R); in trans_ADD()
324 TCGv R = tcg_temp_new_i32(); in trans_ADC() local
326 tcg_gen_add_tl(R, Rd, Rr); /* R = Rd + Rr + Cf */ in trans_ADC()
327 tcg_gen_add_tl(R, R, cpu_Cf); in trans_ADC()
328 tcg_gen_andi_tl(R, R, 0xff); /* make it 8 bits */ in trans_ADC()
331 gen_add_CHf(R, Rd, Rr); in trans_ADC()
332 gen_add_Vf(R, Rd, Rr); in trans_ADC()
333 gen_ZNSf(R); in trans_ADC()
336 tcg_gen_mov_tl(Rd, R); in trans_ADC()
356 TCGv R = tcg_temp_new_i32(); in trans_ADIW() local
360 tcg_gen_addi_tl(R, Rd, Imm); /* R = Rd + Imm */ in trans_ADIW()
361 tcg_gen_andi_tl(R, R, 0xffff); /* make it 16 bits */ in trans_ADIW()
364 tcg_gen_andc_tl(cpu_Cf, Rd, R); /* Cf = Rd & ~R */ in trans_ADIW()
366 tcg_gen_andc_tl(cpu_Vf, R, Rd); /* Vf = R & ~Rd */ in trans_ADIW()
368 tcg_gen_setcondi_tl(TCG_COND_EQ, cpu_Zf, R, 0); /* Zf = R == 0 */ in trans_ADIW()
369 tcg_gen_shri_tl(cpu_Nf, R, 15); /* Nf = R(15) */ in trans_ADIW()
373 tcg_gen_andi_tl(RdL, R, 0xff); in trans_ADIW()
374 tcg_gen_shri_tl(RdH, R, 8); in trans_ADIW()
386 TCGv R = tcg_temp_new_i32(); in trans_SUB() local
388 tcg_gen_sub_tl(R, Rd, Rr); /* R = Rd - Rr */ in trans_SUB()
389 tcg_gen_andi_tl(R, R, 0xff); /* make it 8 bits */ in trans_SUB()
392 tcg_gen_andc_tl(cpu_Cf, Rd, R); /* Cf = Rd & ~R */ in trans_SUB()
393 gen_sub_CHf(R, Rd, Rr); in trans_SUB()
394 gen_sub_Vf(R, Rd, Rr); in trans_SUB()
395 gen_ZNSf(R); in trans_SUB()
398 tcg_gen_mov_tl(Rd, R); in trans_SUB()
411 TCGv R = tcg_temp_new_i32(); in trans_SUBI() local
413 tcg_gen_sub_tl(R, Rd, Rr); /* R = Rd - Imm */ in trans_SUBI()
414 tcg_gen_andi_tl(R, R, 0xff); /* make it 8 bits */ in trans_SUBI()
417 gen_sub_CHf(R, Rd, Rr); in trans_SUBI()
418 gen_sub_Vf(R, Rd, Rr); in trans_SUBI()
419 gen_ZNSf(R); in trans_SUBI()
422 tcg_gen_mov_tl(Rd, R); in trans_SUBI()
434 TCGv R = tcg_temp_new_i32(); in trans_SBC() local
437 tcg_gen_sub_tl(R, Rd, Rr); /* R = Rd - Rr - Cf */ in trans_SBC()
438 tcg_gen_sub_tl(R, R, cpu_Cf); in trans_SBC()
439 tcg_gen_andi_tl(R, R, 0xff); /* make it 8 bits */ in trans_SBC()
442 gen_sub_CHf(R, Rd, Rr); in trans_SBC()
443 gen_sub_Vf(R, Rd, Rr); in trans_SBC()
444 gen_NSf(R); in trans_SBC()
450 tcg_gen_movcond_tl(TCG_COND_EQ, cpu_Zf, R, zero, cpu_Zf, zero); in trans_SBC()
453 tcg_gen_mov_tl(Rd, R); in trans_SBC()
464 TCGv R = tcg_temp_new_i32(); in trans_SBCI() local
467 tcg_gen_sub_tl(R, Rd, Rr); /* R = Rd - Rr - Cf */ in trans_SBCI()
468 tcg_gen_sub_tl(R, R, cpu_Cf); in trans_SBCI()
469 tcg_gen_andi_tl(R, R, 0xff); /* make it 8 bits */ in trans_SBCI()
472 gen_sub_CHf(R, Rd, Rr); in trans_SBCI()
473 gen_sub_Vf(R, Rd, Rr); in trans_SBCI()
474 gen_NSf(R); in trans_SBCI()
480 tcg_gen_movcond_tl(TCG_COND_EQ, cpu_Zf, R, zero, cpu_Zf, zero); in trans_SBCI()
483 tcg_gen_mov_tl(Rd, R); in trans_SBCI()
503 TCGv R = tcg_temp_new_i32(); in trans_SBIW() local
507 tcg_gen_subi_tl(R, Rd, Imm); /* R = Rd - Imm */ in trans_SBIW()
508 tcg_gen_andi_tl(R, R, 0xffff); /* make it 16 bits */ in trans_SBIW()
511 tcg_gen_andc_tl(cpu_Cf, R, Rd); in trans_SBIW()
513 tcg_gen_andc_tl(cpu_Vf, Rd, R); in trans_SBIW()
515 tcg_gen_setcondi_tl(TCG_COND_EQ, cpu_Zf, R, 0); /* Zf = R == 0 */ in trans_SBIW()
516 tcg_gen_shri_tl(cpu_Nf, R, 15); /* Nf = R(15) */ in trans_SBIW()
520 tcg_gen_andi_tl(RdL, R, 0xff); in trans_SBIW()
521 tcg_gen_shri_tl(RdH, R, 8); in trans_SBIW()
533 TCGv R = tcg_temp_new_i32(); in trans_AND() local
535 tcg_gen_and_tl(R, Rd, Rr); /* Rd = Rd and Rr */ in trans_AND()
539 tcg_gen_setcondi_tl(TCG_COND_EQ, cpu_Zf, R, 0); /* Zf = R == 0 */ in trans_AND()
540 gen_ZNSf(R); in trans_AND()
543 tcg_gen_mov_tl(Rd, R); in trans_AND()
573 TCGv R = tcg_temp_new_i32(); in trans_OR() local
575 tcg_gen_or_tl(R, Rd, Rr); in trans_OR()
579 gen_ZNSf(R); in trans_OR()
582 tcg_gen_mov_tl(Rd, R); in trans_OR()
648 TCGv R = tcg_temp_new_i32(); in trans_NEG() local
650 tcg_gen_sub_tl(R, t0, Rd); /* R = 0 - Rd */ in trans_NEG()
651 tcg_gen_andi_tl(R, R, 0xff); /* make it 8 bits */ in trans_NEG()
654 gen_sub_CHf(R, t0, Rd); in trans_NEG()
655 gen_sub_Vf(R, t0, Rd); in trans_NEG()
656 gen_ZNSf(R); in trans_NEG()
659 tcg_gen_mov_tl(Rd, R); in trans_NEG()
720 TCGv R = tcg_temp_new_i32(); in trans_MUL() local
722 tcg_gen_mul_tl(R, Rd, Rr); /* R = Rd * Rr */ in trans_MUL()
723 tcg_gen_andi_tl(R0, R, 0xff); in trans_MUL()
724 tcg_gen_shri_tl(R1, R, 8); in trans_MUL()
727 tcg_gen_shri_tl(cpu_Cf, R, 15); /* Cf = R(15) */ in trans_MUL()
728 tcg_gen_setcondi_tl(TCG_COND_EQ, cpu_Zf, R, 0); /* Zf = R == 0 */ in trans_MUL()
745 TCGv R = tcg_temp_new_i32(); in trans_MULS() local
751 tcg_gen_mul_tl(R, t0, t1); /* R = Rd * Rr */ in trans_MULS()
752 tcg_gen_andi_tl(R, R, 0xffff); /* make it 16 bits */ in trans_MULS()
753 tcg_gen_andi_tl(R0, R, 0xff); in trans_MULS()
754 tcg_gen_shri_tl(R1, R, 8); in trans_MULS()
757 tcg_gen_shri_tl(cpu_Cf, R, 15); /* Cf = R(15) */ in trans_MULS()
758 tcg_gen_setcondi_tl(TCG_COND_EQ, cpu_Zf, R, 0); /* Zf = R == 0 */ in trans_MULS()
776 TCGv R = tcg_temp_new_i32(); in trans_MULSU() local
780 tcg_gen_mul_tl(R, t0, Rr); /* R = Rd * Rr */ in trans_MULSU()
781 tcg_gen_andi_tl(R, R, 0xffff); /* make R 16 bits */ in trans_MULSU()
782 tcg_gen_andi_tl(R0, R, 0xff); in trans_MULSU()
783 tcg_gen_shri_tl(R1, R, 8); in trans_MULSU()
786 tcg_gen_shri_tl(cpu_Cf, R, 15); /* Cf = R(15) */ in trans_MULSU()
787 tcg_gen_setcondi_tl(TCG_COND_EQ, cpu_Zf, R, 0); /* Zf = R == 0 */ in trans_MULSU()
805 TCGv R = tcg_temp_new_i32(); in trans_FMUL() local
807 tcg_gen_mul_tl(R, Rd, Rr); /* R = Rd * Rr */ in trans_FMUL()
810 tcg_gen_shri_tl(cpu_Cf, R, 15); /* Cf = R(15) */ in trans_FMUL()
811 tcg_gen_setcondi_tl(TCG_COND_EQ, cpu_Zf, R, 0); /* Zf = R == 0 */ in trans_FMUL()
814 tcg_gen_shli_tl(R, R, 1); in trans_FMUL()
815 tcg_gen_andi_tl(R0, R, 0xff); in trans_FMUL()
816 tcg_gen_shri_tl(R1, R, 8); in trans_FMUL()
835 TCGv R = tcg_temp_new_i32(); in trans_FMULS() local
841 tcg_gen_mul_tl(R, t0, t1); /* R = Rd * Rr */ in trans_FMULS()
842 tcg_gen_andi_tl(R, R, 0xffff); /* make it 16 bits */ in trans_FMULS()
845 tcg_gen_shri_tl(cpu_Cf, R, 15); /* Cf = R(15) */ in trans_FMULS()
846 tcg_gen_setcondi_tl(TCG_COND_EQ, cpu_Zf, R, 0); /* Zf = R == 0 */ in trans_FMULS()
849 tcg_gen_shli_tl(R, R, 1); in trans_FMULS()
850 tcg_gen_andi_tl(R0, R, 0xff); in trans_FMULS()
851 tcg_gen_shri_tl(R1, R, 8); in trans_FMULS()
870 TCGv R = tcg_temp_new_i32(); in trans_FMULSU() local
874 tcg_gen_mul_tl(R, t0, Rr); /* R = Rd * Rr */ in trans_FMULSU()
875 tcg_gen_andi_tl(R, R, 0xffff); /* make it 16 bits */ in trans_FMULSU()
878 tcg_gen_shri_tl(cpu_Cf, R, 15); /* Cf = R(15) */ in trans_FMULSU()
879 tcg_gen_setcondi_tl(TCG_COND_EQ, cpu_Zf, R, 0); /* Zf = R == 0 */ in trans_FMULSU()
882 tcg_gen_shli_tl(R, R, 1); in trans_FMULSU()
883 tcg_gen_andi_tl(R0, R, 0xff); in trans_FMULSU()
884 tcg_gen_shri_tl(R1, R, 8); in trans_FMULSU()
1199 TCGv R = tcg_temp_new_i32(); in trans_CP() local
1201 tcg_gen_sub_tl(R, Rd, Rr); /* R = Rd - Rr */ in trans_CP()
1202 tcg_gen_andi_tl(R, R, 0xff); /* make it 8 bits */ in trans_CP()
1205 gen_sub_CHf(R, Rd, Rr); in trans_CP()
1206 gen_sub_Vf(R, Rd, Rr); in trans_CP()
1207 gen_ZNSf(R); in trans_CP()
1220 TCGv R = tcg_temp_new_i32(); in trans_CPC() local
1223 tcg_gen_sub_tl(R, Rd, Rr); /* R = Rd - Rr - Cf */ in trans_CPC()
1224 tcg_gen_sub_tl(R, R, cpu_Cf); in trans_CPC()
1225 tcg_gen_andi_tl(R, R, 0xff); /* make it 8 bits */ in trans_CPC()
1227 gen_sub_CHf(R, Rd, Rr); in trans_CPC()
1228 gen_sub_Vf(R, Rd, Rr); in trans_CPC()
1229 gen_NSf(R); in trans_CPC()
1235 tcg_gen_movcond_tl(TCG_COND_EQ, cpu_Zf, R, zero, cpu_Zf, zero); in trans_CPC()
1249 TCGv R = tcg_temp_new_i32(); in trans_CPI() local
1251 tcg_gen_sub_tl(R, Rd, Rr); /* R = Rd - Rr */ in trans_CPI()
1252 tcg_gen_andi_tl(R, R, 0xff); /* make it 8 bits */ in trans_CPI()
1255 gen_sub_CHf(R, Rd, Rr); in trans_CPI()
1256 gen_sub_Vf(R, Rd, Rr); in trans_CPI()
1257 gen_ZNSf(R); in trans_CPI()
2313 static void gen_rshift_ZNVSf(TCGv R) in gen_rshift_ZNVSf() argument
2315 tcg_gen_setcondi_tl(TCG_COND_EQ, cpu_Zf, R, 0); /* Zf = R == 0 */ in gen_rshift_ZNVSf()
2316 tcg_gen_shri_tl(cpu_Nf, R, 7); /* Nf = R(7) */ in gen_rshift_ZNVSf()