1 $DragonFly: src/gnu/usr.bin/cc34/cc_prep/patches/explow.c.patch,v 1.2 2004/06/20 00:10:52 joerg Exp $
3 diff -u ../gcc.orig/explow.c explow.c
4 --- ../gcc.orig/explow.c 2004-06-19 22:27:11.000000000 +0200
5 +++ explow.c 2004-06-20 01:16:04.000000000 +0200
12 + && ! (flag_propolice_protection && x == virtual_stack_vars_rtx))
22 + || (flag_propolice_protection && x == virtual_stack_vars_rtx))
23 x = gen_rtx_PLUS (mode, x, GEN_INT (c));
25 if (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF)
27 if (memory_address_p (mode, oldx))
30 + /* The stack protector keeps the addressing style of a local variable.
31 + LEGITIMIZE_ADDRESS changes the addressing to the machine-dependent
32 + style, so the protector split the frame address to a register using
34 + if (flag_propolice_protection)
36 +#define FRAMEADDR_P(X) (GET_CODE (X) == PLUS \
37 + && XEXP (X, 0) == virtual_stack_vars_rtx \
38 + && GET_CODE (XEXP (X, 1)) == CONST_INT)
40 + if (FRAMEADDR_P (x))
42 + for (y = x; y != 0 && GET_CODE (y) == PLUS; y = XEXP (y, 0))
44 + if (FRAMEADDR_P (XEXP (y, 0)))
45 + XEXP (y, 0) = force_reg (GET_MODE (XEXP (y, 0)), XEXP (y, 0));
46 + if (FRAMEADDR_P (XEXP (y, 1)))
47 + XEXP (y, 1) = force_reg (GET_MODE (XEXP (y, 1)), XEXP (y, 1));
50 /* Perform machine-dependent transformations on X
51 in certain cases. This is not necessary since the code
52 below can handle all possible cases, but machine-dependent