Commit 44696296d5c2ffccef9d43d37d4f525bba7d9f5c

Authored by edgar_igl
1 parent 81d70875

CRIS: Plug more temp leaks.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5560 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 5 additions and 5 deletions
target-cris/translate.c
@@ -231,10 +231,9 @@ static void t_gen_lsl(TCGv d, TCGv a, TCGv b) @@ -231,10 +231,9 @@ static void t_gen_lsl(TCGv d, TCGv a, TCGv b)
231 TCGv t0, t_31; 231 TCGv t0, t_31;
232 232
233 t0 = tcg_temp_new(TCG_TYPE_TL); 233 t0 = tcg_temp_new(TCG_TYPE_TL);
234 - t_31 = tcg_temp_new(TCG_TYPE_TL); 234 + t_31 = tcg_const_tl(31);
235 tcg_gen_shl_tl(d, a, b); 235 tcg_gen_shl_tl(d, a, b);
236 236
237 - tcg_gen_movi_tl(t_31, 31);  
238 tcg_gen_sub_tl(t0, t_31, b); 237 tcg_gen_sub_tl(t0, t_31, b);
239 tcg_gen_sar_tl(t0, t0, t_31); 238 tcg_gen_sar_tl(t0, t0, t_31);
240 tcg_gen_and_tl(t0, t0, d); 239 tcg_gen_and_tl(t0, t0, d);
@@ -929,15 +928,16 @@ static void cris_alu(DisasContext *dc, int op, @@ -929,15 +928,16 @@ static void cris_alu(DisasContext *dc, int op,
929 928
930 if (op == CC_OP_BOUND || op == CC_OP_BTST) 929 if (op == CC_OP_BOUND || op == CC_OP_BTST)
931 tmp = tcg_temp_local_new(TCG_TYPE_TL); 930 tmp = tcg_temp_local_new(TCG_TYPE_TL);
932 - else  
933 - tmp = tcg_temp_new(TCG_TYPE_TL);  
934 931
935 if (op == CC_OP_CMP) { 932 if (op == CC_OP_CMP) {
  933 + tmp = tcg_temp_new(TCG_TYPE_TL);
936 writeback = 0; 934 writeback = 0;
937 } else if (size == 4) { 935 } else if (size == 4) {
938 tmp = d; 936 tmp = d;
939 writeback = 0; 937 writeback = 0;
940 - } 938 + } else
  939 + tmp = tcg_temp_new(TCG_TYPE_TL);
  940 +
941 941
942 cris_pre_alu_update_cc(dc, op, op_a, op_b, size); 942 cris_pre_alu_update_cc(dc, op, op_a, op_b, size);
943 cris_alu_op_exec(dc, op, tmp, op_a, op_b, size); 943 cris_alu_op_exec(dc, op, tmp, op_a, op_b, size);