[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v7 09/13] target/hexagon: import lexer for idef-parser
From: |
Taylor Simpson |
Subject: |
RE: [PATCH v7 09/13] target/hexagon: import lexer for idef-parser |
Date: |
Tue, 21 Dec 2021 18:48:20 +0000 |
> -----Original Message-----
> From: Anton Johansson <anjo@rev.ng>
> Sent: Friday, December 17, 2021 2:01 AM
> To: qemu-devel@nongnu.org
> Cc: ale@rev.ng; Taylor Simpson <tsimpson@quicinc.com>; Brian Cain
> <bcain@quicinc.com>; babush@rev.ng; nizzo@rev.ng;
> richard.henderson@linaro.org
> Subject: [PATCH v7 09/13] target/hexagon: import lexer for idef-parser
>
> From: Paolo Montesel <babush@rev.ng>
>
> Signed-off-by: Alessandro Di Federico <ale@rev.ng>
> Signed-off-by: Paolo Montesel <babush@rev.ng>
> Signed-off-by: Anton Johansson <anjo@rev.ng>
> ---
> target/hexagon/idef-parser/idef-parser.h | 259 ++++++++++
> target/hexagon/idef-parser/idef-parser.lex | 571
> +++++++++++++++++++++
> target/hexagon/meson.build | 4 +
> 3 files changed, 834 insertions(+)
> create mode 100644 target/hexagon/idef-parser/idef-parser.h
> create mode 100644 target/hexagon/idef-parser/idef-parser.lex
>
> diff --git a/target/hexagon/idef-parser/idef-parser.lex
> b/target/hexagon/idef-parser/idef-parser.lex
> new file mode 100644
> index 0000000000..c7466c47f4
> --- /dev/null
> +++ b/target/hexagon/idef-parser/idef-parser.lex
> +"fSATN" { yylval->sat.set_overflow = true;
> + yylval->sat.signedness = SIGNED;
> + return SAT; }
> +"fVSATN" { yylval->sat.set_overflow = false;
> + yylval->sat.signedness = SIGNED;
> + return SAT; }
> +"fSATUN" { yylval->sat.set_overflow = false;
This should be true, just like fSATN. Take a look at the satuh and satub
instructions.
I tried changing it to true to make satuh and satub work. However, the
vaddubs, vadduhs, vsatub, vsatwuh, vsububs, and other instructions don't work.
I've attached a test case that demonstrates this problem.
When the value is set to false, the test case prints
ERROR at line 71: 0x00000000 != 0x00000001
ERROR at line 75: 0x00000000 != 0x00000001
ERROR at line 106: 0x00000000 != 0x00000001
FAIL
When the value is set to true, the test case prints
ERROR at line 105: 0x000000000000007f != 0x00000000000000ff
ERROR at line 106: 0x00000000 != 0x00000001
FAIL
Without your changes, the test case prints
PASS
> + yylval->sat.signedness = UNSIGNED;
> + return SAT; }
satub_vaddubs.c
Description: satub_vaddubs.c
- [PATCH v7 00/13] target/hexagon: introduce idef-parser, Anton Johansson, 2021/12/17
- [PATCH v7 02/13] target/hexagon: import README for idef-parser, Anton Johansson, 2021/12/17
- [PATCH v7 08/13] target/hexagon: import flex/bison to docker files, Anton Johansson, 2021/12/17
- [PATCH v7 09/13] target/hexagon: import lexer for idef-parser, Anton Johansson, 2021/12/17
- RE: [PATCH v7 09/13] target/hexagon: import lexer for idef-parser,
Taylor Simpson <=
- [PATCH v7 04/13] target/hexagon: make helper functions non-static, Anton Johansson, 2021/12/17
- [PATCH v7 03/13] target/hexagon: make slot number an unsigned, Anton Johansson, 2021/12/17
- [PATCH v7 11/13] target/hexagon: call idef-parser functions, Anton Johansson, 2021/12/17
- [PATCH v7 06/13] target/hexagon: expose next PC in DisasContext, Anton Johansson, 2021/12/17
- [PATCH v7 05/13] target/hexagon: introduce new helper functions, Anton Johansson, 2021/12/17
- [PATCH v7 07/13] target/hexagon: prepare input for the idef-parser, Anton Johansson, 2021/12/17