[{"id":1759736,"web_url":"http://patchwork.ozlabs.org/comment/1759736/","msgid":"<8d882621-6c0c-9a48-0166-0ac949187e2b@redhat.com>","list_archive_url":null,"date":"2017-08-29T22:11:10","subject":"Re: Turn FUNCTION_ARG_PADDING into a target hook","submitter":{"id":4400,"url":"http://patchwork.ozlabs.org/api/people/4400/","name":"Jeff Law","email":"law@redhat.com"},"content":"On 08/28/2017 04:05 AM, Richard Sandiford wrote:\n> This involved renaming the rather general-sounding \"enum direction\" to\n> \"enum pad_direction\" to avoid a conflict with the Fortran frontend.\n> \n> Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu.\n> Also tested by checking that there were no extra warnings or changes in\n> testsuite assembly output for at least one target per CPU.  OK to install?\n> \n> Richard\n> \n> \n> 2017-08-28  Richard Sandiford  <richard.sandiford@linaro.org>\n> \t    Alan Hayward  <alan.hayward@arm.com>\n> \t    David Sherwood  <david.sherwood@arm.com>\n> \n> gcc/\n> \t* coretypes.h (pad_direction): New enum.\n> \t* defaults.h (DEFAULT_FUNCTION_ARG_PADDING): Delete.\n> \t(FUNCTION_ARG_PADDING): Likewise.\n> \t* target.def (function_arg_padding): New hook.\n> \t* targhooks.h (default_function_arg_padding): Declare.\n> \t* targhooks.c (default_function_arg_padding): New function.\n> \t* doc/tm.texi.in (FUNCTION_ARG_PADDING): Replace with...\n> \t(TARGET_FUNCTION_ARG_PADDING): ...this.\n> \t* doc/tm.texi: Regenerate.\n> \t* calls.c (store_unaligned_arguments_into_pseudos): Use pad_direction\n> \tinstead of direction.\n> \t(compute_argument_addresses): Likewise.\n> \t(load_register_parameters): Likewise.\n> \t(emit_library_call_value_1): Likewise.\n> \t(store_one_arg): Use targetm.calls.function_arg_padding instead\n> \tof FUNCTION_ARG_PADDING.\n> \t(must_pass_in_stack_var_size_or_pad): Likewise.\n> \t* expr.c (emit_group_load_1): Use pad_direction instead of direction.\n> \t(emit_group_store): Likewise.\n> \t(emit_single_push_insn_1): Use targetm.calls.function_arg_padding\n> \tinstead of FUNCTION_ARG_PADDING.\n> \t(emit_push_insn): Likewise, and propagate enum change throughout\n> \tfunction.\n> \t* function.h (direction): Delete.\n> \t(locate_and_pad_arg_data::where_pad): Use pad_direction instead\n> \tof direction.\n> \t* function.c (assign_parm_find_stack_rtl): Likewise.\n> \t(assign_parm_setup_block_p): Likewise.\n> \t(assign_parm_setup_block): Likewise.\n> \t(gimplify_parameters): Likewise.\n> \t(locate_and_pad_parm): Use targetm.calls.function_arg_padding\n> \tinstead of FUNCTION_ARG_PADDING, and propagate enum change throughout\n> \tfunction.\n> \t* config/aarch64/aarch64.h (FUNCTION_ARG_PADDING): Delete.\n> \t(BLOCK_REG_PADDING): Use pad_direction instead of direction.\n> \t* config/aarch64/aarch64-protos.h (aarch64_pad_arg_upward): Delete.\n> \t* config/aarch64/aarch64.c (aarch64_pad_arg_upward): Replace with...\n> \t(aarch64_function_arg_padding): ...this new function.\n> \t(aarch64_gimplify_va_arg_expr): Use pad_direction instead of direction.\n> \t(TARGET_FUNCTION_ARG_PADDING): Redefine.\n> \t* config/arm/arm.h (FUNCTION_ARG_PADDING): Delete.\n> \t(BLOCK_REG_PADDING): Use pad_direction instead of direction.\n> \t* config/arm/arm-protos.h (arm_pad_arg_upward): Delete.\n> \t* config/arm/arm.c (TARGET_FUNCTION_ARG_PADDING): Redefine.\n> \t(arm_pad_arg_upward): Replace with...\n> \t(arm_function_arg_padding): ...this new function.\n> \t* config/c6x/c6x.h (BLOCK_REG_PADDING): Use pad_direction instead\n> \tof direction.\n> \t* config/ia64/hpux.h (FUNCTION_ARG_PADDING): Delete.\n> \t* config/ia64/ia64-protos.h (ia64_hpux_function_arg_padding): Delete.\n> \t* config/ia64/ia64.c (TARGET_FUNCTION_ARG_PADDING): Redefine.\n> \t(ia64_hpux_function_arg_padding): Replace with...\n> \t(ia64_function_arg_padding): ...this new function.  Use pad_direction\n> \tinstead of direction.  Check for TARGET_HPUX.\n> \t* config/iq2000/iq2000.h (FUNCTION_ARG_PADDING): Delete.\n> \t* config/iq2000/iq2000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.\n> \t(iq2000_function_arg_padding): New function.\n> \t* config/mips/mips-protos.h (mips_pad_arg_upward): Delete.\n> \t* config/mips/mips.c (mips_pad_arg_upward): Replace with...\n> \t(mips_function_arg_padding): ...this new function.\n> \t(mips_pad_reg_upward): Update accordingly.\n> \t(TARGET_FUNCTION_ARG_PADDING): Redefine.\n> \t* config/mips/mips.h (PAD_VARARGS_DOWN): Use\n> \ttargetm.calls.function_arg_padding.\n> \t(FUNCTION_ARG_PADDING): Delete.\n> \t(BLOCK_REG_PADDING): Use pad_direction instead of direction.\n> \t* config/nios2/nios2.h (FUNCTION_ARG_PADDING): Delete.\n> \t(PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.\n> \t* config/nios2/nios2-protos.h (nios2_function_arg_padding): Delete.\n> \t(nios2_block_reg_padding): Return pad_direction instead of direction.\n> \t* config/nios2/nios2.c (nios2_block_reg_padding): Return pad_direction\n> \tinstead of direction.\n> \t(nios2_function_arg_padding): Likewise.  Make static.\n> \t(TARGET_FUNCTION_ARG_PADDING): Redefine.\n> \t* config/pa/pa.h (FUNCTION_ARG_PADDING): Delete.\n> \t(BLOCK_REG_PADDING): Use targetm.calls.function_arg_padding.\n> \t* config/pa/pa-protos.h (pa_function_arg_padding): Delete.\n> \t* config/pa/pa.c (TARGET_FUNCTION_ARG_PADDING): Redefine.\n> \t(pa_function_arg_padding): Make static.  Return pad_direction instead\n> \tof direction.\n> \t* config/powerpcspe/powerpcspe.h (FUNCTION_ARG_PADDING): Delete.\n> \t(PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.\n> \t* config/powerpcspe/aix.h (BLOCK_REG_PADDING): Use pad_direction\n> \tinstead of direction.  Use targetm.calls.function_arg_padding.\n> \t* config/powerpcspe/darwin.h (BLOCK_REG_PADDING): Likewise.\n> \t* config/powerpcspe/freebsd64.h (BLOCK_REG_PADDING): Likewise.\n> \t* config/powerpcspe/linux64.h (BLOCK_REG_PADDING): Likewise.\n> \t* config/powerpcspe/powerpcspe-protos.h (function_arg_padding): Delete.\n> \t* config/powerpcspe/powerpcspe.c (TARGET_FUNCTION_ARG_PADDING):\n> \tRedefine.\n> \t(function_arg_padding): Rename to...\n> \t(rs6000_function_arg_padding): ...this.  Make static.  Return\n> \tpad_direction instead of direction.\n> \t(rs6000_return_in_msb): Use rs6000_function_arg_padding.\n> \t* config/rs6000/rs6000.h (FUNCTION_ARG_PADDING): Delete.\n> \t(PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.\n> \t* config/rs6000/aix.h (BLOCK_REG_PADDING): Use pad_direction\n> \tinstead of direction.  Use targetm.calls.function_arg_padding.\n> \t* config/rs6000/darwin.h (BLOCK_REG_PADDING): Likewise.\n> \t* config/rs6000/freebsd64.h (BLOCK_REG_PADDING): Likewise.\n> \t* config/rs6000/linux64.h (BLOCK_REG_PADDING): Likewise.\n> \t* config/rs6000/rs6000-protos.h (function_arg_padding): Delete.\n> \t* config/rs6000/rs6000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.\n> \t(function_arg_padding): Rename to...\n> \t(rs6000_function_arg_padding): ...this.  Make static.  Return\n> \tpad_direction instead of direction.\n> \t(rs6000_return_in_msb): Use rs6000_function_arg_padding.\n> \t* config/s390/s390.h (FUNCTION_ARG_PADDING): Delete.\n> \t* config/s390/s390.c (s390_function_arg_padding): New function.\n> \t(TARGET_FUNCTION_ARG_PADDING): Redefine.\n> \t* config/sparc/sparc.h (FUNCTION_ARG_PADDING): Delete.\n> \t* config/sparc/sparc-protos.h (function_arg_padding): Delete.\n> \t* config/sparc/sparc.c (TARGET_FUNCTION_ARG_PADDING): Redefine.\n> \t(function_arg_padding): Rename to...\n> \t(sparc_function_arg_padding): ...this.  Make static.  Return\n> \tpad_direction instead of direction.\n> \t* config/spu/spu.h (FUNCTION_ARG_PADDING): Delete.\n> \t* config/spu/spu.c (spu_function_arg_padding): New function.\n> \t(TARGET_FUNCTION_ARG_PADDING): Redefine.\n> \t* system.h (FUNCTION_ARG_PADDING): Poison.\n> \n\nOK.\n\njeff","headers":{"Return-Path":"<gcc-patches-return-461128-incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list gcc-patches@gcc.gnu.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-461128-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"b++w/Gsm\"; dkim-atps=neutral","sourceware.org; auth=none","ext-mx10.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx10.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=law@redhat.com"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xhjXH5JNZz9sN5\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 08:11:26 +1000 (AEST)","(qmail 20493 invoked by alias); 29 Aug 2017 22:11:17 -0000","(qmail 20480 invoked by uid 89); 29 Aug 2017 22:11:17 -0000","from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by\n\tsourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tTue, 29 Aug 2017 22:11:15 +0000","from smtp.corp.redhat.com\n\t(int-mx02.intmail.prod.int.phx2.redhat.com\n\t[10.5.11.12])\t(using TLSv1.2 with cipher AECDH-AES256-SHA\n\t(256/256 bits))\t(No client certificate requested)\tby\n\tmx1.redhat.com (Postfix) with ESMTPS id 30BF85D686;\n\tTue, 29 Aug 2017 22:11:14 +0000 (UTC)","from localhost.localdomain (ovpn-112-18.rdu2.redhat.com\n\t[10.10.112.18])\tby smtp.corp.redhat.com (Postfix) with ESMTP\n\tid BB4B918B27; Tue, 29 Aug 2017 22:11:12 +0000 (UTC)"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender\n\t:subject:to:references:from:message-id:date:mime-version\n\t:in-reply-to:content-type:content-transfer-encoding; q=dns; s=\n\tdefault; b=QO3ZTWWea+c/IA7ikn2k/YzdGkLAxz9kJrZ3UVWMUGpqKHkFj8ozw\n\tmZ2gicsF6LZydfSuC9B11mC1ep3gmrWcav1T8BH6YC+vEZJg02AAACZo+IC35y5S\n\tAfhwKf8huX2Z3UaPdtDjgzSx7Zh5O3HNIii6wYSf+o+Sw+w0bA2U+Q=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender\n\t:subject:to:references:from:message-id:date:mime-version\n\t:in-reply-to:content-type:content-transfer-encoding; s=default;\n\tbh=Kujna1fpBEG6gnvrCUvET6G5mbU=; b=b++w/GsmEo47mioPzp3FwA8+kPPt\n\tOBs1FqyGBPjC3H7wr4vPbQxQHpIz1umo88VpsrhOIUn1tgT+PmDkJl17uvuDMGQP\n\tMDe8YBjHuvRCDVJrIlPC2qTWJ30TeIt0d+eh17admFx8cvujH1a06VJtLYXPRQQZ\n\t2XFFSxBlSSEbQi4=","Mailing-List":"contact gcc-patches-help@gcc.gnu.org; run by ezmlm","Precedence":"bulk","List-Id":"<gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>","List-Archive":"<http://gcc.gnu.org/ml/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-help@gcc.gnu.org>","Sender":"gcc-patches-owner@gcc.gnu.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-0.9 required=5.0 tests=BAYES_00,\n\tKAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD,\n\tSPF_HELO_PASS autolearn=no version=3.3.2 spammy=pac","X-HELO":"mx1.redhat.com","DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 30BF85D686","Subject":"Re: Turn FUNCTION_ARG_PADDING into a target hook","To":"gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org","References":"<8760d8t3bi.fsf@linaro.org>","From":"Jeff Law <law@redhat.com>","Message-ID":"<8d882621-6c0c-9a48-0166-0ac949187e2b@redhat.com>","Date":"Tue, 29 Aug 2017 16:11:10 -0600","User-Agent":"Mozilla/5.0 (X11; Linux x86_64;\n\trv:52.0) Gecko/20100101 Thunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<8760d8t3bi.fsf@linaro.org>","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"8bit","X-IsSubscribed":"yes"}}]