Re: Please review writeup for fixing PR 78809 (inline strcmp for small constant strings)

2017-11-16 Thread Jakub Jelinek
On Thu, Nov 16, 2017 at 06:14:35PM -0700, Jeff Law wrote: > > However, this routine currently miss a very obvious case as the following: > > > > char s[100] = {'a','b','c','d’}; > > > > __builtin_strcmp(s, "abc") != 0 > > > > So, I have to change this routine to include such common case.   > >

Re: Please review writeup for fixing PR 78809 (inline strcmp for small constant strings)

2017-11-16 Thread Jeff Law
On 11/16/2017 03:39 PM, Qing Zhao wrote: > Hi, Jeff,  > thanks a lot for your comments. please see my reply in below: > > >> On Nov 16, 2017, at 12:47 PM, Jeff Law > > wrote: >> >>> >>>   B. for strncmp (s1, s2, n) (!)= 0 or strcmp (s1, s2) (!)= 0 >>>      if the result is

Re: Please review writeup for fixing PR 78809 (inline strcmp for small constant strings)

2017-11-16 Thread Martin Sebor
On 11/16/2017 03:39 PM, Qing Zhao wrote: Hi, Jeff, thanks a lot for your comments. please see my reply in below: On Nov 16, 2017, at 12:47 PM, Jeff Law wrote: B. for strncmp (s1, s2, n) (!)= 0 or strcmp (s1, s2) (!)= 0 if the result is ONLY used to do a simple equality test against

Re: Please review writeup for fixing PR 78809 (inline strcmp for small constant strings)

2017-11-16 Thread Martin Sebor
On 11/03/2017 08:59 AM, Qing Zhao wrote: Hi, This is the first time I am asking for a design review for fixing a GCC enhancement request, Let me know if I need to send this email to other mailing list as well. I have been studying PR 78809 for some time https://gcc.gnu.org/bugzilla/show_bug.c

gcc-7-20171116 is now available

2017-11-16 Thread gccadmin
Snapshot gcc-7-20171116 is now available on ftp://gcc.gnu.org/pub/gcc/snapshots/7-20171116/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 7 SVN branch with the following options: svn://gcc.gnu.org/svn/gcc/branches/gcc-7

Re: Please review writeup for fixing PR 78809 (inline strcmp for small constant strings)

2017-11-16 Thread Qing Zhao
Hi, Jeff, thanks a lot for your comments. please see my reply in below: > On Nov 16, 2017, at 12:47 PM, Jeff Law wrote: > >> >> B. for strncmp (s1, s2, n) (!)= 0 or strcmp (s1, s2) (!)= 0 >> if the result is ONLY used to do a simple equality test against zero, >> one of "s1" or "s2" i

Re: Please review writeup for fixing PR 78809 (inline strcmp for small constant strings)

2017-11-16 Thread Jeff Law
On 11/03/2017 08:59 AM, Qing Zhao wrote: > Hi, > > This is the first time I am asking for a design review for fixing a GCC > enhancement request, Let me know if I need to send this email to other > mailing list as well. > > I have been studying PR 78809 for some time > https://gcc.gnu.org/bugz

Re: Backporting ARC patch to gcc7.x

2017-11-16 Thread Jeff Law
On 11/15/2017 06:49 AM, Claudiu Zissulescu wrote: > Hi, > > I would like to backport patch r250097 to gcc7.x branch. It does changes > libgcc/config.host and gcc/config.gcc for ARC. Do I need to get extra > approvals for it or I just fallow the wiki on this page > (https://gcc.gnu.org/wiki/SvnM

Re: Potential bug on Cortex-M due to used registers/interrupts.

2017-11-16 Thread Kai Ruottu
Vitalijus Jefišovas kirjoitti 16.11.2017 klo 18:54: On Cortex-M mcu’s, when interrupt happens, NVIC copies r0-r3 and couple other registers onto the psp stack, and then jumps to interrupt routine, when it finishes, NVIC restores these registers, and jumps back to user’s function. What is happenin

Re: Potential bug on Cortex-M due to used registers/interrupts.

2017-11-16 Thread Paul.Koning
> On Nov 16, 2017, at 11:54 AM, Vitalijus Jefišovas wrote: > > On Cortex-M mcu’s, when interrupt happens, NVIC copies r0-r3 and couple > other registers onto the psp stack, and then jumps to interrupt routine, > when it finishes, NVIC restores these registers, and jumps back to user’s > functio

Potential bug on Cortex-M due to used registers/interrupts.

2017-11-16 Thread Vitalijus Jefišovas
On Cortex-M mcu’s, when interrupt happens, NVIC copies r0-r3 and couple other registers onto the psp stack, and then jumps to interrupt routine, when it finishes, NVIC restores these registers, and jumps back to user’s function. What is happening under the hood, NVIC only stacks 4 registers, r0, r1