public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH mips] Do not compile mips16.S in soft-float mode
@ 2014-08-08 15:39 Steve Ellcey 
  2014-08-09 14:49 ` Moore, Catherine
  0 siblings, 1 reply; 5+ messages in thread
From: Steve Ellcey  @ 2014-08-08 15:39 UTC (permalink / raw)
  To: clm, matthew.fortune, echristo, gcc-patches

This libgcc patch is the second of two patches needed to build GCC soft-float
multilibs when using the latest binutils.  It skips assembling any of the code
in mips16.S when in soft-float mode because the code is not used when in
soft-float mode and because doing so generates errors during assembly (due to
using floating point registers in soft-float mode).

Tested with the mips-mti-linux-gnu toolchain.

Steve Ellcey
sellcey@mips.com


2014-08-08  Steve Ellcey  <sellcey@mips.com>

	* config/mips/mips16.S:  Skip when __mips_soft_float is defined.


diff --git a/libgcc/config/mips/mips16.S b/libgcc/config/mips/mips16.S
index 6a43a98..150a23a 100644
--- a/libgcc/config/mips/mips16.S
+++ b/libgcc/config/mips/mips16.S
@@ -21,7 +21,7 @@ a copy of the GCC Runtime Library Exception along with this program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
-#ifdef __mips_micromips
+#if defined(__mips_micromips) || defined(__mips_soft_float)
   /* DO NOTHING */
 #else
 
@@ -749,4 +749,4 @@ CALL_STUB_RET (__mips16_call_stub_dc_10, 10, DC)
 #endif /* !__mips_single_float */
 
 #endif
-#endif /* __mips_micromips */
+#endif /* defined(__mips_micromips) || defined(__mips_soft_float) */

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH mips] Do not compile mips16.S in soft-float mode
  2014-08-08 15:39 [PATCH mips] Do not compile mips16.S in soft-float mode Steve Ellcey 
@ 2014-08-09 14:49 ` Moore, Catherine
  2014-08-12  7:08   ` Eric Christopher
  0 siblings, 1 reply; 5+ messages in thread
From: Moore, Catherine @ 2014-08-09 14:49 UTC (permalink / raw)
  To: Steve Ellcey , matthew.fortune, echristo, gcc-patches; +Cc: Moore, Catherine



> -----Original Message-----
> From: Steve Ellcey [mailto:sellcey@mips.com]
> Subject: [PATCH mips] Do not compile mips16.S in soft-float mode
> 
> This libgcc patch is the second of two patches needed to build GCC soft-float
> multilibs when using the latest binutils.  It skips assembling any of the code in
> mips16.S when in soft-float mode because the code is not used when in soft-
> float mode and because doing so generates errors during assembly (due to
> using floating point registers in soft-float mode).
> 
> Tested with the mips-mti-linux-gnu toolchain.
> 

FWIW, this patch looks okay to me (although I can't approve it).
Catherine

> 
> 2014-08-08  Steve Ellcey  <sellcey@mips.com>
> 
> 	* config/mips/mips16.S:  Skip when __mips_soft_float is defined.
> 
> 
> diff --git a/libgcc/config/mips/mips16.S b/libgcc/config/mips/mips16.S index
> 6a43a98..150a23a 100644
> --- a/libgcc/config/mips/mips16.S
> +++ b/libgcc/config/mips/mips16.S
> @@ -21,7 +21,7 @@ a copy of the GCC Runtime Library Exception along with
> this program;  see the files COPYING3 and COPYING.RUNTIME respectively.
> If not, see  <http://www.gnu.org/licenses/>.  */
> 
> -#ifdef __mips_micromips
> +#if defined(__mips_micromips) || defined(__mips_soft_float)
>    /* DO NOTHING */
>  #else
> 
> @@ -749,4 +749,4 @@ CALL_STUB_RET (__mips16_call_stub_dc_10, 10, DC)
> #endif /* !__mips_single_float */
> 
>  #endif
> -#endif /* __mips_micromips */
> +#endif /* defined(__mips_micromips) || defined(__mips_soft_float) */

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH mips] Do not compile mips16.S in soft-float mode
  2014-08-09 14:49 ` Moore, Catherine
@ 2014-08-12  7:08   ` Eric Christopher
  2014-08-12 15:33     ` Steve Ellcey
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Christopher @ 2014-08-12  7:08 UTC (permalink / raw)
  To: Moore, Catherine; +Cc: Steve Ellcey, matthew.fortune, gcc-patches

>>
>> -#ifdef __mips_micromips
>> +#if defined(__mips_micromips) || defined(__mips_soft_float)
>>    /* DO NOTHING */
>>  #else
>>

Mind adding a comment here explaining why we don't want to do anything
for soft float (and micromips)?

OK otherwise.

Thanks!

-eric

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH mips] Do not compile mips16.S in soft-float mode
  2014-08-12  7:08   ` Eric Christopher
@ 2014-08-12 15:33     ` Steve Ellcey
  2014-08-12 18:04       ` Eric Christopher
  0 siblings, 1 reply; 5+ messages in thread
From: Steve Ellcey @ 2014-08-12 15:33 UTC (permalink / raw)
  To: Eric Christopher; +Cc: Moore, Catherine, matthew.fortune, gcc-patches

On Tue, 2014-08-12 at 00:07 -0700, Eric Christopher wrote:
> >>
> >> -#ifdef __mips_micromips
> >> +#if defined(__mips_micromips) || defined(__mips_soft_float)
> >>    /* DO NOTHING */
> >>  #else
> >>
> 
> Mind adding a comment here explaining why we don't want to do anything
> for soft float (and micromips)?
> 
> OK otherwise.
> 
> Thanks!
> 
> -eric

OK, I added this comment to the checkin:

#if defined(__mips_micromips) || defined(__mips_soft_float)
  /* Do nothing because this code is only needed when linking
     against mips16 hard-float objects.  Neither micromips code
     nor soft-float code can be linked against mips16 hard-float
     objects so we do not need these routines when building libgcc
     for those cases.  */


Steve Ellcey
sellcey@mips.com


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH mips] Do not compile mips16.S in soft-float mode
  2014-08-12 15:33     ` Steve Ellcey
@ 2014-08-12 18:04       ` Eric Christopher
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Christopher @ 2014-08-12 18:04 UTC (permalink / raw)
  To: Steve Ellcey; +Cc: Moore, Catherine, matthew.fortune, gcc-patches

Thanks!

-eric

On Tue, Aug 12, 2014 at 8:33 AM, Steve Ellcey <sellcey@mips.com> wrote:
> On Tue, 2014-08-12 at 00:07 -0700, Eric Christopher wrote:
>> >>
>> >> -#ifdef __mips_micromips
>> >> +#if defined(__mips_micromips) || defined(__mips_soft_float)
>> >>    /* DO NOTHING */
>> >>  #else
>> >>
>>
>> Mind adding a comment here explaining why we don't want to do anything
>> for soft float (and micromips)?
>>
>> OK otherwise.
>>
>> Thanks!
>>
>> -eric
>
> OK, I added this comment to the checkin:
>
> #if defined(__mips_micromips) || defined(__mips_soft_float)
>   /* Do nothing because this code is only needed when linking
>      against mips16 hard-float objects.  Neither micromips code
>      nor soft-float code can be linked against mips16 hard-float
>      objects so we do not need these routines when building libgcc
>      for those cases.  */
>
>
> Steve Ellcey
> sellcey@mips.com
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-12 18:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-08 15:39 [PATCH mips] Do not compile mips16.S in soft-float mode Steve Ellcey 
2014-08-09 14:49 ` Moore, Catherine
2014-08-12  7:08   ` Eric Christopher
2014-08-12 15:33     ` Steve Ellcey
2014-08-12 18:04       ` Eric Christopher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).