Commit e924c485737c38f6d6e4f3ebd65705733e837356

Authored by malc
1 parent 706b0a15

Fuse EQ and NE handling in tcg_out_brcond2

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4845 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 4 additions and 7 deletions
tcg/ppc/tcg-target.c
... ... @@ -987,14 +987,11 @@ static void tcg_out_brcond2 (TCGContext *s, const TCGArg *args,
987 987  
988 988 switch (cond) {
989 989 case TCG_COND_EQ:
990   - tcg_out_cmp (s, TCG_COND_EQ, args[0], args[2], const_args[2], 6);
991   - tcg_out_cmp (s, TCG_COND_EQ, args[1], args[3], const_args[3], 7);
992   - tcg_out32 (s, CRAND | BT (7, CR_EQ) | BA (6, CR_EQ) | BB (7, CR_EQ));
993   - break;
994 990 case TCG_COND_NE:
995   - tcg_out_cmp (s, TCG_COND_NE, args[0], args[2], const_args[2], 6);
996   - tcg_out_cmp (s, TCG_COND_NE, args[1], args[3], const_args[3], 7);
997   - tcg_out32 (s, CRNAND | BT (7, CR_EQ) | BA (6, CR_EQ) | BB (7, CR_EQ));
  991 + op = (cond == TCG_COND_EQ) ? CRAND : CRNAND;
  992 + tcg_out_cmp (s, cond, args[0], args[2], const_args[2], 6);
  993 + tcg_out_cmp (s, cond, args[1], args[3], const_args[3], 7);
  994 + tcg_out32 (s, op | BT (7, CR_EQ) | BA (6, CR_EQ) | BB (7, CR_EQ));
998 995 break;
999 996 case TCG_COND_LT:
1000 997 case TCG_COND_LE:
... ...