summaryrefslogtreecommitdiff
path: root/gnu/egcs/gcc
diff options
context:
space:
mode:
authorHiroaki Etoh <etoh@cvs.openbsd.org>2003-02-21 08:10:10 +0000
committerHiroaki Etoh <etoh@cvs.openbsd.org>2003-02-21 08:10:10 +0000
commit73aadc7025b53bf36c4fbe643fdba5081a7cc238 (patch)
tree1ad7c05af710f1daa3f2ae8b8f7396ea5754768e /gnu/egcs/gcc
parentd7fcc6b574b330ca8514e65996774f8452aca8d4 (diff)
sweep_string_in_operand: properly sweep inline function frame.
Diffstat (limited to 'gnu/egcs/gcc')
-rw-r--r--gnu/egcs/gcc/protector.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gnu/egcs/gcc/protector.c b/gnu/egcs/gcc/protector.c
index 73feb35cb1b..8cbf25bda8d 100644
--- a/gnu/egcs/gcc/protector.c
+++ b/gnu/egcs/gcc/protector.c
@@ -1298,7 +1298,7 @@ sweep_string_in_operand (insn, loc, sweep_offset, sweep_size)
{
register rtx x = *loc;
register enum rtx_code code;
- int i, j;
+ int i, j, k = 0;
HOST_WIDE_INT offset;
const char *fmt;
@@ -1355,10 +1355,11 @@ sweep_string_in_operand (insn, loc, sweep_offset, sweep_size)
if (x->used) goto single_use_of_virtual_reg;
offset = AUTO_OFFSET(x);
+ if (RTX_INTEGRATED_P (x)) k = -1; /* for inline base ptr */
/* the operand related to the sweep variable */
- if (sweep_offset <= offset
- && offset < sweep_offset + sweep_size)
+ if (sweep_offset <= offset + k
+ && offset + k < sweep_offset + sweep_size)
{
offset += sweep_frame_offset - sweep_size - sweep_offset;
@@ -1366,8 +1367,8 @@ sweep_string_in_operand (insn, loc, sweep_offset, sweep_size)
XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset);
x->used = 1;
}
- else if (sweep_offset <= offset
- && offset < sweep_frame_offset)
+ else if (sweep_offset <= offset + k
+ && offset + k < sweep_frame_offset)
{ /* the rest of variables under sweep_frame_offset, so shift the location */
XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset - sweep_size);
x->used = 1;