summaryrefslogtreecommitdiff
path: root/gnu/egcs
diff options
context:
space:
mode:
authorHiroaki Etoh <etoh@cvs.openbsd.org>2003-02-21 07:59:52 +0000
committerHiroaki Etoh <etoh@cvs.openbsd.org>2003-02-21 07:59:52 +0000
commita3a0bd857d93c9f4892eb526159de8c3f511c932 (patch)
tree86389d7c28c73918a1d024771ee75c10f57e2c3c /gnu/egcs
parent0b34d81e8809f56895a611a1fffc01b78c367353 (diff)
In the case of no optimization, fix the problem that the first argument doesn't copy to the region of local variables.
Diffstat (limited to 'gnu/egcs')
-rw-r--r--gnu/egcs/gcc/protector.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/gnu/egcs/gcc/protector.c b/gnu/egcs/gcc/protector.c
index e867f7faf3a..73feb35cb1b 100644
--- a/gnu/egcs/gcc/protector.c
+++ b/gnu/egcs/gcc/protector.c
@@ -1493,7 +1493,29 @@ change_arg_use_in_operand (x, orig, new, size)
case REG:
case ADDRESSOF:
return;
-
+
+ case MEM:
+ /* Handle special case of MEM (incoming_args) */
+ if (GET_CODE (orig) == MEM
+ && XEXP (x, 0) == virtual_incoming_args_rtx)
+ {
+ offset = 0;
+
+ /* the operand related to the sweep variable */
+ if (AUTO_OFFSET(XEXP (orig, 0)) <= offset &&
+ offset < AUTO_OFFSET(XEXP (orig, 0)) + size) {
+
+ offset = AUTO_OFFSET(XEXP (new, 0))
+ + (offset - AUTO_OFFSET(XEXP (orig, 0)));
+
+ XEXP (x, 0) = plus_constant (virtual_stack_vars_rtx, offset);
+ XEXP (x, 0)->used = 1;
+
+ return;
+ }
+ }
+ break;
+
case PLUS:
/* Handle special case of frame register plus constant. */
if (GET_CODE (orig) == MEM /* skip if orig is register variable in the optimization */