From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Sat, 28 Dec 2013 12:47:41 +1100 Message-ID: From: Bruce Ellis To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=047d7beba0786bbb7d04ee8e65e6 Subject: Re: [9fans] MIPS LE fp register ordering in MOVD Topicbox-Message-UUID: a95b46ba-ead8-11e9-9d60-3106f5b1d025 --047d7beba0786bbb7d04ee8e65e6 Content-Type: text/plain; charset=UTF-8 Vita got the good gear. Ken said something about no need for them to find the bugs again. Halcyon days. We used 0? for RM4700 and later the QED7000. brucee On 28 Dec 2013 12:24, "cherry" wrote: > > > > On Thu, Dec 26, 2013 at 11:32 PM, Bruce Ellis wrote: > >> You might be able to blame the play station 2 and the two different MIPS >> chips it had. I did two compilers. The FP was very unusual and one was LE >> and the other BE. Inferno port worked well. >> > > Thanks very much for your hint. Inferno's 0l uses fnuxi4, whereas its vl > uses fnuxi8, just like Plan 9's. I adopted the Inferno 0l's way, and added > one line in obj.c to set fnuxi4 for BE, as well as the corresponding debug > output. This seems to work with both BE and LE. For BE it gives the same > output as before. > > diff /sys/src/cmd/vl/asm.c ./asm.c > 672c672 > < buf.dbuf[l] = cast[fnuxi8[i+4]]; > --- > > buf.dbuf[l] = cast[fnuxi4[i]]; > diff /sys/src/cmd/vl/obj.c ./obj.c > 1391a1392 > > fnuxi4[i] = c; > 1415a1417,1419 > > for(i=0; i<4; i++) > > Bprint(&bso, "%d", fnuxi4[i]); > > Bprint(&bso, " "); > > Does this break anything? If not, I will submit a patch. > > Thanks, > - cherry > > --047d7beba0786bbb7d04ee8e65e6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Vita got the good gear. Ken said something about no need for= them to find the bugs again. Halcyon days.

We used 0? for RM4700 and later the QED7000.

brucee

On 28 Dec 2013 12:24, "cherry" <lunaria21@gmail.com> wrote:



On Thu, Dec 26, 2013 at 11:32 PM, Bruce Ellis <= ;bruce.ellis@gma= il.com> wrote:
You migh= t be able to blame the play station 2 and the two different MIPS chips it h= ad. I did two compilers. The FP was very unusual and one was LE and the oth= er BE. Inferno port worked well.

Thanks very much for your hint. Inferno's 0l uses= fnuxi4, whereas its vl uses fnuxi8, just like Plan 9's. I adopted the = Inferno 0l's way, and added one line in obj.c to set fnuxi4 for BE, as = well as the corresponding debug output. This seems to work with both BE and= LE. For BE it gives the same output as before.

diff /sys/src/cmd/vl/asm.c ./asm.c
672c672
< =C2=A0=C2=A0=C2= =A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0= =C2=A0 buf.dbuf[l] =3D cast[fnuxi8[i+4]];
---
> =C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2= =A0 buf.dbuf[l] =3D cast[fnuxi4[i]];
diff /sys/src/cmd/vl/obj.c ./obj.c<= br>1391a1392
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 fnuxi4[i] =3D= c;
1415a1417,1419
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 for(i= =3D0; i<4; i++)
> =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2= =A0=C2=A0 Bprint(&bso, "%d", fnuxi4[i]);
> =C2=A0=C2=A0= =C2=A0 =C2=A0=C2=A0=C2=A0 Bprint(&bso, " ");

Does this= break anything? If not, I will submit a patch.

Thanks,
- cherry

--047d7beba0786bbb7d04ee8e65e6--