expr.c (emit_queue): If emitting a SEQUENCE, set QUEUED_INSN to the first insn of...
authorJ"orn Rennecke <amylaar@cygnus.co.uk>
Tue, 7 Jul 1998 13:26:49 +0000 (13:26 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Tue, 7 Jul 1998 13:26:49 +0000 (14:26 +0100)
* expr.c (emit_queue): If emitting a SEQUENCE, set QUEUED_INSN
to the first insn of the sequence.

From-SVN: r20997

gcc/ChangeLog
gcc/expr.c
gcc/expr.h

index 716d74054cb3b95592fee6d9f300db34a9071b47..04cd1d8dd65c6313a82203acff4bd480ea862571 100644 (file)
@@ -1,3 +1,8 @@
+Tue Jul  7 21:23:36 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
+
+       * expr.c (emit_queue): If emitting a SEQUENCE, set QUEUED_INSN
+       to the first insn of the sequence.
+
 Tue Jul  7 21:05:25 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
 
        * cse (cse_insn): Don't make change without validation.
index a7abc5ab8323c7211577c457463c0d321cd6c318..b9c0e1812443daf54421d3d35a2c53eab2975b02 100644 (file)
@@ -522,7 +522,15 @@ emit_queue ()
   register rtx p;
   while ((p = pending_chain))
     {
-      QUEUED_INSN (p) = emit_insn (QUEUED_BODY (p));
+      rtx body = QUEUED_BODY (p);
+
+      if (GET_CODE (body) == SEQUENCE)
+       {
+         QUEUED_INSN (p) = XVECEXP (QUEUED_BODY (p), 0, 0);
+         emit_insn (QUEUED_BODY (p));
+       }
+      else
+       QUEUED_INSN (p) = emit_insn (QUEUED_BODY (p));
       pending_chain = QUEUED_NEXT (p);
     }
 }
index 02d75bbf98e36ca923029e2c687217690a230831..a53a036a15a34bad0f9da66d86ca46c5aae86a0a 100644 (file)
@@ -30,7 +30,8 @@ Boston, MA 02111-1307, USA.  */
 /* The variable for which an increment is queued.  */
 #define QUEUED_VAR(P) XEXP (P, 0)
 /* If the increment has been emitted, this is the insn
-   that does the increment.  It is zero before the increment is emitted.  */
+   that does the increment.  It is zero before the increment is emitted.
+   If more than one insn is emitted, this is the first insn.  */
 #define QUEUED_INSN(P) XEXP (P, 1)
 /* If a pre-increment copy has been generated, this is the copy
    (it is a temporary reg).  Zero if no copy made yet.  */