Subject: Re: Ultrix 'cc -mips3' binaries work
To: Jonathan Stone <jonathan@dsg.stanford.edu>
From: Simon Burge <simonb@telstra.com.au>
List: port-pmax
Date: 10/30/1997 09:20:43
On Wed, 29 Oct 1997 14:05:26 -0800  Jonathan Stone wrote:

> >I compiled up a 1.3-alpha kernel, and sure enough it works!  I've got
> >some number-crunching code that the MIPS compiler still does a better
> >job on than gcc, so this is a help.
> 
> 
> I thought I'd sent a feedback request to you asking if this worked?

I must have missed it then.  I've been flat-out lately with work, so that's
not an impossibility.

> Whatever. I've put the PR in feedback state, in case you wanted
> similar support for native NetBSD 32-bit binaries with mips3
> instructions.

I believe gcc can't produce runable mips3 binaries at the moment -
should this be added to the pr?

vlad:~ 8> gcc -mcpu=r4000 -mips3 -v -o test-prog test-prog.c 
gcc version 2.7.2.2
 /usr/libexec/cpp -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=7 -D__ANSI_COMPAT -DMIPSEL -DR3000 -DSYSTYPE_BSD -D_SYSTYPE_BSD -D__NetBSD__ -Dmips -D__NO_LEADING_UNDERSCORES__ -D__GP_SUPPORT__ -Dunix -D_R3000 -D__KPRINTF_ATTRIBUTE__ -D__ANSI_COMPAT -D__MIPSEL__ -D__R3000__ -D__SYSTYPE_BSD__ -D_SYSTYPE_BSD -D__NetBSD__ -D__mips__ -D__NO_LEADING_UNDERSCORES__ -D__GP_SUPPORT__ -D__unix__ -D_R3000 -D__KPRINTF_ATTRIBUTE__ -D__MIPSEL -D__R3000 -D__SYSTYPE_BSD -D__mips -D__unix -Asystem(unix) -Asystem(NetBSD) -Amachine(mips) -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int -U__mips -D__mips=3 -D__mips64 test-prog.c /var/tmp/cc12855a.i
GNU CPP version 2.7.2.2 [AL 1.1, MM 40] NetBSD/mips
#include "..." search starts here:
#include <...> search starts here:
 /usr/include
End of search list.
 /usr/libexec/cc1 /var/tmp/cc12855a.i -mfp64 -mgp64 -mabicalls -quiet -dumpbase test-prog.c -mcpu=r4000 -mips3 -version -o /var/tmp/cc12855a.s
GNU C version 2.7.2.2 [AL 1.1, MM 40] NetBSD/mips compiled by GNU C version 2.7.2.2.
 as -mips3 -v -o /var/tmp/cc12855a1.o /var/tmp/cc12855a.s
GNU assembler version 2.8 (mips-dec-netbsd), using BFD version 2.8
 ld -mips3 -non_shared -dynamic-linker /usr/libexec/ld.so -e __start -dc -dp -Bdynamic -o test-prog /usr/lib/crt0.o -L/usr/libexec /var/tmp/cc12855a1.o -lgcc -lc /usr/lib/crtn.o -lgcc
ld: /var/tmp/cc12855a1.o: ISA mismatch (-mips3) with previous modules (-mips1)
vlad:~ 9> ./test-prog 
Illegal instruction (core dumped)
vlad:~ 10> 

Simon.