summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroaki Etoh <etoh@cvs.openbsd.org>2003-06-20 08:42:13 +0000
committerHiroaki Etoh <etoh@cvs.openbsd.org>2003-06-20 08:42:13 +0000
commit07881a9c9946c91d6040bc5dd9d76ab85383232e (patch)
treededb06e1b8b69fc0011311d96c9a3a085707a924
parentcb65c3b808a4ef1a09b2a82c29812e12d1e04f26 (diff)
To keep the frame pointer addressing for stack_protection,
skip the canonicalization; (minus A (plus B C)) to (minus (minus A B) C) where B is frame pointer and C is frame offset. ok pvalchev@
-rw-r--r--gnu/egcs/gcc/combine.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gnu/egcs/gcc/combine.c b/gnu/egcs/gcc/combine.c
index 14ba11093a6..555604c3631 100644
--- a/gnu/egcs/gcc/combine.c
+++ b/gnu/egcs/gcc/combine.c
@@ -4060,7 +4060,10 @@ simplify_rtx (x, op0_mode, last, in_dest)
/* Canonicalize (minus A (plus B C)) to (minus (minus A B) C) for
integers. */
- if (GET_CODE (XEXP (x, 1)) == PLUS && INTEGRAL_MODE_P (mode))
+ if (GET_CODE (XEXP (x, 1)) == PLUS && INTEGRAL_MODE_P (mode)
+ && (! (flag_propolice_protection
+ && XEXP (XEXP (x, 1), 0) == frame_pointer_rtx
+ && GET_CODE (XEXP (XEXP (x, 1), 1)) == CONST_INT)))
return gen_binary (MINUS, mode,
gen_binary (MINUS, mode, XEXP (x, 0),
XEXP (XEXP (x, 1), 0)),