Hi, On 27 Aug 2015, at 16:58, David Sherwood <david.sherw...@arm.com> wrote:
> Hi Oleg, > > Oh I'm so sorry I broke the build - I should have spotted that. Have you > already checked in this fix or do you want me to? No, I haven't committed the patch. Please do so if it's OK. Cheers, Oleg >> -----Original Message----- >> From: Oleg Endo [mailto:oleg.e...@t-online.de] >> Sent: 26 August 2015 15:53 >> To: Jeff Law >> Cc: David Sherwood; GCC Patches >> Subject: Re: [PATCH][4/N] Introduce new inline functions for >> GET_MODE_UNIT_SIZE and >> GET_MODE_UNIT_PRECISION >> >> >> On 26 Aug 2015, at 23:27, Oleg Endo <oleg.e...@t-online.de> wrote: >> >>> >>> On 19 Aug 2015, at 22:35, Jeff Law <l...@redhat.com> wrote: >>> >>>> On 08/19/2015 06:29 AM, David Sherwood wrote: >>>>>> I asked Richard S. to give this a once-over which he did. However, he >>>>>> technically can't approve due to the way his maintainership position was >>>>>> worded. >>>>>> >>>>>> The one request would be a function comment for emit_mode_unit_size and >>>>>> emit_mode_unit_precision. OK with that change. >>>>> Thanks. Here's a new patch with the comments added. >>>>> >>>>> Good to go? >>>>> David. >>>>> >>>>> ChangeLog: >>>>> >>>>> 2015-08-19 David Sherwood <david.sherw...@arm.com> >>>>> >>>>> gcc/ >>>>> * genmodes.c (emit_mode_unit_size_inline): New function. >>>>> (emit_mode_unit_precision_inline): New function. >>>>> (emit_insn_modes_h): Emit new #define. Emit new functions. >>>>> (emit_mode_unit_size): New function. >>>>> (emit_mode_unit_precision): New function. >>>>> (emit_mode_adjustments): Add mode_unit_size adjustments. >>>>> (emit_insn_modes_c): Emit new arrays. >>>>> * machmode.h (GET_MODE_UNIT_SIZE, GET_MODE_UNIT_PRECISION): Update to >>>>> use new inline methods. >>>> >>>> Thanks, this is OK for the trunk. >>> >>> It seems this broke sh-elf, at least when compiling on OSX with its native >>> clang. >>> >>> ../../gcc-trunk/gcc/machmode.h:228:43: error: redefinition of >>> 'mode_unit_size' with a different > type: >>> 'const unsigned char [56]' vs 'unsigned char [56]' >>> extern CONST_MODE_UNIT_SIZE unsigned char mode_unit_size[NUM_MACHINE_MODES]; >>> ^ >>> ./insn-modes.h:417:24: note: previous definition is here >>> extern unsigned char mode_unit_size[NUM_MACHINE_MODES]; >>> ^ >> >> This following fixes the problem for me: >> >> Index: gcc/genmodes.c >> =================================================================== >> --- gcc/genmodes.c (revision 227221) >> +++ gcc/genmodes.c (working copy) >> @@ -1063,7 +1063,7 @@ >> unsigned char\n\ >> mode_unit_size_inline (machine_mode mode)\n\ >> {\n\ >> - extern unsigned char mode_unit_size[NUM_MACHINE_MODES];\n\ >> + extern CONST_MODE_UNIT_SIZE unsigned char >> mode_unit_size[NUM_MACHINE_MODES];\n\ >> switch (mode)\n\ >> {"); >> >> >> Cheers, >> Oleg > > >