mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -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
|
@ -146,11 +146,24 @@ def main():
|
|||
hex_common.read_attribs_file(sys.argv[2])
|
||||
hex_common.read_overrides_file(sys.argv[3])
|
||||
hex_common.read_overrides_file(sys.argv[4])
|
||||
## Whether or not idef-parser is enabled is
|
||||
## determined by the number of arguments to
|
||||
## this script:
|
||||
##
|
||||
## 5 args. -> not enabled,
|
||||
## 6 args. -> idef-parser enabled.
|
||||
##
|
||||
## The 6:th arg. then holds a list of the successfully
|
||||
## parsed instructions.
|
||||
is_idef_parser_enabled = len(sys.argv) > 6
|
||||
if is_idef_parser_enabled:
|
||||
hex_common.read_idef_parser_enabled_file(sys.argv[5])
|
||||
hex_common.calculate_attribs()
|
||||
tagregs = hex_common.get_tagregs()
|
||||
tagimms = hex_common.get_tagimms()
|
||||
|
||||
with open(sys.argv[5], 'w') as f:
|
||||
output_file = sys.argv[-1]
|
||||
with open(output_file, 'w') as f:
|
||||
for tag in hex_common.tags:
|
||||
## Skip the priv instructions
|
||||
if ( "A_PRIV" in hex_common.attribdict[tag] ) :
|
||||
|
@ -168,6 +181,8 @@ def main():
|
|||
|
||||
if ( hex_common.skip_qemu_helper(tag) ):
|
||||
continue
|
||||
if ( hex_common.is_idef_parser_enabled(tag) ):
|
||||
continue
|
||||
|
||||
gen_helper_prototype(f, tag, tagregs, tagimms)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue