qemu-devel
[Top][All Lists]
Advanced

[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; }

Attachment: satub_vaddubs.c
Description: satub_vaddubs.c


reply via email to

[Prev in Thread] Current Thread [Next in Thread]