diff --git a/target-cris/translate.c b/target-cris/translate.c index e12be4ef117c5f000028f44ef77152766235d0e2..b3d0a19edbe4a1a94e41476397302532971e5d43 100644 --- a/target-cris/translate.c +++ b/target-cris/translate.c @@ -957,7 +957,8 @@ static void gen_tst_cc (DisasContext *dc, TCGv cc, int cond) else if (dc->cc_size == 2) bits = 15; - tcg_gen_shri_tl(cc, cc_result, 31); + tcg_gen_shri_tl(cc, cc_result, bits); + tcg_gen_andi_tl(cc, cc, 1); } else { cris_evaluate_flags(dc);