Merge branch 'vendor/TCPDUMP' (early part)
[dragonfly.git] / gnu / usr.bin / cc34 / cc_prep / patches / cse.c.patch
1 $DragonFly: src/gnu/usr.bin/cc34/cc_prep/patches/cse.c.patch,v 1.3 2004/12/21 13:10:48 joerg Exp $
2
3 ===================================================================
4 RCS file: /home/joerg/wd/repository/dragonflybsd/src/contrib/gcc-3.4/gcc/cse.c,v
5 retrieving revision 1.2
6 diff -u -r1.2 cse.c
7 --- cse.c       20 Dec 2004 19:23:23 -0000      1.2
8 +++ cse.c       20 Dec 2004 20:48:09 -0000
9 @@ -4212,7 +4212,14 @@
10  
11               if (new_const == 0)
12                 break;
13 -
14 +#ifndef FRAME_GROWS_DOWNWARD
15 +             if (flag_propolice_protection
16 +                 && GET_CODE (y) == PLUS
17 +                 && XEXP (y, 0) == frame_pointer_rtx
18 +                 && INTVAL (inner_const) > 0
19 +                 && INTVAL (new_const) <= 0)
20 +               break;
21 +#endif
22               /* If we are associating shift operations, don't let this
23                  produce a shift of the size of the object or larger.
24                  This could occur when we follow a sign-extend by a right
25 @@ -4744,6 +4751,14 @@
26        if (SET_DEST (x) == pc_rtx
27           && GET_CODE (SET_SRC (x)) == LABEL_REF)
28         ;
29 +      /* cut the reg propagation of stack-protected argument.  */
30 +      else if (SET_VOLATILE_P (x)) {
31 +       rtx x1 = SET_DEST (x);
32 +       if (GET_CODE (x1) == SUBREG && GET_CODE (SUBREG_REG (x1)) == REG)
33 +         x1 = SUBREG_REG (x1);
34 +       if (! REGNO_QTY_VALID_P(REGNO (x1)))
35 +         make_new_qty (REGNO (x1), GET_MODE (x1));
36 +      }
37  
38        /* Don't count call-insns, (set (reg 0) (call ...)), as a set.
39          The hard function value register is used only once, to copy to