RE: [PATCH] MIPS: Fix generation of DIV.G and MOD.G for Loongson targets.

2017-01-18 Thread Toma Tabacu
> From: Matthew Fortune > > Apart from those changes this looks OK to me. > > Matthew Thanks. Committed as r244570. Regards, Toma

RE: [PATCH] MIPS: Fix generation of DIV.G and MOD.G for Loongson targets.

2017-01-18 Thread Matthew Fortune
Toma Tabacu writes: > Matthew Fortune writes: > > > > Sounds good. I'd prefer to get the testsuite clean first then improve the > > code quality as a later step since it is not a regression and we are > > a few days off stage 4. > > > > In terms of the patch then the ISA_HAS_DIV3 macro is not curr

RE: [PATCH] MIPS: Fix generation of DIV.G and MOD.G for Loongson targets.

2017-01-17 Thread Toma Tabacu
> Maciej Rozycki writes: > > This ought to be handled then, likely by adding Loongson-specific RTL > > insns matching the `divmod4' and `udivmod4' expanders. It > > may be as simple as say (conceptually, untested): > > > > (define_insn "divmod4_loongson" > > [(set (match_operand:GPR 0 "register

RE: [PATCH] MIPS: Fix generation of DIV.G and MOD.G for Loongson targets.

2017-01-17 Thread Matthew Fortune
Maciej Rozycki writes: > On Mon, 16 Jan 2017, Toma Tabacu wrote: > > > After searching through the archives, I have found an interesting bit > > of information about DIV.G/MOD.G in the original submission thread: > > > > > > Ruan Beihong 23 July 2008: > > > > > > > > I've seen the Loongson 2F man

RE: [PATCH] MIPS: Fix generation of DIV.G and MOD.G for Loongson targets.

2017-01-16 Thread Maciej W. Rozycki
On Mon, 16 Jan 2017, Toma Tabacu wrote: > After searching through the archives, I have found an interesting bit of > information about DIV.G/MOD.G in the original submission thread: > > > > Ruan Beihong 23 July 2008: > > > > > > I've seen the Loongson 2F manual carefully. The (d)div(u) is > > >

RE: [PATCH] MIPS: Fix generation of DIV.G and MOD.G for Loongson targets.

2017-01-16 Thread Toma Tabacu
After searching through the archives, I have found an interesting bit of information about DIV.G/MOD.G in the original submission thread: > > Ruan Beihong 23 July 2008: > > > > I've seen the Loongson 2F manual carefully. The (d)div(u) is > > internally splited into one (d)div(u).g and one (d)mod

RE: [PATCH] MIPS: Fix generation of DIV.G and MOD.G for Loongson targets.

2017-01-12 Thread Matthew Fortune
Maciej Rozycki writes: > On Thu, 12 Jan 2017, Toma Tabacu wrote: > > > > > Unfortunately, this interferes with the generation of DIV.G and > > > > MOD.G (the div3 and mod3 patterns) for Loongson > > > > targets, > > > which > > > > causes test failures. > > > > > > What test failures? Details p

RE: [PATCH] MIPS: Fix generation of DIV.G and MOD.G for Loongson targets.

2017-01-12 Thread Maciej W. Rozycki
On Thu, 12 Jan 2017, Toma Tabacu wrote: > > > Unfortunately, this interferes with the generation of DIV.G and MOD.G > > > (the div3 and mod3 patterns) for Loongson targets, > > which > > > causes test failures. > > > > What test failures? Details please. > > > > It's > gcc.target/mips/loongso

RE: [PATCH] MIPS: Fix generation of DIV.G and MOD.G for Loongson targets.

2017-01-12 Thread Toma Tabacu
> Maciej Rozycki writes: > > > > > Unfortunately, this interferes with the generation of DIV.G and MOD.G > > (the div3 and mod3 patterns) for Loongson targets, > which > > causes test failures. > > What test failures? Details please. > It's gcc.target/mips/loongson-muldiv-1.c gcc.target/mips/

Re: [PATCH] MIPS: Fix generation of DIV.G and MOD.G for Loongson targets.

2017-01-11 Thread Maciej W. Rozycki
On Mon, 9 Jan 2017, Toma Tabacu wrote: > The expand_DIVMOD function, introduced in r241660, will pick the divmod4 > (or the udivmod4) pattern when it checks for the presence of hardware > div/mod instructions, which results in the generation of the old DIV > instruction. > > Unfortunately, this i