Re: [PATCH v2 08/10] target/hexagon: import parser for idef-parser

2021-03-23 Thread Paolo Montesel via
Thanks for the feedback, it helped us improve the implementation quite a bit. > > +| rvalue QMARK rvalue COLON rvalue > > +{ > > +@1.last_column = @5.last_column; > > +bool is_64bit = ($3.bit_width == 64) || ($5.bit_width == 64); > > +int bit_width = (is_64bit) ? 64 : 32; > > +if

Re: [PATCH v2 08/10] target/hexagon: import parser for idef-parser

2021-03-01 Thread Alessandro Di Federico via
On Thu, 25 Feb 2021 19:30:14 -0800 Richard Henderson wrote: > > +} > > +} > > +code > > +{ > > +if (c->inst.error_count != 0) { > > +fprintf(stderr, > > +"Parsing of instruction %s generated %d errors!\n", > > +c->inst.name, > > +

Re: [PATCH v2 08/10] target/hexagon: import parser for idef-parser

2021-02-25 Thread Richard Henderson
On 2/25/21 7:18 AM, Alessandro Di Federico wrote: > +instructions : instruction instructions > +| %empty > +; I have never seen bison written flush-left like this, and I find it really hard to read, especially with some of the larger non-terminals. I'm also not a fan of large blocks of code

[PATCH v2 08/10] target/hexagon: import parser for idef-parser

2021-02-25 Thread Alessandro Di Federico via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel --- target/hexagon/idef-parser/idef-parser.y | 1250 +++ target/hexagon/idef-parser/parser-helpers.c | 1925 + target/hexagon/idef-parser/parser-helpers.h | 293 +++