From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Fri, 27 Dec 2013 20:22:53 -0500 Message-ID: From: cherry To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=089e0149cf80c2ffba04ee8e0ce3 Subject: Re: [9fans] MIPS LE fp register ordering in MOVD Topicbox-Message-UUID: a9554666-ead8-11e9-9d60-3106f5b1d025 --089e0149cf80c2ffba04ee8e0ce3 Content-Type: text/plain; charset=ISO-8859-1 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 --089e0149cf80c2ffba04ee8e0ce3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable



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
< =A0=A0=A0 =A0=A0= =A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 buf.dbuf[l] =3D cast[fnuxi8[i+4]];
---=
> =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 buf.dbuf[l] =3D = cast[fnuxi4[i]];
diff /sys/src/cmd/vl/obj.c ./obj.c
1391a1392
> =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 fnuxi4[i] =3D c;
1415a1417,1419
&g= t; =A0=A0=A0 =A0=A0=A0 for(i=3D0; i<4; i++)
> =A0=A0=A0 =A0=A0=A0 = =A0=A0=A0 Bprint(&bso, "%d", fnuxi4[i]);
> =A0=A0=A0 = =A0=A0=A0 Bprint(&bso, " ");

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

Thanks,
- cherry

--089e0149cf80c2ffba04ee8e0ce3--