summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroaki Etoh <etoh@cvs.openbsd.org>2003-02-26 09:32:34 +0000
committerHiroaki Etoh <etoh@cvs.openbsd.org>2003-02-26 09:32:34 +0000
commita02e606c364cae0808950075444da23158d8132c (patch)
tree405fa1acb9469add023cf6d8f6a78d45dbfaf04d
parent6ed31fd07d68ad3f47a88bb808331dfea3f5247f (diff)
preserve the addressing using frame pointer at the cse2 phase.
-rw-r--r--gnu/egcs/gcc/cse.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gnu/egcs/gcc/cse.c b/gnu/egcs/gcc/cse.c
index bca7623fed6..f4c98de36b8 100644
--- a/gnu/egcs/gcc/cse.c
+++ b/gnu/egcs/gcc/cse.c
@@ -6044,7 +6044,13 @@ fold_rtx (x, insn)
if (new_const == 0)
break;
-
+#ifndef FRAME_GROWS_DOWNWARD
+ if (flag_propolice_protection
+ && GET_CODE (y) == PLUS
+ && XEXP (y, 0) == frame_pointer_rtx
+ && INTVAL (new_const) <= 0)
+ break;
+#endif
/* If we are associating shift operations, don't let this
produce a shift of the size of the object or larger.
This could occur when we follow a sign-extend by a right