re PR middle-end/17835 (stage2 compiler is broken because it is built with -fomit...
authorEric Botcazou <ebotcazou@libertysurf.fr>
Thu, 7 Oct 2004 05:56:51 +0000 (07:56 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 7 Oct 2004 05:56:51 +0000 (05:56 +0000)
PR middle-end/17835
* expmed.c (expand_sdiv_pow2): Force a stack adjustment
before tentatively building the conditional move sequence.

From-SVN: r88661

gcc/ChangeLog
gcc/expmed.c

index 7f361f9ade1128ba7ec88ac0d36e021de98cd22a..e43edb9646b5e7ee798cdb08ad68f08a5278ddaf 100644 (file)
@@ -1,3 +1,9 @@
+2004-10-07  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       PR middle-end/17285
+       * expmed.c (expand_sdiv_pow2): Force a stack adjustment
+       before tentatively building the conditional move sequence.
+
 2004-10-07  Richard Sandiford  <rsandifo@redhat.com>
 
        PR target/16815
index 232381f2c5ab2210f8ab685d89430a50ff8f2be7..98981b8f24739e9c4cd4a801b2b1ce349bdcd653 100644 (file)
@@ -3305,6 +3305,11 @@ expand_sdiv_pow2 (enum machine_mode mode, rtx op0, HOST_WIDE_INT d)
     {
       rtx temp2;
 
+      /* ??? emit_conditional_move forces a stack adjustment via
+        compare_from_rtx so, if the sequence is discarded, it will
+        be lost.  Do it now instead.  */
+      do_pending_stack_adjust ();
+
       start_sequence ();
       temp2 = copy_to_mode_reg (mode, op0);
       temp = expand_binop (mode, add_optab, temp2, GEN_INT (d-1),