Re: [PATCH v3] md/define_c_enum: support value assignation

2021-09-02 Thread YunQiang Su
Andrew Pinski via Gcc-patches 于2021年9月2日周四 上午5:28写道: > > On Tue, Aug 31, 2021 at 4:22 AM 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_e

Re: [PATCH v3] md/define_c_enum: support value assignation

2021-09-01 Thread Andrew Pinski via Gcc-patches
On Tue, Aug 31, 2021 at 4:22 AM 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

Re: [PATCH v3] md/define_c_enum: support value assignation

2021-09-01 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 { > MIP