Subject: Re: Mips3 ultrix binaries [Re: FPU Performance on DECstation 5000/125]
To: Jonathan Stone <jonathan@DSG.Stanford.EDU>
From: Michael L. Hitch <mhitch@lightning.oscs.montana.edu>
List: port-pmax
Date: 08/29/1997 21:32:31
On Aug 29,  7:38pm, Jonathan Stone wrote:
> 
> >This program was compiled under Ultrix using the MIPS compiler with the
> >-mips3 option.  So I guess the ultrix emulation isn't perfect.  Is this
> >something I should pr?
...
> I'd need to know what the ECOFF codes for `mips3-only' binary were,
> and also how GDB on Ultrix gets access to 64-bit register state.

  Here's a start - I can now execute a dhrystone program compiled on
Ultrix with the -mips3 option.  All it does is recognize the mips3 binary
as a valid ECOFF binary.  I'm not sure what to do to verify that it's
only valid on mips3 cpus.

*** /c/src/sys/arch/mips/include/ecoff_machdep.h	Sun Jul 20 05:19:50 1997
--- sys/arch/mips/include/ecoff_machdep.h	Fri Aug 29 21:17:16 1997
***************
*** 44,50 ****
--- 44,57 ----
          u_long gp_value
  
  #define ECOFF_MAGIC_MIPSEL 0x0162
+ #define ECOFF_MAGIC_MIPSEL3 0x0142	/* (mips3) */
+ #ifdef MIPS3
+ /* XXX need to verify that cpu is mips3 if executable is mips3 */
+ #define ECOFF_BADMAG(ep) ((ep)->f.f_magic != ECOFF_MAGIC_MIPSEL && \
+                           (ep)->f.f_magic != ECOFF_MAGIC_MIPSEL3)
+ #else
  #define ECOFF_BADMAG(ep) ((ep)->f.f_magic != ECOFF_MAGIC_MIPSEL)
+ #endif
  
  #define ECOFF_SEGMENT_ALIGNMENT(ep) ((ep)->a.vstamp < 23 ? 8 : 16)
  

-- 
Michael L. Hitch			mhitch@montana.edu
Computer Consultant
Information Technology Center
Montana State University	Bozeman, MT	USA