This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: fix pr21848 (i686-pc-linux-gnu bootstrap failure)
- From: Joern RENNECKE <joern dot rennecke at st dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 18 Jul 2005 15:23:59 +0100
- Subject: Re: RFA: fix pr21848 (i686-pc-linux-gnu bootstrap failure)
- References: <429CE0A5.6040706@st.com>
Joern Rennecke wrote:
The documentation implies (although it doesn't actually spell it out)
that we should have a valid
CALL_INSN_FUNCTION_USAGE field for ECF_CONST functions that read
parameters on the stack.
This patch fixes emit_library_call_value_1 to actually adhere to this
- we already have code in
expand_call to do this for user-defined ECF_CONST functions.
So far the only test that I have made is that the rtl and assembler
looks plausible.
I'm bootstrapping this now on i686-pclinux-gnu, but I won't be able to
see the results before tomorrow,
so if this is approved contingent on sucessful bootstrap / regtest, we
can get i686-pc-linux-gnu faster
back to bootstrapple status if someone in another timezone tests this
patch and checks it in.
recent i686-pc-linux-gnu regtesting found some regressions; with
PUSH_ARGS, argblock is zero, so we
have use another way to construct the address then. Successfully
bootstrapped/build and regression tested
on i686-pc-linux-gnu native and i686-pc-linux-gnu X sh-elf in the
sh-elf-4_1-branch.
2004-07-15 J"orn Rennecke <joern.rennecke@superh.com>
PR rtl-optimization/21848
* calls.c (emit_library_call_value_1): For const functions, add
USEs of the stack slots to CALL_INSN_FUNCTION_USAGE.
Index: calls.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/calls.c,v
retrieving revision 1.385.2.1
diff -p -r1.385.2.1 calls.c
*** calls.c 6 Jul 2005 21:33:58 -0000 1.385.2.1
--- calls.c 18 Jul 2005 13:58:27 -0000
*************** emit_library_call_value_1 (int retval, r
*** 3631,3636 ****
--- 3631,3658 ----
stack_usage_map[i] = 1;
NO_DEFER_POP;
+
+ if (flags & ECF_CONST)
+ {
+ rtx use;
+
+ /* Indicate argument access so that alias.c knows that these
+ values are live. */
+ if (argblock)
+ use = plus_constant (argblock,
+ argvec[argnum].locate.offset.constant);
+ else
+ /* When arguemnts are pushed, trying to tell alias.c where
+ exactly this argument is won't work, because the
+ auto-increment causes confusion. So we merely indicate
+ that we access something with a known mode somewhere on
+ the stack. */
+ use = gen_rtx_PLUS (Pmode, virtual_outgoing_args_rtx,
+ gen_rtx_SCRATCH (Pmode));
+ use = gen_rtx_MEM (argvec[argnum].mode, use);
+ use = gen_rtx_USE (VOIDmode, use);
+ call_fusage = gen_rtx_EXPR_LIST (VOIDmode, use, call_fusage);
+ }
}
}