Re: [LEDE-DEV] [PATCH] gcc: 7.2: remove mips patch causing broken code

2017-12-19 Thread Hauke Mehrtens
On 12/19/2017 12:01 AM, Hauke Mehrtens wrote: > On 12/18/2017 11:38 PM, Hauke Mehrtens wrote: >> On 12/18/2017 03:07 PM, Kevin Darbyshire-Bryant wrote: >>> >>> On 18 Dec 2017, at 10:12, Felix Fietkau wrote: On 2017-12-18 11:07, Kevin Darbyshire-Bryant wrote: > Hi Felix, > >>

Re: [LEDE-DEV] [PATCH] gcc: 7.2: remove mips patch causing broken code

2017-12-18 Thread Hauke Mehrtens
On 12/18/2017 11:38 PM, Hauke Mehrtens wrote: > On 12/18/2017 03:07 PM, Kevin Darbyshire-Bryant wrote: >> >> >>> On 18 Dec 2017, at 10:12, Felix Fietkau wrote: >>> >>> On 2017-12-18 11:07, Kevin Darbyshire-Bryant wrote: Hi Felix, Thanks for explaining that. I suspect you’re right t

Re: [LEDE-DEV] [PATCH] gcc: 7.2: remove mips patch causing broken code

2017-12-18 Thread Hauke Mehrtens
On 12/18/2017 03:07 PM, Kevin Darbyshire-Bryant wrote: > > >> On 18 Dec 2017, at 10:12, Felix Fietkau wrote: >> >> On 2017-12-18 11:07, Kevin Darbyshire-Bryant wrote: >>> Hi Felix, >>> >>> Thanks for explaining that. I suspect you’re right that there’s an >>> underlying bug in gcc mips. So id

Re: [LEDE-DEV] [PATCH] gcc: 7.2: remove mips patch causing broken code

2017-12-18 Thread Hauke Mehrtens
On 12/18/2017 10:34 AM, Syrone Wong wrote: > I agree with Felix. I found libtommath issue in dropbear several > months before. I can confirm the issue fixed by upgrading libtommath > and libtomcrypt. The update is already done by upstream, but not > released yet. With this patch libtommath will be

Re: [LEDE-DEV] [PATCH] gcc: 7.2: remove mips patch causing broken code

2017-12-18 Thread Kevin Darbyshire-Bryant
> On 18 Dec 2017, at 10:12, Felix Fietkau wrote: > > On 2017-12-18 11:07, Kevin Darbyshire-Bryant wrote: >> Hi Felix, >> >> Thanks for explaining that. I suspect you’re right that there’s an >> underlying bug in gcc mips. So ideally we need some code that exposes the >> bug when using -O2

Re: [LEDE-DEV] [PATCH] gcc: 7.2: remove mips patch causing broken code

2017-12-18 Thread Felix Fietkau
On 2017-12-18 11:07, Kevin Darbyshire-Bryant wrote: > Hi Felix, > > Thanks for explaining that. I suspect you’re right that there’s an > underlying bug in gcc mips. So ideally we need some code that exposes the > bug when using -O2 (or even just -funroll_loops) Looking at FS 814 there’s a > h

Re: [LEDE-DEV] [PATCH] gcc: 7.2: remove mips patch causing broken code

2017-12-18 Thread Kevin Darbyshire-Bryant
> On 18 Dec 2017, at 08:40, Felix Fietkau wrote: > > On 2017-12-17 22:21, Hauke Mehrtens wrote: >> This patch made GCC produce broken code, remove it. >> In mp_cmp_d() function in th libtommath shipped with dropbear the >> following code was compiled wrong: >> >> /* compare based on magnitude

Re: [LEDE-DEV] [PATCH] gcc: 7.2: remove mips patch causing broken code

2017-12-18 Thread Syrone Wong
I agree with Felix. I found libtommath issue in dropbear several months before. I can confirm the issue fixed by upgrading libtommath and libtomcrypt. The update is already done by upstream, but not released yet. You can try a CI-successfully-built commit from https://github.com/mkj/dropbear and s

Re: [LEDE-DEV] [PATCH] gcc: 7.2: remove mips patch causing broken code

2017-12-18 Thread Felix Fietkau
On 2017-12-17 22:21, Hauke Mehrtens wrote: > This patch made GCC produce broken code, remove it. > In mp_cmp_d() function in th libtommath shipped with dropbear the > following code was compiled wrong: > > /* compare based on magnitude */ > if (a->used > 1) { > return 1; > } > > In the broken A

Re: [LEDE-DEV] [PATCH] gcc: 7.2: remove mips patch causing broken code

2017-12-17 Thread Kevin Darbyshire-Bryant
> On 17 Dec 2017, at 21:21, Hauke Mehrtens wrote: > > This patch made GCC produce broken code, remove it. > In mp_cmp_d() function in th libtommath shipped with dropbear the > following code was compiled wrong: > > /* compare based on magnitude */ > if (a->used > 1) { > return 1; > } > > In

Re: [LEDE-DEV] [PATCH] gcc: 7.2: remove mips patch causing broken code

2017-12-17 Thread Hauke Mehrtens
On 12/17/2017 10:21 PM, Hauke Mehrtens wrote: > This patch made GCC produce broken code, remove it. > In mp_cmp_d() function in th libtommath shipped with dropbear the > following code was compiled wrong: > > /* compare based on magnitude */ > if (a->used > 1) { > return 1; > } > > In the broke

[LEDE-DEV] [PATCH] gcc: 7.2: remove mips patch causing broken code

2017-12-17 Thread Hauke Mehrtens
This patch made GCC produce broken code, remove it. In mp_cmp_d() function in th libtommath shipped with dropbear the following code was compiled wrong: /* compare based on magnitude */ if (a->used > 1) { return 1; } In the broken ASM this part returned -1 like the previous return statement did