RE: RE: RE: Re: [MIPS r5900] libgcc floating point fixes

2014-08-18 Thread Jürgen Urban
> > When I compile for mipsel ABI o32 with -mhard-float and -msingle-fpu, It get > > the warning: > > > > Warning: float register should be even, was 1. > > > > I would say the warning is wrong, because odd FPU registers are available. > > This is wrong but this is the area which is in flux at t

[MIPS r5900] libgcc floating point fixes

2014-06-15 Thread Jürgen Urban
tried to find a FPU testsuite, but the testsuites are not designed to test non-standard FPUs or use double instead of float. So there can be more problems with FPU on r5900 which I don't see at the moment. Best regards Jürgen Urban--- gcc-4.9.0/libgcc/config/t-hardfp-sf 1970-01-01 01:00:00.0

Aw: [MIPS r5900] libgcc floating point fixes

2014-06-24 Thread Jürgen Urban
> Can someone please add the patch to the official GCC repository? > > I am not sure whether I fixed all self-calling implementations. Does somebody > know a way of finding selfcalling implementations? > > I tried to find a FPU testsuite, but the testsuites are not designed to test > non-standard FPUs or use double instead of float. So there can be more > problems with FPU on r5900 which I don't see at the moment. > > Best regards > Jürgen Urban

[PATCH] Basic support for MIPS r5900

2013-06-02 Thread Jürgen Urban
Hello, after some months I reworked the patch for r5900. It would be nice if this could be accepted. The patch contains only changes to get basic support for MIPS r5900. It can be used to compile a working Linux kernel for the Playstation 2. It is also possible to get Linux programs working wit

Re: [PATCH] Basic support for MIPS r5900

2013-06-03 Thread Jürgen Urban
Hello Richard, > Thanks, looks good. The comments I have are only minor and seemed easier > to spell out as a revised patch, attached below. The changes are: > > * removing the config.sub bit, which looked redundant. We already have > the up-to-date upstream config.sub. > > * removing the tar

Aw: Re: [PATCH] Basic support for MIPS r5900

2013-06-11 Thread Jürgen Urban
Hello Richard, > > How much other changes will be currently accepted here? There is other > > stuff which I want to prepare and submit here, e.g.: > > 1. disable use of dmult and ddiv (ABI n32). > > 2. use trunc.w.s instead of cvt.w.s (to get single float working for > > normal range calculations;

Re: [PATCH] Basic support for MIPS r5900

2013-06-14 Thread Jürgen Urban
Hello Richard, I updated the patch as requested. > Richard Sandiford writes: > > > I can't approve the Makefile.in bits. I've cc'ed Ian, who's the libgcc > > maintainer. Ian: the problem is that "_muldi3.o" on 64-bit targets > > is actually an implementation of __multi3. Jürgen wants to have

[PATCH] MIPS r5900, --with-llsc=?

2013-06-15 Thread Jürgen Urban
Hello Richard, > >> > How much other changes will be currently accepted here? There is other > >> > stuff which I want to prepare and submit here, e.g.: > >> > 3. fix use of ll/sc in libgomp, either increase mips ISA level or use > >> > syscall (which is broken in Linux 2.6.35.4). The attached p

Aw: Re: [PATCH] Basic support for MIPS r5900

2013-06-16 Thread Jürgen Urban
Hello Richard, > > The code is now completely moved into libgcc/config/mips/t-mips and > > libgcc/config/mips/lib2funcs.c (new file). > > The code should now be easier to understand. > > I used the code from libgcc/config/m32c as example (e.g. same file name > > lib2funcs.c). I copied the file hea

Re: [PATCH] MIPS r5900, --with-llsc=?

2013-06-16 Thread Jürgen Urban
Hello Richard, > > > >> >> > How much other changes will be currently accepted here? There is other > >> >> > stuff which I want to prepare and submit here, e.g.: > > > >> >> > 3. fix use of ll/sc in libgomp, either increase mips ISA level or use > >> >> > syscall (which is broken in Linux 2.6.35.

Re: [PATCH] Basic support for MIPS r5900

2013-06-23 Thread Jürgen Urban
Hello Richard, > >> Does it still work with those changes, as below? If so, I'll check it in. > > > > I tested it. It is still working. So the patch is OK, please check it in. > > OK, I've applied this and the config.gcc patch. Thanks. In the native PS2SDK (i.e. no Linux) I detected that there

Re: [PATCH] Basic support for MIPS r5900

2013-06-24 Thread Jürgen Urban
Hello Richard, Am 23.06.2013 um 22:21 schrieb Richard Sandiford : > "Jürgen Urban" writes: >> >> In the native PS2SDK (i.e. no Linux) I detected that there are undefined >> references to `__fixtfsi', `__floatsitf', `__subtf3', `__multf3', &g

Re: [PATCH] Basic support for MIPS r5900

2013-06-27 Thread Jürgen Urban
Hello Richard, Am 25.06.2013 um 23:24 schrieb Richard Sandiford : > Jürgen Urban writes: >> Am 23.06.2013 um 22:21 schrieb Richard Sandiford >> : >>>> In the native PS2SDK (i.e. no Linux) I detected that there are undefined >>>> references to `__fixtfsi

[PATCH] FPU IEEE 754 for MIPS r5900

2013-07-06 Thread Jürgen Urban
Hello Richard, I used the SPU code in GCC as example for creating an r5900_single_format structure. The patch is attached to the e-mail. I want to submit this patch. > >> * removing the ISA_HAS_LDC1_SDC1 setting. I realise what you did > >> describes the reality of the processor, but the prob

Aw: Re: [PATCH] FPU IEEE 754 for MIPS r5900

2013-07-07 Thread Jürgen Urban
Hello Richard, > Gesendet: Sonntag, 07. Juli 2013 um 10:15 Uhr > "Jürgen Urban" writes: > > I used the SPU code in GCC as example for creating an > > r5900_single_format structure. The patch is attached to the e-mail. I > > want to submit this patch. > >

Aw: Re: Re: [PATCH] FPU IEEE 754 for MIPS r5900

2013-07-08 Thread Jürgen Urban
Hello, > "Jürgen Urban" writes: > >> "Jürgen Urban" writes: > >> > I used the SPU code in GCC as example for creating an > >> > r5900_single_format structure. The patch is attached to the e-mail. I > >> > want to submit this p

Re: [PATCH] FPU IEEE 754 for MIPS r5900

2013-07-21 Thread Jürgen Urban
Hello Richard, > "Jürgen Urban" writes: > >> "Jürgen Urban" writes: > >> >> "Jürgen Urban" writes: > >> >> > I used the SPU code in GCC as example for creating an > >> >> > r5900_single

Aw: Re: [PATCH] FPU IEEE 754 for MIPS r5900

2013-07-25 Thread Jürgen Urban
Hello Richard, Sorry in the last days, I was not at home. So I couldn't test it until now. > "Jürgen Urban" writes: > > Index: gcc/config.gcc > > === > > --- gcc/config.gcc (Revision 200583) &

Aw: RFC/A: PR 58079: CONST_INT mode assert in combine.c:do_SUBST

2013-08-07 Thread Jürgen Urban
> PR 58079 is about the do_SUBST assert: > > /* Sanity check that we're replacing oldval with a CONST_INT >that is a valid sign-extension for the original mode. */ > gcc_assert (INTVAL (newval) > == trunc_int_for_mode (INTVAL (newval), GET_MODE (oldval))); > >

Aw: Re: [MIPS r5900] libgcc floating point fixes

2014-07-18 Thread Jürgen Urban
Hello Richard, > "Jürgen Urban" writes: > > The problem happens with the r5900 hard float configurations, e.g.: > > configure --target=mipsel-linux-gnu --with-float=hard --with-fpu=single > > --with-arch=r5900 > > I created the attached patch which fixes t

RE: Re: [MIPS r5900] libgcc floating point fixes

2014-07-20 Thread Jürgen Urban
> "Jürgen Urban" writes: > > Hello Richard, > > > > > "Jürgen Urban" writes: > > > > The problem happens with the r5900 hard float configurations, e.g.: > > > > configure --target=mipsel-linux-gnu --with-float=hard --with-fpu=s

Aw: RE: Re: [MIPS r5900] libgcc floating point fixes

2014-07-27 Thread Jürgen Urban
> "Jürgen Urban" writes: > > > "Jürgen Urban" writes: > > > > Hello Richard, > > > > > > > > > "Jürgen Urban" writes: > > > Is this something you > > > have recently developed outside of the mai

Aw: RE: RE: Re: [MIPS r5900] libgcc floating point fixes

2014-08-03 Thread Jürgen Urban
Hello, > > > > Fixes for high level libraries should also be > > > > high level (dmult vs __FLT_MAX_EXP__); i.e. there should be no change in > > a > > > > different package which is specific for MIPS. The type double should > > stay > > > > double and is handled without a problem when the FPU is

Support for MIPS r5900

2013-01-06 Thread Jürgen Urban
some code uses also the 32 bit FPU and FPU registers are not available with "-msoft-float" in inline assembler. What is the best way to change the alignment to 128 bit for all structures and stack in any MIPS ABI? Much old code for the Playstation 2 expects this. Best regards Jürgen

Re: Support for MIPS r5900

2013-01-08 Thread Jürgen Urban
Hello Richard, > > cvt.w.s is replaced by trunc.w.s. This seems to work. > > Probably showing my ignorance, but I couldn't see this in the patch. trunc.w.s is enabled by ISA_HAS_TRUNC_W_S. This automatically disables cvt.w.s, because trunc.w.s is preferred. > > I disabled 64 bit FPU instructio

Re: Support for MIPS r5900

2013-01-08 Thread Jürgen Urban
Hello Maciej, > > > ll, sc, dmult, ddiv, cvt.w.s, 64 bit FPU instructions. > > > ll and sc is disabled with "-mno-llsc" and works. > > > cvt.w.s is replaced by trunc.w.s. This seems to work. > > > > Probably showing my ignorance, but I couldn't see this in the patch. > > This has raised my atte

Re: Support for MIPS r5900

2013-01-08 Thread Jürgen Urban
> > IIRC we defined doubles as 32bits wide in our old port. We simply > > didn't support 64bit wide doubles. I don't remember what mechanism we > > used to make this happen. > > Ah, yeah. I think limiting wide doubles would be good. > >>> I tried to disable dmult and ddiv (see mips.md). Disa

Re: Support for MIPS r5900

2013-01-10 Thread Jürgen Urban
Hello Jeff, > If you're using something from the Cygnus port, then it would be covered > by the blanket copyright assignment Cygnus had in place with the FSF. > If there are any doubts about the origin of a hunk of GCC code I could > probably pull out the old sources to determine if it came fro

Re: Support for MIPS r5900

2013-01-13 Thread Jürgen Urban
Hello Maciej, > Now if that failed for you, then it's a plain bug in GAS that should be > fixed. Can you therefore check whether a piece like: > > .setmips2 > ll $2, ($3) > > assembles correctly with -march=r5900? This seems to work. I didn't know that this would work. I

Re: Support for MIPS r5900

2013-01-17 Thread Jürgen Urban
Hello Maciej, > > > Please note that the issue of LLD and SCD remains open -- these > > > instructions are a part of the base MIPS III 64-bit ISA and therefore > they > > > are assumed by glibc and elsewhere to be present, and they are not > > > emulated by Linux. So not only you'll have to fi

Re: Support for MIPS r5900

2013-01-20 Thread Jürgen Urban
Hello Maciej, > > I tested the calculation with the type "float". > > ABI o32 with -mhard-float and -msingle-float produces the following > results: > > 1.00 (0x3f80) / 0.00 (0x) = nan (0x7fff) > > 0.00 (0x) / 0.00 (0x) = nan (0x7fff) > > 0.0