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 the moment.

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 32 bit in ABI

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

2014-07-27 Thread Jürgen Urban
Jürgen Urban juergenur...@gmx.dewrites: Jürgen Urban juergenur...@gmx.de writes: Hello Richard, Jürgen Urban juergenur...@gmx.de writes: Is this something you have recently developed outside of the mainline kernel or does it already exist. I'm not aware of such logic

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

2014-07-20 Thread Jürgen Urban
Jürgen Urban juergenur...@gmx.de writes: Hello Richard, Jürgen Urban juergenur...@gmx.de 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

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

2014-07-18 Thread Jürgen Urban
Hello Richard, Jürgen Urban juergenur...@gmx.de 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 this problem for r5900

Aw: [MIPS r5900] libgcc floating point fixes

2014-06-24 Thread Jürgen Urban
Please don't ignore this, support for MIPS r5900 was already ignored for ~10 years. Just apply the patch when you don't know what I am talking about. The fix for mips16 is very important. The patch has impact only on MIPS r5900. Gesendet: Sonntag, 15. Juni 2014 um 22:08 Uhr Von: Jürgen Urban

[MIPS r5900] libgcc floating point fixes

2014-06-15 Thread Jürgen Urban
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 +0100 +++ gcc-4.9.0-patched/libgcc/config/t-hardfp-sf 2014-05-07 00:14:27.093320928

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: [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 juergenur...@gmx.de writes: Index: gcc/config.gcc === --- gcc/config.gcc (Revision 200583) +++ gcc/config.gcc

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

2013-07-08 Thread Jürgen Urban
Hello, Jürgen Urban juergenur...@gmx.de writes: Jürgen Urban juergenur...@gmx.de 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. Thanks. Are there any real differences

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 juergenur...@gmx.de 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. Thanks. Are there any real

[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 problem

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 rdsandif...@googlemail.com: Jürgen Urban juergenur...@gmx.de writes: Am 23.06.2013 um 22:21 schrieb Richard Sandiford rdsandif...@googlemail.com: In the native PS2SDK (i.e. no Linux) I detected that there are undefined

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 rdsandif...@googlemail.com: Jürgen Urban juergenur...@gmx.de writes: In the native PS2SDK (i.e. no Linux) I detected that there are undefined references to `__fixtfsi', `__floatsitf', `__subtf3', `__multf3', __extenddftf2

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 are

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 header

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.4). The attached patch

[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 patch fixes

Re: [PATCH] Basic support for MIPS r5900

2013-06-14 Thread Jürgen Urban
Hello Richard, I updated the patch as requested. Richard Sandiford rdsandif...@googlemail.com 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.

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; i.e.

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

[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

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.00

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 fix up glibc

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-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 from

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 instructions by

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 attention -- AFAICS

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). Disabling

Support for MIPS r5900

2013-01-06 Thread Jürgen Urban
-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 Urban diff -Nurp '--exclude=build01' ../gcc-svn-20130105.orig/config.sub gcc-svn-20130105