diff options
author | Alessandro Di Federico <ale@rev.ng> | 2022-09-23 19:38:30 +0200 |
---|---|---|
committer | Taylor Simpson <tsimpson@quicinc.com> | 2022-12-16 12:30:11 -0800 |
commit | e71fdc4f1bd5632f2d152a08cbecd82b5aa9e954 (patch) | |
tree | a0575160e40695308447131d30a5a69b0c94f044 /target/hexagon/hex_common.py | |
parent | c0a41ee631a146722a0d1365a788cbf503287570 (diff) | |
download | qemu-e71fdc4f1bd5632f2d152a08cbecd82b5aa9e954.zip qemu-e71fdc4f1bd5632f2d152a08cbecd82b5aa9e954.tar.gz qemu-e71fdc4f1bd5632f2d152a08cbecd82b5aa9e954.tar.bz2 |
target/hexagon: call idef-parser functions
Extend gen_tcg_funcs.py in order to emit calls to the functions emitted
by the idef-parser, if available.
Signed-off-by: Alessandro Di Federico <ale@rev.ng>
Signed-off-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20220923173831.227551-11-anjo@rev.ng>
Diffstat (limited to 'target/hexagon/hex_common.py')
-rwxr-xr-x | target/hexagon/hex_common.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/target/hexagon/hex_common.py b/target/hexagon/hex_common.py index 8e631b4..a29f61b 100755 --- a/target/hexagon/hex_common.py +++ b/target/hexagon/hex_common.py @@ -28,6 +28,7 @@ macros = {} # macro -> macro information... attribinfo = {} # Register information and misc tags = [] # list of all tags overrides = {} # tags with helper overrides +idef_parser_enabled = {} # tags enabled for idef-parser # We should do this as a hash for performance, # but to keep order let's keep it as a list. @@ -245,6 +246,9 @@ def is_tmp_result(tag): def is_new_result(tag): return ('A_CVI_NEW' in attribdict[tag]) +def is_idef_parser_enabled(tag): + return tag in idef_parser_enabled + def imm_name(immlett): return "%siV" % immlett @@ -276,3 +280,9 @@ def read_overrides_file(name): continue tag = overridere.findall(line)[0] overrides[tag] = True + +def read_idef_parser_enabled_file(name): + global idef_parser_enabled + with open(name, "r") as idef_parser_enabled_file: + lines = idef_parser_enabled_file.read().strip().split("\n") + idef_parser_enabled = set(lines) |