This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Question on -mips switch for MIPS processor
- To: gcc at gcc dot gnu dot org
- Subject: RE: Question on -mips switch for MIPS processor
- From: "Billinghurst, David (RTD)" <David dot Billinghurst at riotinto dot com dot au>
- Date: Wed, 19 Jan 2000 00:13:23 -0000
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.