> -----Original Message----- > From: Anton Johansson > Sent: Friday, December 17, 2021 2:01 AM > To: qemu-devel@nongnu.org > Cc: ale@rev.ng; Taylor Simpson ; Brian Cain > ; 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 > > Signed-off-by: Alessandro Di Federico > Signed-off-by: Paolo Montesel > Signed-off-by: Anton Johansson > --- > 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; }