Re: [PATCH v8 35/35] Add Dockerfile for hexagon

2021-02-17 Thread Alessandro Di Federico via
On Sun, 14 Feb 2021 19:50:41 +0100 Philippe Mathieu-Daudé wrote: > Hi Alessandro! Hi Philippe! > I had to add this to build your image with QEMU build system: > > -- >8 -- > > diff --git a/tests/docker/Makefile.include > b/tests/docker/Makefile.include index 93b29ad823e..ba73fb4b1f0 100644 >

[RFC PATCH 05/10] target/hexagon: expose next PC in DisasContext

2021-02-11 Thread Alessandro Di Federico via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico --- target/hexagon/translate.c | 4 +++- target/hexagon/translate.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/target/hexagon/translate.c b/target/hexagon/translate.c index eeaad5f8ba..a59db485a3 100644 --- a/t

[RFC PATCH 10/10] target/hexagon: import additional tests

2021-02-11 Thread Alessandro Di Federico via
From: Niccolò Izzo Signed-off-by: Alessandro Di Federico --- tests/tcg/hexagon/Makefile.target | 35 - tests/tcg/hexagon/crt.S| 28 + tests/tcg/hexagon/first.S | 24 ++-- tests/tcg/hexagon/test_abs.S | 20 ++ tests/tcg/hexa

[RFC PATCH 03/10] target/hexagon: make helper functions non-static

2021-02-11 Thread Alessandro Di Federico via
From: Paolo Montesel Move certain helper functions required by code generated by the idef-parser available outside genptr.c, moving them into macros.h. This patch also introduces the gen_cancel and gen_fbrev helper which will be used by idef-parser. Signed-off-by: Alessandro Di Federico --- t

[RFC PATCH 04/10] target/hexagon: introduce new helper functions

2021-02-11 Thread Alessandro Di Federico via
From: Niccolò Izzo These helpers will be employed by the idef-parser generated code. Signed-off-by: Alessandro Di Federico --- target/hexagon/genptr.c | 224 target/hexagon/genptr.h | 19 2 files changed, 243 insertions(+) diff --git a/target/hex

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

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

[RFC PATCH 02/10] target/hexagon: import README for idef-parser

2021-02-11 Thread Alessandro Di Federico via
From: Alessandro Di Federico Signed-off-by: Alessandro Di Federico --- target/hexagon/README | 5 + target/hexagon/idef-parser/README.rst | 446 ++ 2 files changed, 451 insertions(+) create mode 100644 target/hexagon/idef-parser/README.rst diff --git

[RFC PATCH 07/10] target/hexagon: import lexer for idef-parser

2021-02-11 Thread Alessandro Di Federico via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico --- target/hexagon/idef-parser/idef-lexer.lex | 648 ++ target/hexagon/idef-parser/idef-parser.h | 245 target/hexagon/meson.build| 4 + 3 files changed, 897 insertions(+) create mode 100

[RFC PATCH 06/10] target/hexagon: prepare input for the idef-parser

2021-02-11 Thread Alessandro Di Federico via
From: Alessandro Di Federico Introduce infrastructure necessary to produce a file suitable for being parsed by the idef-parser. Signed-off-by: Alessandro Di Federico --- target/hexagon/gen_idef_parser_funcs.py | 114 target/hexagon/idef-parser/macros.inc | 166 ++

[RFC PATCH 01/10] target/hexagon: update MAINTAINERS for idef-parser

2021-02-11 Thread Alessandro Di Federico via
From: Alessandro Di Federico Signed-off-by: Alessandro Di Federico --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 41300089b2..029f96d3bc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -192,11 +192,19 @@ Hexagon TCG CPUs M: Taylor Simp

[RFC PATCH 00/10] target/hexagon: introduce idef-parser

2021-02-11 Thread Alessandro Di Federico via
From: Alessandro Di Federico This patchset introduces the idef-parser for target/hexagon. It is based on "[PATCH v8 00/35] Hexagon patch series". `idef-parser` is a build-time tool built using flex and bison. Its aim is to generate a large part of the tiny code generator frontend for Hexagon. Th

[RFC PATCH 09/10] target/hexagon: call idef-parser functions

2021-02-11 Thread Alessandro Di Federico via
From: Alessandro Di Federico Extend gen_tcg_funcs.py in order to emit calls to the functions emitted by the idef-parser, if available. Signed-off-by: Alessandro Di Federico --- target/hexagon/gen_tcg_funcs.py | 28 ++-- target/hexagon/hex_common.py | 10

Re: [PATCH v6 34/35] Auto-import Docker support files

2021-01-12 Thread Alessandro Di Federico via
On Tue, 12 Jan 2021 11:58:30 + Alex Bennée wrote: > > -for filename in args.extra_files or []: > > +extra_files = args.extra_files or [] > > +extra_files += glob(basename + ".*") > > +for filename in extra_files: > > Hmm not so sure about thi

Re: [RFC PATCH v5 20/33] Hexagon (target/hexagon) generator phase 2 - generate header files

2020-11-21 Thread Alessandro Di Federico via
On Thu, 29 Oct 2020 19:08:26 -0500 Taylor Simpson wrote: > +def genptr_decl_new(f,regtype,regid,regno): > +if (regtype == "N"): > +if (regid in {"s", "t"}): > +f.write("const int %s%sX = insn->regno[%d];\n" % \ > +(regtype, regid, regno)) > +

Re: [RFC PATCH v5 20/33] Hexagon (target/hexagon) generator phase 2 - generate header files

2020-11-19 Thread Alessandro Di Federico via
On Thu, 29 Oct 2020 19:08:26 -0500 Taylor Simpson wrote: > +from hex_common import * I'd suggest to avoid `import *`. See: python -c 'import this' | sed -n '4p' -- Alessandro Di Federico rev.ng

Re: [RFC PATCH v5 18/33] Hexagon (target/hexagon/imported) arch import

2020-11-19 Thread Alessandro Di Federico via
On Thu, 29 Oct 2020 19:08:24 -0500 Taylor Simpson wrote: > +Q6INSN(C2_any8,"Pd4=any8(Ps4)",ATTRIBS(A_CRSLOT23), > +"Logical ANY of low 8 predicate bits", > +{ PsV ? (PdV=0xff) : (PdV=0x00); }) I understand these files are supposed to stay unchanged, but handling assignments as expressions as opp

Re: [RFC PATCH v5 22/33] Hexagon (target/hexagon) generater phase 4 - decode tree

2020-11-19 Thread Alessandro Di Federico via
On Thu, 29 Oct 2020 19:08:28 -0500 Taylor Simpson wrote: > +if __name__ == '__main__': > +f = io.StringIO() > +print_tree(f, dectree_normal) > +print_tree(f, dectree_16bit) > +if subinsn_groupings: > +print_tree(f, dectree_subinsn_groupings) > +for (name, dectree_subin

<    1   2