diff options
author | Hiroaki Etoh <etoh@cvs.openbsd.org> | 2003-02-03 09:16:55 +0000 |
---|---|---|
committer | Hiroaki Etoh <etoh@cvs.openbsd.org> | 2003-02-03 09:16:55 +0000 |
commit | 5d3b1bfd057c043494b953dd8ca8990c870f3984 (patch) | |
tree | 62ac456605111f25554451687f1b78c53bb032ce /gnu/egcs/gcc | |
parent | 38f39c9ec4e7c87aadbba858b5778b1766265061 (diff) |
modify simplify_plus_minus not to assign the address of frame pointer plus no constant.
Diffstat (limited to 'gnu/egcs/gcc')
-rw-r--r-- | gnu/egcs/gcc/cse.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gnu/egcs/gcc/cse.c b/gnu/egcs/gcc/cse.c index 8d2b72898ba..bca7623fed6 100644 --- a/gnu/egcs/gcc/cse.c +++ b/gnu/egcs/gcc/cse.c @@ -4702,6 +4702,17 @@ simplify_plus_minus (code, mode, op0, op1) ops[i] = plus_constant (ops[i], fp_offset); } } + /* buf[BUFSIZE]: buf is the first local variable (+ (+ fp -S) S) + or (+ (fp 0) r) ==> ((+ (+fp 1) r) -1) */ + else if (fp_offset != 0) + return 0; +#ifndef FRAME_GROWS_DOWNWARD + /* + * For the case of buf[i], i: REG, buf: (plus fp 0), + */ + else if (fp_offset == 0) + return 0; +#endif break; } } |