Re: [PATCH 1/3] md/define_c_enum: support value assignation

2021-08-31 Thread Richard Sandiford via Gcc-patches
YunQiang Su writes: > Currently, the enums from define_c_enum and define_enum can only > has values one by one from 0. > > In fact we can support the behaviour just like C, aka like > (define_enum "mips_isa" [mips1=1 mips2 mips32=32 mips32r2]), > then we can get > enum mips_isa { >

Re: [PATCH 1/3] md/define_c_enum: support value assignation

2021-08-28 Thread Xi Ruoyao via Gcc-patches
On Sat, 2021-08-28 at 08:05 -0400, YunQiang Su wrote: > Currently, the enums from define_c_enum and define_enum can only > has values one by one from 0. > > In fact we can support the behaviour just like C, aka like >   (define_enum "mips_isa" [mips1=1 mips2 mips32=32 mips32r2]), > then we can

[PATCH 1/3] md/define_c_enum: support value assignation

2021-08-28 Thread YunQiang Su
Currently, the enums from define_c_enum and define_enum can only has values one by one from 0. In fact we can support the behaviour just like C, aka like (define_enum "mips_isa" [mips1=1 mips2 mips32=32 mips32r2]), then we can get enum mips_isa { MIPS_ISA_MIPS1 = 1, MIPS_ISA_MIPS2 =