From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20102 invoked by alias); 26 Nov 2016 01:27:47 -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 20080 invoked by uid 89); 26 Nov 2016 01:27:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.3 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:D*pobox.com, HTo:U*sandra, learning 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; Sat, 26 Nov 2016 01:27:36 +0000 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 94EBA528D5; Fri, 25 Nov 2016 20:27:33 -0500 (EST) Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 87C31528D4; Fri, 25 Nov 2016 20:27:33 -0500 (EST) Received: from [192.168.1.4] (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 F266D528D3; Fri, 25 Nov 2016 20:27:32 -0500 (EST) Subject: Re: [PATCH 3/9] Add option -moutline-msabi-xlogues To: Sandra Loosemore , gcc-patches References: <25abd41b-923b-2fea-dfc3-9051af632f44@pobox.com> <20161123051918.22517-3-daniel.santos@pobox.com> <5838CE73.50008@codesourcery.com> From: Daniel Santos Message-ID: Date: Sat, 26 Nov 2016 01:27:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <5838CE73.50008@codesourcery.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pobox-Relay-ID: 813203C2-B377-11E6-9678-B2917B1B28F4-06139138!pb-smtp2.pobox.com X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg02671.txt.bz2 Thank you very much for your review! On 11/25/2016 05:51 PM, Sandra Loosemore wrote: > On 11/22/2016 10:19 PM, Daniel Santos wrote: > >> 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. >> + > > Just as a suggestion (I'm not an i386 maintainer), I'd recommend > spelling the name of this option -mno-inline-msabi-xlogues instead of > -moutline-msabi-xlogues, and making the default -minline-msabi-xlogues. That is certainly more intuitive ("outline" or "out-of-line" vs "inline"). I guess I'm not sure what concept is more important, that it's not inline or that it's using stubs. Probably the former. > >> 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 >> @@ -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 > > By convention, we only list the option form that is not the default.... OK. This is my first time to work on gcc, so still learning all of the conventions. > >> +@opindex moutline-msabi-xlogues > > ...but we should have index entries for both. So basically I got that backwards. :) > >> +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. > > Please use the word "and" in all three locations here, instead of "&". > > -Sandra Now that I think of it, would "System V" be better than just "SysV"? This is very helpful, thanks again. I'm working on a meaningful testsuite, so I suppose I should just submit a v3 with these changes when I'm done with the tests and hopefully I'll have a little more feedback on the back end & assembly as well. Daniel