This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Question on -mips switch for MIPS processor


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]