diff mbox

[mips] Do not compile mips16.S in soft-float mode

Message ID fc2dac93-a7ca-4601-aa38-c25dd3e4233b@BAMAIL02.ba.imgtec.org
State New
Headers show

Commit Message

Steve Ellcey Aug. 8, 2014, 3:39 p.m. UTC
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.

Comments

Moore, Catherine Aug. 9, 2014, 2:49 p.m. UTC | #1
> -----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) */
Eric Christopher Aug. 12, 2014, 7:07 a.m. UTC | #2
>>
>> -#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
Steve Ellcey Aug. 12, 2014, 3:33 p.m. UTC | #3
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
Eric Christopher Aug. 12, 2014, 6:03 p.m. UTC | #4
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
>
>
diff mbox

Patch

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) */