1 $DragonFly: src/gnu/usr.bin/cc34/cc_prep/patches/explow.c.patch,v 1.3 2004/12/21 13:10:48 joerg Exp $
3 ===================================================================
4 RCS file: /home/joerg/wd/repository/dragonflybsd/src/contrib/gcc-3.4/gcc/explow.c,v
5 retrieving revision 1.1
7 --- explow.c 20 Jun 2004 02:14:49 -0000 1.1
8 +++ explow.c 20 Dec 2004 20:48:09 -0000
15 + && ! (flag_propolice_protection && x == virtual_stack_vars_rtx))
25 + || (flag_propolice_protection && x == virtual_stack_vars_rtx))
26 x = gen_rtx_PLUS (mode, x, GEN_INT (c));
28 if (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF)
30 if (memory_address_p (mode, oldx))
33 + /* The stack protector keeps the addressing style of a local variable.
34 + LEGITIMIZE_ADDRESS changes the addressing to the machine-dependent
35 + style, so the protector split the frame address to a register using
37 + if (flag_propolice_protection)
39 +#define FRAMEADDR_P(X) (GET_CODE (X) == PLUS \
40 + && XEXP (X, 0) == virtual_stack_vars_rtx \
41 + && GET_CODE (XEXP (X, 1)) == CONST_INT)
43 + if (FRAMEADDR_P (x))
45 + for (y = x; y != 0 && GET_CODE (y) == PLUS; y = XEXP (y, 0))
47 + if (FRAMEADDR_P (XEXP (y, 0)))
48 + XEXP (y, 0) = force_reg (GET_MODE (XEXP (y, 0)), XEXP (y, 0));
49 + if (FRAMEADDR_P (XEXP (y, 1)))
50 + XEXP (y, 1) = force_reg (GET_MODE (XEXP (y, 1)), XEXP (y, 1));
53 /* Perform machine-dependent transformations on X
54 in certain cases. This is not necessary since the code
55 below can handle all possible cases, but machine-dependent