Re: [PATCH 06/57] rs6000: Add helper functions for parsing

2021-06-01 Thread Bill Schmidt via Gcc-patches
On 5/21/21 6:43 PM, Segher Boessenkool wrote: Yes, wrappers is a no-go. But you could just have added the features you need to the generic code? Was there a technical reason not to do that? It sounds useful in many places, not just here. I agree it would be nice if all the gen* tools had

Re: [PATCH 06/57] rs6000: Add helper functions for parsing

2021-05-24 Thread Segher Boessenkool
On Mon, May 24, 2021 at 12:37:30AM +0200, Bernhard Reutner-Fischer wrote: > On 21 May 2021 22:56:09 CEST, Bill Schmidt via Gcc-patches > wrote: > >>> + char *buf = (char *) malloc (lastpos - pos + 2); > >>> + memcpy (buf, [pos], lastpos - pos + 1); > >>> + buf[lastpos - pos + 1] = '\0'; >

Re: [PATCH 06/57] rs6000: Add helper functions for parsing

2021-05-23 Thread Bernhard Reutner-Fischer via Gcc-patches
On 21 May 2021 22:56:09 CEST, Bill Schmidt via Gcc-patches wrote: >>> + if (lastpos < pos) >>> +return 0; >>> + >>> + char *buf = (char *) malloc (lastpos - pos + 2); >>> + memcpy (buf, [pos], lastpos - pos + 1); >>> + buf[lastpos - pos + 1] = '\0'; >>> + >>> + pos = lastpos + 1; >>> +

Re: [PATCH 06/57] rs6000: Add helper functions for parsing

2021-05-21 Thread Segher Boessenkool
Hi! On Fri, May 21, 2021 at 03:56:09PM -0500, Bill Schmidt wrote: > On 5/21/21 1:51 PM, Segher Boessenkool wrote: > >>+/* Exit codes for the shell. */ > >>+enum exit_codes { > >>+ EC_INTERR > >>+}; > >Please define this with some specified value (so append " = 1" or such), > >or just write

Re: [PATCH 06/57] rs6000: Add helper functions for parsing

2021-05-21 Thread Bill Schmidt via Gcc-patches
On 5/21/21 1:51 PM, Segher Boessenkool wrote: Hi! On Tue, Apr 27, 2021 at 10:32:41AM -0500, Bill Schmidt via Gcc-patches wrote: +/* Used as a sentinel for range constraints on integer fields. No field can + be 32 bits wide, so this is a safe sentinel value. */ +#define MININT INT32_MIN

Re: [PATCH 06/57] rs6000: Add helper functions for parsing

2021-05-21 Thread Segher Boessenkool
Hi! On Tue, Apr 27, 2021 at 10:32:41AM -0500, Bill Schmidt via Gcc-patches wrote: > +/* Used as a sentinel for range constraints on integer fields. No field can > + be 32 bits wide, so this is a safe sentinel value. */ > +#define MININT INT32_MIN INT32_MIN is for value of type int32_t. You