qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] Hexagon (target/hexagon) Additional instructions handled


From: Anton Johansson
Subject: Re: [PATCH v2] Hexagon (target/hexagon) Additional instructions handled by idef-parser
Date: Fri, 28 Apr 2023 18:25:18 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0


On 4/26/23 19:32, Taylor Simpson wrote:
**** Changes in v2 ****
Fix bug in imm_print identified in clang build

Currently, idef-parser skips all floating point instructions.  However,
there are some floating point instructions that can be handled.

The following instructions are now parsed
     F2_sfimm_p
     F2_sfimm_n
     F2_dfimm_p
     F2_dfimm_n
     F2_dfmpyll
     F2_dfmpylh

To make these instructions work, we fix some bugs in parser-helpers.c
     gen_rvalue_extend
     gen_cast_op
     imm_print

Test cases added to tests/tcg/hexagon/fpstuff.c

Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
---
  target/hexagon/idef-parser/parser-helpers.h |  2 +-
  target/hexagon/idef-parser/parser-helpers.c | 37 ++++++++++----
  tests/tcg/hexagon/fpstuff.c                 | 54 +++++++++++++++++++++
  target/hexagon/gen_idef_parser_funcs.py     | 10 +++-
  4 files changed, 91 insertions(+), 12 deletions(-)

I'm getting a harness failure on

    v65_Q6_R_mpy_RR_rnd.c

I'll take a deeper look at this next week.

diff:

 Intrinsic: ----------- Test Result Summary ---------- Word32 Q6_R_mpy_RR_rnd(Word32 Rs, Word32 Rt)
-40000000 :  Q6_R_mpy_RR_rnd(INT32_MIN,INT32_MIN)
-1 :  Q6_R_mpy_RR_rnd(-1,INT32_MIN)
-0 :  Q6_R_mpy_RR_rnd(0,INT32_MIN)
-0 :  Q6_R_mpy_RR_rnd(1,INT32_MIN)
-c0000001 :  Q6_R_mpy_RR_rnd(INT32_MAX,INT32_MIN)
-1 :  Q6_R_mpy_RR_rnd(INT32_MIN,-1)
-0 :  Q6_R_mpy_RR_rnd(-1,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)
+ffffffff :  Q6_R_mpy_RR_rnd(1,0)
+ffffffff :  Q6_R_mpy_RR_rnd(INT32_MAX,0)
+ffffffff :  Q6_R_mpy_RR_rnd(INT32_MIN,1)
+ffffffff :  Q6_R_mpy_RR_rnd(-1,1)
+ffffffff :  Q6_R_mpy_RR_rnd(0,1)
+ffffffff :  Q6_R_mpy_RR_rnd(1,1)
+ffffffff :  Q6_R_mpy_RR_rnd(INT32_MAX,1)
+c0000000 :  Q6_R_mpy_RR_rnd(INT32_MIN,INT32_MAX)
+ffffffff :  Q6_R_mpy_RR_rnd(-1,INT32_MAX)
+ffffffff :  Q6_R_mpy_RR_rnd(0,INT32_MAX)
+ffffffff :  Q6_R_mpy_RR_rnd(1,INT32_MAX)
+3ffffffe :  Q6_R_mpy_RR_rnd(INT32_MAX,INT32_MAX)

--
Anton Johansson,
rev.ng Labs Srl.




reply via email to

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