Commit 1ec6d2ea991a1605b9e0898aa9b6e0a2f56c6881
1 parent
a98824ac
Use tcg_const_tl for zero constant
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4054 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
19 additions
and
42 deletions
target-sparc/translate.c
| @@ -389,8 +389,7 @@ static inline void gen_cc_NZ(TCGv dst) | @@ -389,8 +389,7 @@ static inline void gen_cc_NZ(TCGv dst) | ||
| 389 | 389 | ||
| 390 | l1 = gen_new_label(); | 390 | l1 = gen_new_label(); |
| 391 | l2 = gen_new_label(); | 391 | l2 = gen_new_label(); |
| 392 | - r_zero = tcg_temp_new(TCG_TYPE_TL); | ||
| 393 | - tcg_gen_movi_tl(r_zero, 0); | 392 | + r_zero = tcg_const_tl(0); |
| 394 | tcg_gen_brcond_i32(TCG_COND_NE, dst, r_zero, l1); | 393 | tcg_gen_brcond_i32(TCG_COND_NE, dst, r_zero, l1); |
| 395 | tcg_gen_ori_i32(cpu_psr, cpu_psr, PSR_ZERO); | 394 | tcg_gen_ori_i32(cpu_psr, cpu_psr, PSR_ZERO); |
| 396 | gen_set_label(l1); | 395 | gen_set_label(l1); |
| @@ -451,8 +450,7 @@ static inline void gen_cc_V_add(TCGv dst, TCGv src1, TCGv src2) | @@ -451,8 +450,7 @@ static inline void gen_cc_V_add(TCGv dst, TCGv src1, TCGv src2) | ||
| 451 | r_temp = tcg_temp_new(TCG_TYPE_TL); | 450 | r_temp = tcg_temp_new(TCG_TYPE_TL); |
| 452 | r_temp2 = tcg_temp_new(TCG_TYPE_TL); | 451 | r_temp2 = tcg_temp_new(TCG_TYPE_TL); |
| 453 | r_temp3 = tcg_temp_new(TCG_TYPE_TL); | 452 | r_temp3 = tcg_temp_new(TCG_TYPE_TL); |
| 454 | - r_zero = tcg_temp_new(TCG_TYPE_TL); | ||
| 455 | - tcg_gen_movi_tl(r_zero, 0); | 453 | + r_zero = tcg_const_tl(0); |
| 456 | tcg_gen_xor_tl(r_temp, src1, src2); | 454 | tcg_gen_xor_tl(r_temp, src1, src2); |
| 457 | tcg_gen_xori_tl(r_temp, r_temp, -1); | 455 | tcg_gen_xori_tl(r_temp, r_temp, -1); |
| 458 | tcg_gen_xor_tl(r_temp2, src1, dst); | 456 | tcg_gen_xor_tl(r_temp2, src1, dst); |
| @@ -466,7 +464,6 @@ static inline void gen_cc_V_add(TCGv dst, TCGv src1, TCGv src2) | @@ -466,7 +464,6 @@ static inline void gen_cc_V_add(TCGv dst, TCGv src1, TCGv src2) | ||
| 466 | int l2; | 464 | int l2; |
| 467 | 465 | ||
| 468 | l2 = gen_new_label(); | 466 | l2 = gen_new_label(); |
| 469 | - tcg_gen_movi_tl(r_zero, 0); | ||
| 470 | tcg_gen_xor_tl(r_temp, src1, src2); | 467 | tcg_gen_xor_tl(r_temp, src1, src2); |
| 471 | tcg_gen_xori_tl(r_temp, r_temp, -1); | 468 | tcg_gen_xori_tl(r_temp, r_temp, -1); |
| 472 | tcg_gen_xor_tl(r_temp2, src1, dst); | 469 | tcg_gen_xor_tl(r_temp2, src1, dst); |
| @@ -489,8 +486,7 @@ static inline void gen_add_tv(TCGv dst, TCGv src1, TCGv src2) | @@ -489,8 +486,7 @@ static inline void gen_add_tv(TCGv dst, TCGv src1, TCGv src2) | ||
| 489 | r_temp = tcg_temp_new(TCG_TYPE_TL); | 486 | r_temp = tcg_temp_new(TCG_TYPE_TL); |
| 490 | r_temp2 = tcg_temp_new(TCG_TYPE_TL); | 487 | r_temp2 = tcg_temp_new(TCG_TYPE_TL); |
| 491 | r_temp3 = tcg_temp_new(TCG_TYPE_TL); | 488 | r_temp3 = tcg_temp_new(TCG_TYPE_TL); |
| 492 | - r_zero = tcg_temp_new(TCG_TYPE_TL); | ||
| 493 | - tcg_gen_movi_tl(r_zero, 0); | 489 | + r_zero = tcg_const_tl(0); |
| 494 | tcg_gen_xor_tl(r_temp, src1, src2); | 490 | tcg_gen_xor_tl(r_temp, src1, src2); |
| 495 | tcg_gen_xori_tl(r_temp, r_temp, -1); | 491 | tcg_gen_xori_tl(r_temp, r_temp, -1); |
| 496 | tcg_gen_xor_tl(r_temp2, src1, dst); | 492 | tcg_gen_xor_tl(r_temp2, src1, dst); |
| @@ -504,7 +500,6 @@ static inline void gen_add_tv(TCGv dst, TCGv src1, TCGv src2) | @@ -504,7 +500,6 @@ static inline void gen_add_tv(TCGv dst, TCGv src1, TCGv src2) | ||
| 504 | int l2; | 500 | int l2; |
| 505 | 501 | ||
| 506 | l2 = gen_new_label(); | 502 | l2 = gen_new_label(); |
| 507 | - tcg_gen_movi_tl(r_zero, 0); | ||
| 508 | tcg_gen_xor_tl(r_temp, src1, src2); | 503 | tcg_gen_xor_tl(r_temp, src1, src2); |
| 509 | tcg_gen_xori_tl(r_temp, r_temp, -1); | 504 | tcg_gen_xori_tl(r_temp, r_temp, -1); |
| 510 | tcg_gen_xor_tl(r_temp2, src1, dst); | 505 | tcg_gen_xor_tl(r_temp2, src1, dst); |
| @@ -523,9 +518,8 @@ static inline void gen_cc_V_tag(TCGv src1, TCGv src2) | @@ -523,9 +518,8 @@ static inline void gen_cc_V_tag(TCGv src1, TCGv src2) | ||
| 523 | TCGv r_zero, r_temp; | 518 | TCGv r_zero, r_temp; |
| 524 | 519 | ||
| 525 | l1 = gen_new_label(); | 520 | l1 = gen_new_label(); |
| 526 | - r_zero = tcg_temp_new(TCG_TYPE_TL); | 521 | + r_zero = tcg_const_tl(0); |
| 527 | r_temp = tcg_temp_new(TCG_TYPE_TL); | 522 | r_temp = tcg_temp_new(TCG_TYPE_TL); |
| 528 | - tcg_gen_movi_tl(r_zero, 0); | ||
| 529 | tcg_gen_or_tl(r_temp, src1, src2); | 523 | tcg_gen_or_tl(r_temp, src1, src2); |
| 530 | tcg_gen_andi_tl(r_temp, r_temp, 0x3); | 524 | tcg_gen_andi_tl(r_temp, r_temp, 0x3); |
| 531 | tcg_gen_brcond_tl(TCG_COND_EQ, r_temp, r_zero, l1); | 525 | tcg_gen_brcond_tl(TCG_COND_EQ, r_temp, r_zero, l1); |
| @@ -539,9 +533,8 @@ static inline void gen_tag_tv(TCGv src1, TCGv src2) | @@ -539,9 +533,8 @@ static inline void gen_tag_tv(TCGv src1, TCGv src2) | ||
| 539 | TCGv r_zero, r_temp; | 533 | TCGv r_zero, r_temp; |
| 540 | 534 | ||
| 541 | l1 = gen_new_label(); | 535 | l1 = gen_new_label(); |
| 542 | - r_zero = tcg_temp_new(TCG_TYPE_TL); | 536 | + r_zero = tcg_const_tl(0); |
| 543 | r_temp = tcg_temp_new(TCG_TYPE_TL); | 537 | r_temp = tcg_temp_new(TCG_TYPE_TL); |
| 544 | - tcg_gen_movi_tl(r_zero, 0); | ||
| 545 | tcg_gen_or_tl(r_temp, src1, src2); | 538 | tcg_gen_or_tl(r_temp, src1, src2); |
| 546 | tcg_gen_andi_tl(r_temp, r_temp, 0x3); | 539 | tcg_gen_andi_tl(r_temp, r_temp, 0x3); |
| 547 | tcg_gen_brcond_tl(TCG_COND_EQ, r_temp, r_zero, l1); | 540 | tcg_gen_brcond_tl(TCG_COND_EQ, r_temp, r_zero, l1); |
| @@ -632,8 +625,7 @@ static inline void gen_cc_V_sub(TCGv dst, TCGv src1, TCGv src2) | @@ -632,8 +625,7 @@ static inline void gen_cc_V_sub(TCGv dst, TCGv src1, TCGv src2) | ||
| 632 | r_temp = tcg_temp_new(TCG_TYPE_TL); | 625 | r_temp = tcg_temp_new(TCG_TYPE_TL); |
| 633 | r_temp2 = tcg_temp_new(TCG_TYPE_TL); | 626 | r_temp2 = tcg_temp_new(TCG_TYPE_TL); |
| 634 | r_temp3 = tcg_temp_new(TCG_TYPE_TL); | 627 | r_temp3 = tcg_temp_new(TCG_TYPE_TL); |
| 635 | - r_zero = tcg_temp_new(TCG_TYPE_TL); | ||
| 636 | - tcg_gen_movi_tl(r_zero, 0); | 628 | + r_zero = tcg_const_tl(0); |
| 637 | tcg_gen_xor_tl(r_temp, src1, src2); | 629 | tcg_gen_xor_tl(r_temp, src1, src2); |
| 638 | tcg_gen_xor_tl(r_temp2, src1, dst); | 630 | tcg_gen_xor_tl(r_temp2, src1, dst); |
| 639 | tcg_gen_and_tl(r_temp, r_temp, r_temp2); | 631 | tcg_gen_and_tl(r_temp, r_temp, r_temp2); |
| @@ -646,7 +638,6 @@ static inline void gen_cc_V_sub(TCGv dst, TCGv src1, TCGv src2) | @@ -646,7 +638,6 @@ static inline void gen_cc_V_sub(TCGv dst, TCGv src1, TCGv src2) | ||
| 646 | int l2; | 638 | int l2; |
| 647 | 639 | ||
| 648 | l2 = gen_new_label(); | 640 | l2 = gen_new_label(); |
| 649 | - tcg_gen_movi_tl(r_zero, 0); | ||
| 650 | tcg_gen_xor_tl(r_temp, src1, src2); | 641 | tcg_gen_xor_tl(r_temp, src1, src2); |
| 651 | tcg_gen_xor_tl(r_temp2, src1, dst); | 642 | tcg_gen_xor_tl(r_temp2, src1, dst); |
| 652 | tcg_gen_and_tl(r_temp, r_temp, r_temp2); | 643 | tcg_gen_and_tl(r_temp, r_temp, r_temp2); |
| @@ -668,8 +659,7 @@ static inline void gen_sub_tv(TCGv dst, TCGv src1, TCGv src2) | @@ -668,8 +659,7 @@ static inline void gen_sub_tv(TCGv dst, TCGv src1, TCGv src2) | ||
| 668 | r_temp = tcg_temp_new(TCG_TYPE_TL); | 659 | r_temp = tcg_temp_new(TCG_TYPE_TL); |
| 669 | r_temp2 = tcg_temp_new(TCG_TYPE_TL); | 660 | r_temp2 = tcg_temp_new(TCG_TYPE_TL); |
| 670 | r_temp3 = tcg_temp_new(TCG_TYPE_TL); | 661 | r_temp3 = tcg_temp_new(TCG_TYPE_TL); |
| 671 | - r_zero = tcg_temp_new(TCG_TYPE_TL); | ||
| 672 | - tcg_gen_movi_tl(r_zero, 0); | 662 | + r_zero = tcg_const_tl(0); |
| 673 | tcg_gen_xor_tl(r_temp, src1, src2); | 663 | tcg_gen_xor_tl(r_temp, src1, src2); |
| 674 | tcg_gen_xor_tl(r_temp2, src1, dst); | 664 | tcg_gen_xor_tl(r_temp2, src1, dst); |
| 675 | tcg_gen_and_tl(r_temp, r_temp, r_temp2); | 665 | tcg_gen_and_tl(r_temp, r_temp, r_temp2); |
| @@ -682,7 +672,6 @@ static inline void gen_sub_tv(TCGv dst, TCGv src1, TCGv src2) | @@ -682,7 +672,6 @@ static inline void gen_sub_tv(TCGv dst, TCGv src1, TCGv src2) | ||
| 682 | int l2; | 672 | int l2; |
| 683 | 673 | ||
| 684 | l2 = gen_new_label(); | 674 | l2 = gen_new_label(); |
| 685 | - tcg_gen_movi_tl(r_zero, 0); | ||
| 686 | tcg_gen_xor_tl(r_temp, src1, src2); | 675 | tcg_gen_xor_tl(r_temp, src1, src2); |
| 687 | tcg_gen_xor_tl(r_temp2, src1, dst); | 676 | tcg_gen_xor_tl(r_temp2, src1, dst); |
| 688 | tcg_gen_and_tl(r_temp, r_temp, r_temp2); | 677 | tcg_gen_and_tl(r_temp, r_temp, r_temp2); |
| @@ -747,8 +736,7 @@ static inline void gen_op_div_cc(void) | @@ -747,8 +736,7 @@ static inline void gen_op_div_cc(void) | ||
| 747 | gen_cc_clear(); | 736 | gen_cc_clear(); |
| 748 | gen_cc_NZ(cpu_T[0]); | 737 | gen_cc_NZ(cpu_T[0]); |
| 749 | l1 = gen_new_label(); | 738 | l1 = gen_new_label(); |
| 750 | - r_zero = tcg_temp_new(TCG_TYPE_TL); | ||
| 751 | - tcg_gen_movi_tl(r_zero, 0); | 739 | + r_zero = tcg_const_tl(0); |
| 752 | tcg_gen_brcond_i32(TCG_COND_EQ, cpu_T[1], r_zero, l1); | 740 | tcg_gen_brcond_i32(TCG_COND_EQ, cpu_T[1], r_zero, l1); |
| 753 | tcg_gen_ori_i32(cpu_psr, cpu_psr, PSR_OVF); | 741 | tcg_gen_ori_i32(cpu_psr, cpu_psr, PSR_OVF); |
| 754 | gen_set_label(l1); | 742 | gen_set_label(l1); |
| @@ -1084,8 +1072,7 @@ static inline void gen_branch2(DisasContext *dc, target_ulong pc1, | @@ -1084,8 +1072,7 @@ static inline void gen_branch2(DisasContext *dc, target_ulong pc1, | ||
| 1084 | int l1; | 1072 | int l1; |
| 1085 | 1073 | ||
| 1086 | l1 = gen_new_label(); | 1074 | l1 = gen_new_label(); |
| 1087 | - r_zero = tcg_temp_new(TCG_TYPE_TL); | ||
| 1088 | - tcg_gen_movi_tl(r_zero, 0); | 1075 | + r_zero = tcg_const_tl(0); |
| 1089 | 1076 | ||
| 1090 | tcg_gen_brcond_tl(TCG_COND_EQ, r_cond, r_zero, l1); | 1077 | tcg_gen_brcond_tl(TCG_COND_EQ, r_cond, r_zero, l1); |
| 1091 | 1078 | ||
| @@ -1102,8 +1089,7 @@ static inline void gen_branch_a(DisasContext *dc, target_ulong pc1, | @@ -1102,8 +1089,7 @@ static inline void gen_branch_a(DisasContext *dc, target_ulong pc1, | ||
| 1102 | int l1; | 1089 | int l1; |
| 1103 | 1090 | ||
| 1104 | l1 = gen_new_label(); | 1091 | l1 = gen_new_label(); |
| 1105 | - r_zero = tcg_temp_new(TCG_TYPE_TL); | ||
| 1106 | - tcg_gen_movi_tl(r_zero, 0); | 1092 | + r_zero = tcg_const_tl(0); |
| 1107 | 1093 | ||
| 1108 | tcg_gen_brcond_tl(TCG_COND_EQ, r_cond, r_zero, l1); | 1094 | tcg_gen_brcond_tl(TCG_COND_EQ, r_cond, r_zero, l1); |
| 1109 | 1095 | ||
| @@ -1127,8 +1113,7 @@ static inline void gen_generic_branch(target_ulong npc1, target_ulong npc2, | @@ -1127,8 +1113,7 @@ static inline void gen_generic_branch(target_ulong npc1, target_ulong npc2, | ||
| 1127 | 1113 | ||
| 1128 | l1 = gen_new_label(); | 1114 | l1 = gen_new_label(); |
| 1129 | l2 = gen_new_label(); | 1115 | l2 = gen_new_label(); |
| 1130 | - r_zero = tcg_temp_new(TCG_TYPE_TL); | ||
| 1131 | - tcg_gen_movi_tl(r_zero, 0); | 1116 | + r_zero = tcg_const_tl(0); |
| 1132 | 1117 | ||
| 1133 | tcg_gen_brcond_tl(TCG_COND_EQ, r_cond, r_zero, l1); | 1118 | tcg_gen_brcond_tl(TCG_COND_EQ, r_cond, r_zero, l1); |
| 1134 | 1119 | ||
| @@ -1348,8 +1333,7 @@ static inline void gen_cond_reg(TCGv r_dst, int cond) | @@ -1348,8 +1333,7 @@ static inline void gen_cond_reg(TCGv r_dst, int cond) | ||
| 1348 | int l1; | 1333 | int l1; |
| 1349 | 1334 | ||
| 1350 | l1 = gen_new_label(); | 1335 | l1 = gen_new_label(); |
| 1351 | - r_zero = tcg_temp_new(TCG_TYPE_TL); | ||
| 1352 | - tcg_gen_movi_tl(r_zero, 0); | 1336 | + r_zero = tcg_const_tl(0); |
| 1353 | tcg_gen_mov_tl(r_dst, r_zero); | 1337 | tcg_gen_mov_tl(r_dst, r_zero); |
| 1354 | tcg_gen_brcond_tl(gen_tcg_cond_reg[cond], cpu_T[0], r_zero, l1); | 1338 | tcg_gen_brcond_tl(gen_tcg_cond_reg[cond], cpu_T[0], r_zero, l1); |
| 1355 | tcg_gen_movi_tl(r_dst, 1); | 1339 | tcg_gen_movi_tl(r_dst, 1); |
| @@ -2658,11 +2642,10 @@ static void disas_sparc_insn(DisasContext * dc) | @@ -2658,11 +2642,10 @@ static void disas_sparc_insn(DisasContext * dc) | ||
| 2658 | int l1; | 2642 | int l1; |
| 2659 | 2643 | ||
| 2660 | l1 = gen_new_label(); | 2644 | l1 = gen_new_label(); |
| 2661 | - r_zero = tcg_temp_new(TCG_TYPE_TL); | 2645 | + r_zero = tcg_const_tl(0); |
| 2662 | cond = GET_FIELD_SP(insn, 14, 17); | 2646 | cond = GET_FIELD_SP(insn, 14, 17); |
| 2663 | rs1 = GET_FIELD(insn, 13, 17); | 2647 | rs1 = GET_FIELD(insn, 13, 17); |
| 2664 | gen_movl_reg_T0(rs1); | 2648 | gen_movl_reg_T0(rs1); |
| 2665 | - tcg_gen_movi_tl(r_zero, 0); | ||
| 2666 | tcg_gen_brcond_tl(gen_tcg_cond_reg[cond], cpu_T[0], r_zero, l1); | 2649 | tcg_gen_brcond_tl(gen_tcg_cond_reg[cond], cpu_T[0], r_zero, l1); |
| 2667 | gen_op_load_fpr_FT0(rs2); | 2650 | gen_op_load_fpr_FT0(rs2); |
| 2668 | gen_op_store_FT0_fpr(rd); | 2651 | gen_op_store_FT0_fpr(rd); |
| @@ -2673,11 +2656,10 @@ static void disas_sparc_insn(DisasContext * dc) | @@ -2673,11 +2656,10 @@ static void disas_sparc_insn(DisasContext * dc) | ||
| 2673 | int l1; | 2656 | int l1; |
| 2674 | 2657 | ||
| 2675 | l1 = gen_new_label(); | 2658 | l1 = gen_new_label(); |
| 2676 | - r_zero = tcg_temp_new(TCG_TYPE_TL); | 2659 | + r_zero = tcg_const_tl(0); |
| 2677 | cond = GET_FIELD_SP(insn, 14, 17); | 2660 | cond = GET_FIELD_SP(insn, 14, 17); |
| 2678 | rs1 = GET_FIELD(insn, 13, 17); | 2661 | rs1 = GET_FIELD(insn, 13, 17); |
| 2679 | gen_movl_reg_T0(rs1); | 2662 | gen_movl_reg_T0(rs1); |
| 2680 | - tcg_gen_movi_tl(r_zero, 0); | ||
| 2681 | tcg_gen_brcond_tl(gen_tcg_cond_reg[cond], cpu_T[0], r_zero, l1); | 2663 | tcg_gen_brcond_tl(gen_tcg_cond_reg[cond], cpu_T[0], r_zero, l1); |
| 2682 | gen_op_load_fpr_DT0(DFPREG(rs2)); | 2664 | gen_op_load_fpr_DT0(DFPREG(rs2)); |
| 2683 | gen_op_store_DT0_fpr(DFPREG(rd)); | 2665 | gen_op_store_DT0_fpr(DFPREG(rd)); |
| @@ -2689,11 +2671,10 @@ static void disas_sparc_insn(DisasContext * dc) | @@ -2689,11 +2671,10 @@ static void disas_sparc_insn(DisasContext * dc) | ||
| 2689 | int l1; | 2671 | int l1; |
| 2690 | 2672 | ||
| 2691 | l1 = gen_new_label(); | 2673 | l1 = gen_new_label(); |
| 2692 | - r_zero = tcg_temp_new(TCG_TYPE_TL); | 2674 | + r_zero = tcg_const_tl(0); |
| 2693 | cond = GET_FIELD_SP(insn, 14, 17); | 2675 | cond = GET_FIELD_SP(insn, 14, 17); |
| 2694 | rs1 = GET_FIELD(insn, 13, 17); | 2676 | rs1 = GET_FIELD(insn, 13, 17); |
| 2695 | gen_movl_reg_T0(rs1); | 2677 | gen_movl_reg_T0(rs1); |
| 2696 | - tcg_gen_movi_tl(r_zero, 0); | ||
| 2697 | tcg_gen_brcond_tl(gen_tcg_cond_reg[cond], cpu_T[0], r_zero, l1); | 2678 | tcg_gen_brcond_tl(gen_tcg_cond_reg[cond], cpu_T[0], r_zero, l1); |
| 2698 | gen_op_load_fpr_QT0(QFPREG(rs2)); | 2679 | gen_op_load_fpr_QT0(QFPREG(rs2)); |
| 2699 | gen_op_store_QT0_fpr(QFPREG(rd)); | 2680 | gen_op_store_QT0_fpr(QFPREG(rd)); |
| @@ -2712,9 +2693,8 @@ static void disas_sparc_insn(DisasContext * dc) | @@ -2712,9 +2693,8 @@ static void disas_sparc_insn(DisasContext * dc) | ||
| 2712 | int l1; \ | 2693 | int l1; \ |
| 2713 | \ | 2694 | \ |
| 2714 | l1 = gen_new_label(); \ | 2695 | l1 = gen_new_label(); \ |
| 2715 | - r_zero = tcg_temp_new(TCG_TYPE_TL); \ | 2696 | + r_zero = tcg_const_tl(0); \ |
| 2716 | r_cond = tcg_temp_new(TCG_TYPE_TL); \ | 2697 | r_cond = tcg_temp_new(TCG_TYPE_TL); \ |
| 2717 | - tcg_gen_movi_tl(r_zero, 0); \ | ||
| 2718 | cond = GET_FIELD_SP(insn, 14, 17); \ | 2698 | cond = GET_FIELD_SP(insn, 14, 17); \ |
| 2719 | gen_fcond(r_cond, fcc, cond); \ | 2699 | gen_fcond(r_cond, fcc, cond); \ |
| 2720 | tcg_gen_brcond_tl(TCG_COND_EQ, r_cond, r_zero, l1); \ | 2700 | tcg_gen_brcond_tl(TCG_COND_EQ, r_cond, r_zero, l1); \ |
| @@ -2781,9 +2761,8 @@ static void disas_sparc_insn(DisasContext * dc) | @@ -2781,9 +2761,8 @@ static void disas_sparc_insn(DisasContext * dc) | ||
| 2781 | int l1; \ | 2761 | int l1; \ |
| 2782 | \ | 2762 | \ |
| 2783 | l1 = gen_new_label(); \ | 2763 | l1 = gen_new_label(); \ |
| 2784 | - r_zero = tcg_temp_new(TCG_TYPE_TL); \ | 2764 | + r_zero = tcg_const_tl(0); \ |
| 2785 | r_cond = tcg_temp_new(TCG_TYPE_TL); \ | 2765 | r_cond = tcg_temp_new(TCG_TYPE_TL); \ |
| 2786 | - tcg_gen_movi_tl(r_zero, 0); \ | ||
| 2787 | cond = GET_FIELD_SP(insn, 14, 17); \ | 2766 | cond = GET_FIELD_SP(insn, 14, 17); \ |
| 2788 | gen_cond(r_cond, icc, cond); \ | 2767 | gen_cond(r_cond, icc, cond); \ |
| 2789 | tcg_gen_brcond_tl(TCG_COND_EQ, r_cond, r_zero, l1); \ | 2768 | tcg_gen_brcond_tl(TCG_COND_EQ, r_cond, r_zero, l1); \ |
| @@ -3441,8 +3420,7 @@ static void disas_sparc_insn(DisasContext * dc) | @@ -3441,8 +3420,7 @@ static void disas_sparc_insn(DisasContext * dc) | ||
| 3441 | 3420 | ||
| 3442 | l1 = gen_new_label(); | 3421 | l1 = gen_new_label(); |
| 3443 | 3422 | ||
| 3444 | - r_zero = tcg_temp_new(TCG_TYPE_TL); | ||
| 3445 | - tcg_gen_movi_tl(r_zero, 0); | 3423 | + r_zero = tcg_const_tl(0); |
| 3446 | tcg_gen_brcond_tl(TCG_COND_EQ, cpu_T[2], r_zero, l1); | 3424 | tcg_gen_brcond_tl(TCG_COND_EQ, cpu_T[2], r_zero, l1); |
| 3447 | if (IS_IMM) { /* immediate */ | 3425 | if (IS_IMM) { /* immediate */ |
| 3448 | rs2 = GET_FIELD_SPs(insn, 0, 10); | 3426 | rs2 = GET_FIELD_SPs(insn, 0, 10); |
| @@ -3485,8 +3463,7 @@ static void disas_sparc_insn(DisasContext * dc) | @@ -3485,8 +3463,7 @@ static void disas_sparc_insn(DisasContext * dc) | ||
| 3485 | 3463 | ||
| 3486 | l1 = gen_new_label(); | 3464 | l1 = gen_new_label(); |
| 3487 | 3465 | ||
| 3488 | - r_zero = tcg_temp_new(TCG_TYPE_TL); | ||
| 3489 | - tcg_gen_movi_tl(r_zero, 0); | 3466 | + r_zero = tcg_const_tl(0); |
| 3490 | tcg_gen_brcond_tl(gen_tcg_cond_reg[cond], cpu_T[0], r_zero, l1); | 3467 | tcg_gen_brcond_tl(gen_tcg_cond_reg[cond], cpu_T[0], r_zero, l1); |
| 3491 | if (IS_IMM) { /* immediate */ | 3468 | if (IS_IMM) { /* immediate */ |
| 3492 | rs2 = GET_FIELD_SPs(insn, 0, 9); | 3469 | rs2 = GET_FIELD_SPs(insn, 0, 9); |