From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110069 invoked by alias); 23 Nov 2016 05:16:41 -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 109811 invoked by uid 89); 23 Nov 2016 05:16:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:D*pobox.com, @samp, samp 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; Wed, 23 Nov 2016 05:16:20 +0000 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 46844514B6; Wed, 23 Nov 2016 00:16:19 -0500 (EST) Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 3E703514B5; Wed, 23 Nov 2016 00:16:19 -0500 (EST) Received: from localhost.localdomain (unknown [76.215.41.237]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 8FDE7514AC; Wed, 23 Nov 2016 00:16:17 -0500 (EST) From: Daniel Santos To: gcc-patches Cc: Daniel Santos Subject: [PATCH 3/9] Add option -moutline-msabi-xlogues Date: Wed, 23 Nov 2016 05:16:00 -0000 Message-Id: <20161123051918.22517-3-daniel.santos@pobox.com> In-Reply-To: <25abd41b-923b-2fea-dfc3-9051af632f44@pobox.com> References: <25abd41b-923b-2fea-dfc3-9051af632f44@pobox.com> X-Pobox-Relay-ID: F70BDC78-B13B-11E6-B480-B2917B1B28F4-06139138!pb-smtp2.pobox.com X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg02299.txt.bz2 Adds the option to i386.opt and i386.c and adds documentation to invoke.texi. --- gcc/config/i386/i386.c | 1 + gcc/config/i386/i386.opt | 5 +++++ gcc/doc/invoke.texi | 11 ++++++++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 5ed8fb6..0e1d871 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -4290,6 +4290,7 @@ ix86_target_string (HOST_WIDE_INT isa, int flags, int ix86_flags, { "-mavx256-split-unaligned-load", MASK_AVX256_SPLIT_UNALIGNED_LOAD}, { "-mavx256-split-unaligned-store", MASK_AVX256_SPLIT_UNALIGNED_STORE}, { "-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 9eef558..f556978 100644 --- a/gcc/config/i386/i386.opt +++ b/gcc/config/i386/i386.opt @@ -528,6 +528,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 8e2f466..4706085 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -1188,7 +1188,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 @@ -25004,6 +25004,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 +@itemx -mno-outline-msabi-xlogues +@opindex 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 & epilogues. This option generates prologues & +epilogues that instead call stubs in libgcc to perform these saves & restores, +thus reducing function size at the cost of a few extra instructions. + @item -mtls-dialect=@var{type} @opindex mtls-dialect Generate code to access thread-local storage using the @samp{gnu} or -- 2.9.0