Enable EBX for x86 in 32bits PIC code
Jeff Law
law@redhat.com
Wed Aug 27 21:39:00 GMT 2014
On 08/26/14 15:42, Ilya Enkovich wrote:
> diff --git a/gcc/calls.c b/gcc/calls.c
> index 4285ec1..85dae6b 100644
> --- a/gcc/calls.c
> +++ b/gcc/calls.c
> @@ -1122,6 +1122,14 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED,
> call_expr_arg_iterator iter;
> tree arg;
>
> + if (targetm.calls.implicit_pic_arg (fndecl ? fndecl : fntype))
> + {
> + gcc_assert (pic_offset_table_rtx);
> + args[j].tree_value = make_tree (ptr_type_node,
> + pic_offset_table_rtx);
> + j--;
> + }
> +
> if (struct_value_addr_value)
> {
> args[j].tree_value = struct_value_addr_value;
So why do you need this? Can't this be handled in the call/call_value
expanders or what about attaching the use to CALL_INSN_FUNCTION_USAGE
from inside ix86_expand_call? Basically I'm not seeing the need for
another target hook here. I think that would significantly simply the
patch as well.
Jeff
More information about the Gcc
mailing list