mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
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>
This commit is contained in:
parent
c0a41ee631
commit
e71fdc4f1b
5 changed files with 154 additions and 34 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue