diff mbox

Fwd: [PATCH, doc/ARM] Remove false affirmation that Thumb cannot use an FPU

Message ID 513df5b0-afba-bd3c-b2bb-ef7d67e1023b@foss.arm.com
State New
Headers show

Commit Message

Thomas Preudhomme Aug. 11, 2016, 10:31 a.m. UTC
Hi Sandra,

Thanks for your feedback. Please find an updated version attached to this email. 
ChangeLog entry is unchanged:

*** gcc/ChangeLog ***

2016-08-02  Thomas Preud'homme  <thomas.preudhomme@arm.com>

         * doc/fragments.texi (MULTILIB_EXCEPTIONS): Replace example with
         preventing combination of -mfloat-abi=soft with any -mfpu option.

Best regards,

Thomas

On 11/08/16 04:09, Sandra Loosemore wrote:
> On 08/10/2016 09:51 AM, Thomas Preudhomme wrote:
>
>> diff --git a/gcc/doc/fragments.texi b/gcc/doc/fragments.texi
>> index
>> b6d8541c8ca820fa732363a05221e2cd4d1251c2..a060635c9cee7374d9d187858ac87acdd08860f2
>> 100644
>> --- a/gcc/doc/fragments.texi
>> +++ b/gcc/doc/fragments.texi
>> @@ -117,12 +117,15 @@ specified, there are combinations that should not be
>> built.  In that
>>  case, set @code{MULTILIB_EXCEPTIONS} to be all of the switch exceptions
>>  in shell case syntax that should not be built.
>>
>> -For example the ARM processor cannot execute both hardware floating
>> -point instructions and the reduced size THUMB instructions at the same
>> -time, so there is no need to build libraries with both of these
>> -options enabled.  Therefore @code{MULTILIB_EXCEPTIONS} is set to:
>> +For example on ARM targets @code{-mfloat-abi=soft} requests to use a
>> +softfloat implementation for floating-point operations.  Therefore, it
>
> For example, on ARM targets @option{-mfloat-abi=soft} requests use of software
> floating-point operations.  Therefore, it
>
>> +does not make sense to find both @code{-mfloat-abi=soft} and an
>
> @option here too
>
>> +@code{mfpu} option on the command line so @code{MULTILIB_EXCEPTIONS}
>
> and here @option{-mfpu}
>
>> +could contain the following exception (assuming that @code{-mfloat-abi}
>
> @option
>
>> +comes after in MULTILIB_OPTIONS and given that soft is the default
>
> @code markup on MULTILIB_OPTIONS?
> @samp markup on soft?
>
>> +value):
>>  @smallexample
>> -*mthumb/*mhard-float*
>> +*mfpu=*
>>  @end smallexample
>>
>>  @findex MULTILIB_REQUIRED
>
> -Sandra
>

Comments

Thomas Preudhomme Aug. 17, 2016, 10:50 a.m. UTC | #1
Ping?

Best regards,

Thomas

On 11/08/16 11:31, Thomas Preudhomme wrote:
> Hi Sandra,
>
> Thanks for your feedback. Please find an updated version attached to this email.
> ChangeLog entry is unchanged:
>
> *** gcc/ChangeLog ***
>
> 2016-08-02  Thomas Preud'homme  <thomas.preudhomme@arm.com>
>
>         * doc/fragments.texi (MULTILIB_EXCEPTIONS): Replace example with
>         preventing combination of -mfloat-abi=soft with any -mfpu option.
>
> Best regards,
>
> Thomas
>
> On 11/08/16 04:09, Sandra Loosemore wrote:
>> On 08/10/2016 09:51 AM, Thomas Preudhomme wrote:
>>
>>> diff --git a/gcc/doc/fragments.texi b/gcc/doc/fragments.texi
>>> index
>>> b6d8541c8ca820fa732363a05221e2cd4d1251c2..a060635c9cee7374d9d187858ac87acdd08860f2
>>>
>>> 100644
>>> --- a/gcc/doc/fragments.texi
>>> +++ b/gcc/doc/fragments.texi
>>> @@ -117,12 +117,15 @@ specified, there are combinations that should not be
>>> built.  In that
>>>  case, set @code{MULTILIB_EXCEPTIONS} to be all of the switch exceptions
>>>  in shell case syntax that should not be built.
>>>
>>> -For example the ARM processor cannot execute both hardware floating
>>> -point instructions and the reduced size THUMB instructions at the same
>>> -time, so there is no need to build libraries with both of these
>>> -options enabled.  Therefore @code{MULTILIB_EXCEPTIONS} is set to:
>>> +For example on ARM targets @code{-mfloat-abi=soft} requests to use a
>>> +softfloat implementation for floating-point operations.  Therefore, it
>>
>> For example, on ARM targets @option{-mfloat-abi=soft} requests use of software
>> floating-point operations.  Therefore, it
>>
>>> +does not make sense to find both @code{-mfloat-abi=soft} and an
>>
>> @option here too
>>
>>> +@code{mfpu} option on the command line so @code{MULTILIB_EXCEPTIONS}
>>
>> and here @option{-mfpu}
>>
>>> +could contain the following exception (assuming that @code{-mfloat-abi}
>>
>> @option
>>
>>> +comes after in MULTILIB_OPTIONS and given that soft is the default
>>
>> @code markup on MULTILIB_OPTIONS?
>> @samp markup on soft?
>>
>>> +value):
>>>  @smallexample
>>> -*mthumb/*mhard-float*
>>> +*mfpu=*
>>>  @end smallexample
>>>
>>>  @findex MULTILIB_REQUIRED
>>
>> -Sandra
>>
Sandra Loosemore Aug. 18, 2016, 6 a.m. UTC | #2
On 08/11/2016 04:31 AM, Thomas Preudhomme wrote:

> diff --git a/gcc/doc/fragments.texi b/gcc/doc/fragments.texi
> index b6d8541c8ca820fa732363a05221e2cd4d1251c2..abf4e128671bb4751d21f24bb69625593d3c839e 100644
> --- a/gcc/doc/fragments.texi
> +++ b/gcc/doc/fragments.texi
> @@ -117,12 +117,15 @@ specified, there are combinations that should not be built.  In that
>  case, set @code{MULTILIB_EXCEPTIONS} to be all of the switch exceptions
>  in shell case syntax that should not be built.
>
> -For example the ARM processor cannot execute both hardware floating
> -point instructions and the reduced size THUMB instructions at the same
> -time, so there is no need to build libraries with both of these
> -options enabled.  Therefore @code{MULTILIB_EXCEPTIONS} is set to:
> +For example on ARM targets @option{-mfloat-abi=soft} requests to use a
> +softfloat implementation for floating-point operations.  Therefore, it
> +does not make sense to find both @option{-mfloat-abi=soft} and an
> +@option{mfpu} option on the command line so @code{MULTILIB_EXCEPTIONS}
> +could contain the following exception (assuming that
> +@option{-mfloat-abi} comes after in @code{MULTILIB_OPTIONS} and given
> +that @option{-mfloat-abi=soft} is the default value):
>  @smallexample
> -*mthumb/*mhard-float*
> +*mfpu=*
>  @end smallexample
>
>  @findex MULTILIB_REQUIRED

This version still has a lot of copy-editing issues.  I suggest 
rewriting as:

   For example, on ARM targets @option{-mfloat-abi=soft} requests use of
   software floating-point operations, so it
   does not make sense to build libraries with both
   @option{-mfloat-abi=soft} and an @option{-mfpu} option.
   @code{MULTILIB_EXCEPTIONS} could contain the following exception

but here I get stuck in suggesting a rewrite, because I can't parse this 
part at all to figure out what you're trying to say:

   (assuming that
   @option{-mfloat-abi} comes after in @code{MULTILIB_OPTIONS} and given
   that @option{-mfloat-abi=soft} is the default value):

"comes after in"?  Comes after what?  If the order is important here, 
the documentation should explain why instead of just "assuming" things 
about it.

-Sandra the confused
Richard Earnshaw (lists) Aug. 18, 2016, 10:05 a.m. UTC | #3
On 18/08/16 07:00, Sandra Loosemore wrote:
> On 08/11/2016 04:31 AM, Thomas Preudhomme wrote:
> 
>> diff --git a/gcc/doc/fragments.texi b/gcc/doc/fragments.texi
>> index
>> b6d8541c8ca820fa732363a05221e2cd4d1251c2..abf4e128671bb4751d21f24bb69625593d3c839e
>> 100644
>> --- a/gcc/doc/fragments.texi
>> +++ b/gcc/doc/fragments.texi
>> @@ -117,12 +117,15 @@ specified, there are combinations that should
>> not be built.  In that
>>  case, set @code{MULTILIB_EXCEPTIONS} to be all of the switch exceptions
>>  in shell case syntax that should not be built.
>>
>> -For example the ARM processor cannot execute both hardware floating
>> -point instructions and the reduced size THUMB instructions at the same
>> -time, so there is no need to build libraries with both of these
>> -options enabled.  Therefore @code{MULTILIB_EXCEPTIONS} is set to:
>> +For example on ARM targets @option{-mfloat-abi=soft} requests to use a
>> +softfloat implementation for floating-point operations.  Therefore, it
>> +does not make sense to find both @option{-mfloat-abi=soft} and an
>> +@option{mfpu} option on the command line so @code{MULTILIB_EXCEPTIONS}
>> +could contain the following exception (assuming that
>> +@option{-mfloat-abi} comes after in @code{MULTILIB_OPTIONS} and given
>> +that @option{-mfloat-abi=soft} is the default value):
>>  @smallexample
>> -*mthumb/*mhard-float*
>> +*mfpu=*
>>  @end smallexample
>>
>>  @findex MULTILIB_REQUIRED
> 
> This version still has a lot of copy-editing issues.  I suggest
> rewriting as:
> 
>   For example, on ARM targets @option{-mfloat-abi=soft} requests use of
>   software floating-point operations, so it
>   does not make sense to build libraries with both
>   @option{-mfloat-abi=soft} and an @option{-mfpu} option.
>   @code{MULTILIB_EXCEPTIONS} could contain the following exception
> 
> but here I get stuck in suggesting a rewrite, because I can't parse this
> part at all to figure out what you're trying to say:
> 
>   (assuming that
>   @option{-mfloat-abi} comes after in @code{MULTILIB_OPTIONS} and given
>   that @option{-mfloat-abi=soft} is the default value):
> 
> "comes after in"?  Comes after what?  If the order is important here,
> the documentation should explain why instead of just "assuming" things
> about it.
> 
> -Sandra the confused
> 

I think it's probably best to just drop the entire parenthetical
subcluase.  This is documentation of how to use MULTILIB_EXCEPTIONS not
precise documentation on what needs to be done on ARM.

In fact, it might be better to just rewrite the whole section based on a
theoretical machine that has two ISAs, one which can support
floating-point and one which can't.  You then get back to essentially
the same text as we had originally but anonymised and future proofed.

R.
Thomas Preudhomme Aug. 18, 2016, 10:22 a.m. UTC | #4
Hi Sandra,

On 18/08/16 07:00, Sandra Loosemore wrote:
> On 08/11/2016 04:31 AM, Thomas Preudhomme wrote:
>
>> diff --git a/gcc/doc/fragments.texi b/gcc/doc/fragments.texi
>> index
>> b6d8541c8ca820fa732363a05221e2cd4d1251c2..abf4e128671bb4751d21f24bb69625593d3c839e
>> 100644
>> --- a/gcc/doc/fragments.texi
>> +++ b/gcc/doc/fragments.texi
>> @@ -117,12 +117,15 @@ specified, there are combinations that should not be
>> built.  In that
>>  case, set @code{MULTILIB_EXCEPTIONS} to be all of the switch exceptions
>>  in shell case syntax that should not be built.
>>
>> -For example the ARM processor cannot execute both hardware floating
>> -point instructions and the reduced size THUMB instructions at the same
>> -time, so there is no need to build libraries with both of these
>> -options enabled.  Therefore @code{MULTILIB_EXCEPTIONS} is set to:
>> +For example on ARM targets @option{-mfloat-abi=soft} requests to use a
>> +softfloat implementation for floating-point operations.  Therefore, it
>> +does not make sense to find both @option{-mfloat-abi=soft} and an
>> +@option{mfpu} option on the command line so @code{MULTILIB_EXCEPTIONS}
>> +could contain the following exception (assuming that
>> +@option{-mfloat-abi} comes after in @code{MULTILIB_OPTIONS} and given
>> +that @option{-mfloat-abi=soft} is the default value):
>>  @smallexample
>> -*mthumb/*mhard-float*
>> +*mfpu=*
>>  @end smallexample
>>
>>  @findex MULTILIB_REQUIRED
>
> This version still has a lot of copy-editing issues.  I suggest rewriting as:
>
>   For example, on ARM targets @option{-mfloat-abi=soft} requests use of
>   software floating-point operations, so it
>   does not make sense to build libraries with both
>   @option{-mfloat-abi=soft} and an @option{-mfpu} option.
>   @code{MULTILIB_EXCEPTIONS} could contain the following exception

Thanks for the help. That sounds better indeed. Future readers thank you ;-)

>
> but here I get stuck in suggesting a rewrite, because I can't parse this part at
> all to figure out what you're trying to say:
>
>   (assuming that
>   @option{-mfloat-abi} comes after in @code{MULTILIB_OPTIONS} and given
>   that @option{-mfloat-abi=soft} is the default value):
>
> "comes after in"?  Comes after what?  If the order is important here, the
> documentation should explain why instead of just "assuming" things about it.

Actually I made a mistake in that example. What I meant is that a wildchar also 
match slashes so one must consider the order of options in MULTILIB_OPTIONS when 
understanding what option sets will a MULTILIB_EXCEPTION rule match.

Thinking about this, MULTILIB_EXCEPTIONS and MULTILIB_REQUIRED don't specify the 
syntax of the directives (option separated by slashes) and the important of the 
order of operations in MULTILIB_OPTIONS. The documentation for MULTILIB_REUSE is 
a better example for that.

I think that Richard makes a good case for going away altogher from ARM as an 
example to both keep things simple and be more future proof. I'll rewrite that 
patch to do this and specify the syntax of MULTILIB_EXCEPTIONS and 
MULTILIB_REQUIRED. Do you prefer these two aspects to be in 2 different patches?

>
> -Sandra the confused
>

My mistake really.

Best regards,

Thomas
Sandra Loosemore Aug. 18, 2016, 8 p.m. UTC | #5
On 08/18/2016 04:05 AM, Richard Earnshaw (lists) wrote:
>
> I think it's probably best to just drop the entire parenthetical
> subcluase.  This is documentation of how to use MULTILIB_EXCEPTIONS not
> precise documentation on what needs to be done on ARM.
>
> In fact, it might be better to just rewrite the whole section based on a
> theoretical machine that has two ISAs, one which can support
> floating-point and one which can't.  You then get back to essentially
> the same text as we had originally but anonymised and future proofed.

Yes, this is a good idea.  Or, carrying it even farther, you could make 
the whole thing hypothetical, like "Suppose a target supports flags 
@option{-mfoo} and @option{-mbar} that are mutually exclusive...."

-Sandra
diff mbox

Patch

diff --git a/gcc/doc/fragments.texi b/gcc/doc/fragments.texi
index b6d8541c8ca820fa732363a05221e2cd4d1251c2..abf4e128671bb4751d21f24bb69625593d3c839e 100644
--- a/gcc/doc/fragments.texi
+++ b/gcc/doc/fragments.texi
@@ -117,12 +117,15 @@  specified, there are combinations that should not be built.  In that
 case, set @code{MULTILIB_EXCEPTIONS} to be all of the switch exceptions
 in shell case syntax that should not be built.
 
-For example the ARM processor cannot execute both hardware floating
-point instructions and the reduced size THUMB instructions at the same
-time, so there is no need to build libraries with both of these
-options enabled.  Therefore @code{MULTILIB_EXCEPTIONS} is set to:
+For example on ARM targets @option{-mfloat-abi=soft} requests to use a
+softfloat implementation for floating-point operations.  Therefore, it
+does not make sense to find both @option{-mfloat-abi=soft} and an
+@option{mfpu} option on the command line so @code{MULTILIB_EXCEPTIONS}
+could contain the following exception (assuming that
+@option{-mfloat-abi} comes after in @code{MULTILIB_OPTIONS} and given
+that @option{-mfloat-abi=soft} is the default value):
 @smallexample
-*mthumb/*mhard-float*
+*mfpu=*
 @end smallexample
 
 @findex MULTILIB_REQUIRED