From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17146 invoked by alias); 7 Feb 2017 18:36:51 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 17128 invoked by uid 89); 7 Feb 2017 18:36:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=H*f:sk:2fd14fe, H*MI:sk:2fd14fe, H*i:sk:2fd14fe X-HELO: sasl.smtp.pobox.com Received: from pb-smtp2.pobox.com (HELO sasl.smtp.pobox.com) (64.147.108.71) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 07 Feb 2017 18:36:40 +0000 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 8C832675AD; Tue, 7 Feb 2017 13:36:38 -0500 (EST) Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 8476F675AC; Tue, 7 Feb 2017 13:36:38 -0500 (EST) Received: from localhost.localdomain (unknown [76.215.41.237]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id A3919675A8; Tue, 7 Feb 2017 13:36:36 -0500 (EST) From: Daniel Santos To: gcc-patches , Uros Bizjak , Jan Hubicka Cc: Sandra Loosemore Subject: [PATCH 2/8] [i386] Add option -moutline-msabi-xlogues Date: Tue, 07 Feb 2017 18:36:00 -0000 Message-Id: <20170207184023.19155-2-daniel.santos@pobox.com> In-Reply-To: <2fd14fe7-8d06-45ab-fb1e-96c9c8f4c03b@pobox.com> References: <2fd14fe7-8d06-45ab-fb1e-96c9c8f4c03b@pobox.com> X-Pobox-Relay-ID: 5C1DBE7E-ED64-11E6-839D-A7617B1B28F4-06139138!pb-smtp2.pobox.com X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00549.txt.bz2 Adds the option to i386.opt and i386.c and adds documentation to invoke.texi. Signed-off-by: Daniel Santos --- gcc/config/i386/i386.c | 3 ++- gcc/config/i386/i386.opt | 5 +++++ gcc/doc/invoke.texi | 11 ++++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 05974208a27..9a0dfdc77ba 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -4361,7 +4361,8 @@ ix86_target_string (HOST_WIDE_INT isa, HOST_WIDE_INT isa2, { "-mstv", MASK_STV }, { "-mavx256-split-unaligned-load", MASK_AVX256_SPLIT_UNALIGNED_LOAD }, { "-mavx256-split-unaligned-store", MASK_AVX256_SPLIT_UNALIGNED_STORE }, - { "-mprefer-avx128", MASK_PREFER_AVX128 } + { "-mprefer-avx128", MASK_PREFER_AVX128 }, + { "-mmoutline-msabi-xlogues", MASK_OUTLINE_MSABI_XLOGUES } }; /* Additional flag options. */ diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt index 0ee31845eba..0ff93f831c0 100644 --- a/gcc/config/i386/i386.opt +++ b/gcc/config/i386/i386.opt @@ -538,6 +538,11 @@ Enum(calling_abi) String(sysv) Value(SYSV_ABI) EnumValue Enum(calling_abi) String(ms) Value(MS_ABI) +moutline-msabi-xlogues +Target Report Mask(OUTLINE_MSABI_XLOGUES) Save +Reduces function size by using out-of-line stubs to save & restore registers +clobberd by differences in Microsoft and System V ABIs. + mveclibabi= Target RejectNegative Joined Var(ix86_veclibabi_type) Enum(ix86_veclibabi) Init(ix86_veclibabi_type_none) Vector library ABI to use. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 4b13aeb7426..901abbf99d6 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -1210,7 +1210,7 @@ See RS/6000 and PowerPC Options. -msse2avx -mfentry -mrecord-mcount -mnop-mcount -m8bit-idiv @gol -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol -malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol --mmitigate-rop -mgeneral-regs-only} +-mmitigate-rop -mgeneral-regs-only -moutline-msabi-xlogues} @emph{x86 Windows Options} @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol @@ -25304,6 +25304,15 @@ You can control this behavior for specific functions by using the function attributes @code{ms_abi} and @code{sysv_abi}. @xref{Function Attributes}. +@item -moutline-msabi-xlogues +@opindex moutline-msabi-xlogues +@opindex no-moutline-msabi-xlogues +Due to differences in 64-bit ABIs, any Microsoft ABI function that calls a +SysV ABI function must consider RSI, RDI and XMM6-15 as clobbered, emitting +fairly lengthy prologues and epilogues. This option generates prologues and +epilogues that instead call stubs in libgcc to perform these saves & restores, +thus reducing function size at the cost of and few extra instructions. + @item -mtls-dialect=@var{type} @opindex mtls-dialect Generate code to access thread-local storage using the @samp{gnu} or -- 2.11.0