summary refs log tree commit diff stats
path: root/target/hexagon/gen_idef_parser_funcs.py
diff options
context:
space:
mode:
authorTaylor Simpson <tsimpson@quicinc.com>2023-04-26 10:32:32 -0700
committerTaylor Simpson <tsimpson@quicinc.com>2023-05-18 12:40:52 -0700
commit163e5fa38e47281f8e83946794f6c202749bff32 (patch)
treee20f354a90bb550325c608867085cc7fc1bd197d /target/hexagon/gen_idef_parser_funcs.py
parent0fc56c437566f15e3fe54b568951eecb3cd68bf3 (diff)
downloadfocaccia-qemu-163e5fa38e47281f8e83946794f6c202749bff32.tar.gz
focaccia-qemu-163e5fa38e47281f8e83946794f6c202749bff32.zip
Hexagon (target/hexagon) Additional instructions handled by idef-parser
**** Changes in v3 ****
Fix bugs exposed by dpmpyss_rnd_s0 instruction
    Set correct size/signedness for constants
    Test cases added to tests/tcg/hexagon/misc.c

**** 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
    lexer properly sets size/signedness of constants

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

Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Tested-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20230501203125.4025991-1-tsimpson@quicinc.com>
Diffstat (limited to 'target/hexagon/gen_idef_parser_funcs.py')
-rw-r--r--target/hexagon/gen_idef_parser_funcs.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/target/hexagon/gen_idef_parser_funcs.py b/target/hexagon/gen_idef_parser_funcs.py
index ad2e5c04d3..639458b462 100644
--- a/target/hexagon/gen_idef_parser_funcs.py
+++ b/target/hexagon/gen_idef_parser_funcs.py
@@ -103,7 +103,15 @@ def main():
                 continue
             if tag.startswith("V6_"):
                 continue
-            if tag.startswith("F"):
+            if ( tag.startswith("F") and
+                 tag not in {
+                     "F2_sfimm_p",
+                     "F2_sfimm_n",
+                     "F2_dfimm_p",
+                     "F2_dfimm_n",
+                     "F2_dfmpyll",
+                     "F2_dfmpylh"
+                 }):
                 continue
             if tag.endswith("_locked"):
                 continue