public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Question on -mips switch for MIPS processor
@ 2000-01-18 12:25 Richard Kenner
  2000-01-18 15:03 ` Gavin Romig-Koch
  2000-01-20 23:48 ` Jim Wilson
  0 siblings, 2 replies; 9+ messages in thread
From: Richard Kenner @ 2000-01-18 12:25 UTC (permalink / raw)
  To: gcc

Why does -mips3 default to -mabi=64?

Just because somebody has a processor that has those instructions doesn't
mean they want to use the 64-bit ABI.  You can interoperate binaries
between the different values of the -mips switch, but not -mabi.

So it would seem to me that the -mips value should not affect the
-mabi value at all.

What do others think?

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

* Question on -mips switch for MIPS processor
  2000-01-18 12:25 Question on -mips switch for MIPS processor Richard Kenner
@ 2000-01-18 15:03 ` Gavin Romig-Koch
  2000-01-20 23:48 ` Jim Wilson
  1 sibling, 0 replies; 9+ messages in thread
From: Gavin Romig-Koch @ 2000-01-18 15:03 UTC (permalink / raw)
  To: Richard Kenner; +Cc: gcc

Richard Kenner writes:
 > Why does -mips3 default to -mabi=64?

Because that's what the SGI compilers did.

 > Just because somebody has a processor that has those instructions doesn't
 > mean they want to use the 64-bit ABI.  

No, but it's not a bad default.

 > You can interoperate binaries
 > between the different values of the -mips switch, but not -mabi.
 > 
 > So it would seem to me that the -mips value should not affect the
 > -mabi value at all.
 > 
 > What do others think?

What ABI would you have it default to, and why would that
be a better choice?

                                            -gavin...

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

* Re: Question on -mips switch for MIPS processor
  2000-01-18 12:25 Question on -mips switch for MIPS processor Richard Kenner
  2000-01-18 15:03 ` Gavin Romig-Koch
@ 2000-01-20 23:48 ` Jim Wilson
  1 sibling, 0 replies; 9+ messages in thread
From: Jim Wilson @ 2000-01-20 23:48 UTC (permalink / raw)
  To: kenner; +Cc: gcc

In article < 10001182034.AA03972@vlsi1.ultra.nyu.edu > you write:
>Why does -mips3 default to -mabi=64?

This is what the SGI compiler did at the time that I wrote the code.
This is not what the SGI compiler does anymore.

I agree that it is wrong now.

>Just because somebody has a processor that has those instructions doesn't
>mean they want to use the 64-bit ABI.

To clarify, you do want to use a 64-bit ABI, but you don't want to use the
N64 ABI, you want to use the N32 ABI.

Jim

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

* Re:  Question on -mips switch for MIPS processor
  2000-01-18 15:36 Richard Kenner
@ 2000-01-18 23:02 ` Gavin Romig-Koch
  0 siblings, 0 replies; 9+ messages in thread
From: Gavin Romig-Koch @ 2000-01-18 23:02 UTC (permalink / raw)
  To: Richard Kenner; +Cc: gcc

Richard Kenner writes:
 >      > Why does -mips3 default to -mabi=64?
 > 
 >     Because that's what the SGI compilers did.
 > 
 > Are you sure? 

I was, but as you and David point out, it's not.

Given this, and assuming no strong objections from 
anyone, I'd be OK with a patch to change the defaults
to be the same as SGI's.  

                                   -gavin...

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

* RE: Question on -mips switch for MIPS processor
@ 2000-01-18 16:31 Richard Kenner
  0 siblings, 0 replies; 9+ messages in thread
From: Richard Kenner @ 2000-01-18 16:31 UTC (permalink / raw)
  To: David.Billinghurst; +Cc: gcc

    The behaviour is system dependent.  For most machines -mips3 => -n32.

Especially since there are few R8000 systems out there.

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

* RE: Question on -mips switch for MIPS processor
@ 2000-01-18 16:14 Billinghurst, David (RTD)
  0 siblings, 0 replies; 9+ messages in thread
From: Billinghurst, David (RTD) @ 2000-01-18 16:14 UTC (permalink / raw)
  To: gcc

The behaviour is system dependent.  For most machines -mips3 => -n32.

man cc (Irix 6.5.3) gives

    -mipsn  Specifies the Instruction Set Architecture (ISA).  n can be
             one of the following:

             1   Generates code using the instruction set of the
                 R2000/R3000 RISC architecture, and searches for mips1
                 libraries/objects at link-time.  This defaults to -o32.

             2   Generates code using the MIPS II instruction set (MIPS I +
                 R4000 specific extensions), and searches for mips2
                 libraries/objects at link-time.  This defaults to -o32.

             3   Generates code using the full MIPS III instruction set,
                 and searches for mips3 libraries/objects at link-time.  If
                 -n32 or -64 are not specified, this defaults to -64 on
                 R8000-based systems and -n32 on all other systems.

             -mips4
                 Generates code using the full MIPS IV instruction set
                 which is supported on R10000, R5000 and R8000 systems, and
                 searches for mips4 libraries/objects at link-time.  This
                 is the default on R8000 systems.  If -n32 or -64 are not
                 specified, this defaults to -64 on R8000-based systems and
                 -n32 on all other systems.



> -----Original Message-----
> From:	kenner@vlsi1.ultra.nyu.edu [SMTP:kenner@vlsi1.ultra.nyu.edu]
> Sent:	Wednesday, 19 January 2000 10:46
> To:	gavin@cygnus.com
> Cc:	gcc@gcc.gnu.org
> Subject:	Re:  Question on -mips switch for MIPS processor
> 
>      > Why does -mips3 default to -mabi=64?
> 
>     Because that's what the SGI compilers did.
> 
> Are you sure?  It's folks that are used to SGI compilers that expressed
> surprise.  When I do "man cc" on an SGI machine, it says that -mips3
> and -mips3 default to N32, not 64.
> 
>     What ABI would you have it default to, and why would that
>     be a better choice?
> 
> I'd have the ABI selection be made independent of the -mips switch: if
> the user wanted to change the ABI, they should be required to do so
> explicitly.  Doing what SGI does doesn't make sense since we don't
> have a single binary that can produce both O32 and N32.

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

* Re:  Question on -mips switch for MIPS processor
@ 2000-01-18 15:36 Richard Kenner
  2000-01-18 23:02 ` Gavin Romig-Koch
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Kenner @ 2000-01-18 15:36 UTC (permalink / raw)
  To: gavin; +Cc: gcc

     > Why does -mips3 default to -mabi=64?

    Because that's what the SGI compilers did.

Are you sure?  It's folks that are used to SGI compilers that expressed
surprise.  When I do "man cc" on an SGI machine, it says that -mips3
and -mips3 default to N32, not 64.

    What ABI would you have it default to, and why would that
    be a better choice?

I'd have the ABI selection be made independent of the -mips switch: if
the user wanted to change the ABI, they should be required to do so
explicitly.  Doing what SGI does doesn't make sense since we don't
have a single binary that can produce both O32 and N32.

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

* RE: Question on -mips switch for MIPS processor
  2000-01-18 13:58 Billinghurst, David (RTD)
@ 2000-01-18 14:50 ` Mark Mitchell
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Mitchell @ 2000-01-18 14:50 UTC (permalink / raw)
  To: David.Billinghurst; +Cc: gcc

>>>>> "Billinghurst," == Billinghurst, David (RTD) <David.Billinghurst@riotinto.com.au> writes:

    Billinghurst,> You can't run -mips4 binaries on R4000
    Billinghurst,> mips-sgi-irix

Jim Wilson is the expert here.  But, I believe that the GCC behavior
matches the SGI compiler behavior -- and that's an important
consideration.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

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

* RE: Question on -mips switch for MIPS processor
@ 2000-01-18 13:58 Billinghurst, David (RTD)
  2000-01-18 14:50 ` Mark Mitchell
  0 siblings, 1 reply; 9+ messages in thread
From: Billinghurst, David (RTD) @ 2000-01-18 13:58 UTC (permalink / raw)
  To: gcc

You can't run -mips4 binaries on R4000 mips-sgi-irix 

By default, recent versions of gcc generate mips4 binaries when compiled on
irix-6.5 based mips4 machines.  These don't run on my R4400 Indigo2.  

I submitted a patch for this
http://gcc.gnu.org/ml/gcc-patches/1999-06/msg00562.html but it didn't make
it 

+++++++++++++++++++++++++++++++++++++++++
(Mr) David Billinghurst
Comalco Research Centre
PO Box 316, Thomastown, Vic, Australia, 3074
Phone:	+61 3 9469 0642
FAX:	+61 3 9462 2700
Email:	David.Billinghurst@riotinto.com.au




> -----Original Message-----
> From:	kenner@vlsi1.ultra.nyu.edu [SMTP:kenner@vlsi1.ultra.nyu.edu]
> Sent:	Wednesday, 19 January 2000 7:35
> To:	gcc@gcc.gnu.org
> Subject:	Question on -mips switch for MIPS processor
> 
> Why does -mips3 default to -mabi=64?
> 
> Just because somebody has a processor that has those instructions doesn't
> mean they want to use the 64-bit ABI.  You can interoperate binaries
> between the different values of the -mips switch, but not -mabi.
> 
> So it would seem to me that the -mips value should not affect the
> -mabi value at all.
> 
> What do others think?

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

end of thread, other threads:[~2000-01-20 23:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-18 12:25 Question on -mips switch for MIPS processor Richard Kenner
2000-01-18 15:03 ` Gavin Romig-Koch
2000-01-20 23:48 ` Jim Wilson
2000-01-18 13:58 Billinghurst, David (RTD)
2000-01-18 14:50 ` Mark Mitchell
2000-01-18 15:36 Richard Kenner
2000-01-18 23:02 ` Gavin Romig-Koch
2000-01-18 16:14 Billinghurst, David (RTD)
2000-01-18 16:31 Richard Kenner

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).