*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> mips2 (5)              
Title
Content
Arch
Section
 

Contents


MIPS2(5)							      MIPS2(5)


NAME    [Toc]    [Back]

     mips2 - MIPS2 architecture	extensions and the -mips2 compiler option

SYNOPSIS    [Toc]    [Back]

     cc	-mips2 [ options ] ... file ...
     f77 -mips2	[ options ] ...	file ...
     pc	-mips2 [ options ] ... file ...
     as	-mips2 [ options ] ... file ...

DESCRIPTION    [Toc]    [Back]

     The MIPS R4000 processor contains many instruction	set extensions to the
     MIPS1 instruction set that	was defined by the MIPS	R2000/R3000. A subset
     of	these instruction set extensions defines the MIPS2 instruction set and
     is	accessible with	the -mips2 option. The MIPS3 instruction set includes
     the remaining extensions and is described in mips3(5).

     The -mips2	option is supported when compiling C, C++, Fortran, Pascal or
     Assembly language source files. It	instructs the code generation phase to
     generate the MIPS2	instructions wherever beneficial. The option also
     causes the	instruction scheduler phase to use the R4000 processor model
     while scheduling instructions. When linking, the -mips2 option instructs
     the linker	ld(1) to use MIPS2 specific versions of	libraries from the
     directory /usr/lib/mips2.

     The new features added by the MIPS2 instruction set extensions are:

     o	  Double precision floating point load and store instructions. This
	  can provide significant improvement to code using double precision
	  floating point manipulation. A single	instruction can	load/store a
	  double precision floating point value. In contrast, the R2000/R3000
	  required using two instructions to reference the upper half and the
	  lower	half of	the double precision value.

     o	  Intrinsic instructions to convert floating point numbers.  The new
	  instructions provide truncate, round,	ceiling	and floor operations.
	  On the R2000/R3000, these instructions were implemented as assembler
	  macros which expanded	into approximately 11 instructions. Code which
	  does significant amount of floating point to integer conversions
	  should benefit from the -mips2 option.

     o	  Floating point sqrt instruction. This	is faster than the sqrt
	  routine in the math libraries	for the	R2000/R3000.

     o	  Branch likely	instructions. Every branch instruction in the MIPS1
	  architecture has a corresponding branch likely form. In this form of
	  the branch, the instruction in the delay slot	of the branch is
	  nullified if the conditional branch is not taken.

     o	  New compare and trap instructions, which cause an exception to be
	  raised based on the result of	comparing two registers	or a register
	  and immediate	value. In the R2000/R3000, these instructions were
	  implemented as assembler macros which	expanded into a	sequence using



									Page 1






MIPS2(5)							      MIPS2(5)



	  a conditional	branch and a break instruction.

     A special set of libraries	compiled with the -mips2 option	and making use
     of	MIPS2 features is provided in the /usr/lib/mips2 directory. As part of
     the basic development environment you get MIPS2 versions of libfastm.a,
     libm.a and	libm43.a libraries. As part of the Fortran compiler you	get
     MIPS2 versions of libF77.a, libI77.a, libU77.a and	libisam.a .  The
     shared library versions of	the above Fortran libraries do not currently
     have a MIPS2 version.

     Code compiled and/or linked using the -mips2 option will not run on
     R2000/R3000 based machines. Code compiled without the -mips2 option will
     run on all	machines -- R2000/R3000/R4000 -- within	the constraints	of
     operating system compatibility. If	broad machine base compatibility is an
     issue, SGI	recommends using the -mips2 option only	when significant
     benefit is	achieved on an R4000 based system as compared to running the
     same program compiled without the -mips2 option on	the same R4000 based
     system.

     The double	precision floating point load and store	instructions require
     the data to be aligned on a double	word boundary. A non-aligned access
     will cause	the program to abort with a "bus error"	message. This
     requirement may cause some	programs that worked fine earlier, to fail
     when recompiled with the -mips2 option. This can happen in	some Fortran
     programs that have	common blocks with an odd number of integer values
     followed by double	precision data.

SEE ALSO    [Toc]    [Back]

      
      
     Assembly Language Programmer's Guide
     MIPS RISC Architecture, Gerry Kane	and Joe	Heinrich, Prentice Hall.
     MIPS R4000	User's Manual, Joseph Heinrich,	Prentice Hall.
     cc(1), f77(1), pc(1), CC(1), as(1), mips3(5)


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
mips4 IRIX MIPS4 architecture extensions and the -mips4 compiler option
mips3 IRIX MIPS3 architecture extensions and the -mips3 compiler option
opt IRIX Miscellaneous compiler optimizations option group
lno IRIX Compiler loop nest optimization option group
inet6_opt_append Tru64 Return the length of an IPv6 extension header with a new option and append the option
getoption IRIX retrieve an option from the option database
use_extended_names OpenBSD miscellaneous curses extensions
cmdwrite IRIX Writing C language extensions to Tcl.
dlpi_ext.h HP-UX HP-specific extensions for DLPI
dlpi_ext HP-UX HP-specific extensions for DLPI
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service