On 08/26/2015 08:53 AM, Oleg Endo wrote:
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\
{");
OK with the usual testing.
jeff