This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
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: Tue, 31 May 2005 23:09:41 +0100
- Subject: RFA: fix pr21848 (i686-pc-linux-gnu bootstrap failure)
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.
2005-05-31 J"orn Rennecke <joern.rennecke@st.com>
* 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.389
diff -p -r1.389 calls.c
*** calls.c 9 May 2005 17:52:15 -0000 1.389
--- calls.c 31 May 2005 21:57:17 -0000
*************** emit_library_call_value_1 (int retval, r
*** 3629,3634 ****
--- 3629,3644 ----
stack_usage_map[i] = 1;
NO_DEFER_POP;
+
+ if (flags & ECF_CONST)
+ {
+ rtx use = plus_constant (argblock,
+ argvec[argnum].locate.offset.constant);
+
+ use = gen_rtx_MEM (argvec[argnum].mode, use);
+ use = gen_rtx_USE (VOIDmode, use);
+ call_fusage = gen_rtx_EXPR_LIST (VOIDmode, use, call_fusage);
+ }
}
}