]> gcc.gnu.org Git - gcc.git/blobdiff - gcc/jump.c
(va_arg): Copy both definitions from gstdarg.h.
[gcc.git] / gcc / jump.c
index f32e57ae2428493258936274994853216149bc01..5ed2828d531c8765bfd9360d1e7e402a01c91bb9 100644 (file)
@@ -621,6 +621,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
                    != XEXP (XVECEXP (pat, diff_vec_p, 0), 0))
                  break;
              if (i == len
+                 && dispatch != 0
                  && GET_CODE (dispatch) == JUMP_INSN
                  && JUMP_LABEL (dispatch) != 0
                  /* Don't mess with a casesi insn.  */
@@ -836,6 +837,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
              && this_is_condjump && ! this_is_simplejump
              && BRANCH_COST >= 3
              && (temp = next_nonnote_insn (insn)) != 0
+             && GET_CODE (temp) == INSN
              && REG_NOTES (temp) == 0
              && (reallabelprev == temp
                  || ((temp2 = next_active_insn (temp)) != 0
@@ -873,8 +875,10 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
              && this_is_condjump && ! this_is_simplejump
              && BRANCH_COST >= 4
              && (temp = next_nonnote_insn (insn)) != 0
+             && GET_CODE (temp) == INSN
              && REG_NOTES (temp) == 0
              && (temp3 = next_nonnote_insn (temp)) != 0
+             && GET_CODE (temp3) == INSN
              && REG_NOTES (temp3) == 0
              && (reallabelprev == temp3
                  || ((temp2 = next_active_insn (temp3)) != 0
@@ -919,8 +923,10 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
              && this_is_condjump && ! this_is_simplejump
              && BRANCH_COST >= 4
              && (temp = next_nonnote_insn (insn)) != 0
+             && GET_CODE (temp) == INSN
              && REG_NOTES (temp) == 0
              && (temp3 = next_nonnote_insn (temp)) != 0
+             && GET_CODE (temp3) == INSN
              && REG_NOTES (temp3) == 0
              && (reallabelprev == temp3
                  || ((temp2 = next_active_insn (temp3)) != 0
@@ -1018,6 +1024,10 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
                      && simplejump_p (temp4)
                      && JUMP_LABEL (temp4) == JUMP_LABEL (insn)))
              && (temp4 = get_condition (insn, &temp5)) != 0
+             /* We must be comparing objects whose modes imply the size.
+                We could handle BLKmode if (1) emit_store_flag could
+                and (2) we could find the size reliably.  */
+             && GET_MODE (XEXP (temp4, 0)) != BLKmode
 
              /* If B is zero, OK; if A is zero, can only do (1) if we
                 can reverse the condition.  See if (3) applies possibly
@@ -1122,7 +1132,9 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
                        {
                          tem2 = expand_unop (GET_MODE (var), one_cmpl_optab,
                                              target, NULL_RTX, 0);
-                         tem2 = expand_and (cval, tem2, tem2);
+                         tem2 = expand_and (cval, tem2,
+                                            (GET_CODE (tem2) == REG
+                                             ? tem2 : 0));
                        }
 
                      /* If we usually make new pseudos, do so here.  This
@@ -1197,6 +1209,10 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
                      && simplejump_p (temp3)
                      && JUMP_LABEL (temp3) == JUMP_LABEL (insn)))
              && (temp3 = get_condition (insn, &temp4)) != 0
+             /* We must be comparing objects whose modes imply the size.
+                We could handle BLKmode if (1) emit_store_flag could
+                and (2) we could find the size reliably.  */
+             && GET_MODE (XEXP (temp3, 0)) != BLKmode
              && can_reverse_comparison_p (temp3, insn))
            {
              rtx temp6, target = 0, seq, init_insn = 0, init = temp2;
@@ -2978,8 +2994,13 @@ mark_jump_label (x, insn, cross_jump)
                    || ! (GET_CODE (next) == JUMP_INSN
                          && (GET_CODE (PATTERN (next)) == ADDR_VEC
                              || GET_CODE (PATTERN (next)) == ADDR_DIFF_VEC)))
-                 REG_NOTES (insn) = gen_rtx (EXPR_LIST, REG_LABEL, label,
-                                             REG_NOTES (insn));
+                 {
+                   REG_NOTES (insn) = gen_rtx (EXPR_LIST, REG_LABEL, label,
+                                               REG_NOTES (insn));
+                   /* Record in the note whether label is nonlocal.  */
+                   LABEL_REF_NONLOCAL_P (REG_NOTES (insn))
+                     = LABEL_REF_NONLOCAL_P (x);
+                 }
              }
          }
        return;
This page took 0.036725 seconds and 5 git commands to generate.