Commit 5d794885a2eb55a52214f1a31dada29f0c55862d

Authored by malc
1 parent 7880febd

Fix test for signed div fast path


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4714 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 7 additions and 1 deletions
tcg/ppc/tcg-target.c
@@ -1057,7 +1057,13 @@ static void tcg_out_div2 (TCGContext *s, int uns) @@ -1057,7 +1057,13 @@ static void tcg_out_div2 (TCGContext *s, int uns)
1057 { 1057 {
1058 void *label1_ptr, *label2_ptr; 1058 void *label1_ptr, *label2_ptr;
1059 1059
1060 - tcg_out32 (s, CMPLI | BF (7) | RA (3)); 1060 + if (uns)
  1061 + tcg_out32 (s, CMPLI | BF (7) | RA (3));
  1062 + else {
  1063 + tcg_out32 (s, SRAWI | RS (4) | RA (0) | 31);
  1064 + tcg_out32 (s, CMPL | BF (7) | RA (3) | RB (4));
  1065 + }
  1066 +
1061 label1_ptr = s->code_ptr; 1067 label1_ptr = s->code_ptr;
1062 tcg_out32 (s, BC | BI (7, CR_EQ) | BO_COND_TRUE); 1068 tcg_out32 (s, BC | BI (7, CR_EQ) | BO_COND_TRUE);
1063 1069