Re: Adjust LTO mode tables for "Machine_Mode: Extend machine_mode from 8 to 16 bits" (was: [PATCH] Machine_Mode: Extend machine_mode from 8 to 16 bits)

2023-07-04 Thread Thomas Schwinge
Hi Jakub! On 2023-06-30T18:37:59+0200, Jakub Jelinek wrote: > On Fri, Jun 30, 2023 at 08:45:38PM +0800, Kito Cheng wrote: >> Hmmm, I think maybe what we need is to leverage C++ language features >> to declare enum with underlying types like that: >> >> enum machine_mode : uint16_t > > What would

Re: Adjust LTO mode tables for "Machine_Mode: Extend machine_mode from 8 to 16 bits" (was: [PATCH] Machine_Mode: Extend machine_mode from 8 to 16 bits)

2023-06-30 Thread Jakub Jelinek via Gcc-patches
On Fri, Jun 30, 2023 at 08:45:38PM +0800, Kito Cheng wrote: > Hmmm, I think maybe what we need is to leverage C++ language features > to declare enum with underlying types like that: > > enum machine_mode : uint16_t What would be the advantage of doing that? I mean, on most hosts using unsigned r

Re: Adjust LTO mode tables for "Machine_Mode: Extend machine_mode from 8 to 16 bits" (was: [PATCH] Machine_Mode: Extend machine_mode from 8 to 16 bits)

2023-06-30 Thread Thomas Schwinge
Hi! On 2023-06-30T20:45:38+0800, Kito Cheng wrote: >> On 2023-05-13T16:44:41+0800, Kito Cheng via Gcc-patches >> wrote: >> > Tried this patch and I ran into some issues, some variables are using >> > unsigned char to hold machine mode and will have problems when the >> > number of modes is larg

Re: Adjust LTO mode tables for "Machine_Mode: Extend machine_mode from 8 to 16 bits" (was: [PATCH] Machine_Mode: Extend machine_mode from 8 to 16 bits)

2023-06-30 Thread Kito Cheng via Gcc-patches
> On 2023-05-13T16:44:41+0800, Kito Cheng via Gcc-patches > wrote: > > Tried this patch and I ran into some issues, some variables are using > > unsigned char to hold machine mode and will have problems when the > > number of modes is larger than 255... > > > > And here is the fix: > > > --- a/gc

Adjust LTO mode tables for "Machine_Mode: Extend machine_mode from 8 to 16 bits" (was: [PATCH] Machine_Mode: Extend machine_mode from 8 to 16 bits)

2023-06-30 Thread Thomas Schwinge
Hi! On 2023-05-13T16:44:41+0800, Kito Cheng via Gcc-patches wrote: > Tried this patch and I ran into some issues, some variables are using > unsigned char to hold machine mode and will have problems when the > number of modes is larger than 255... > > And here is the fix: > --- a/gcc/genmodes.c