RE: [PATCH v2 9/9] Hexagon (target/hexagon) Remove hex_common.read_attribs_file
> -Original Message- > From: Taylor Simpson > Sent: Wednesday, March 6, 2024 9:23 PM > To: qemu-devel@nongnu.org > Cc: Brian Cain ; Matheus Bernardino (QUIC) > ; Sid Manning ; > Marco Liebel (QUIC) ; > richard.hender...@linaro.org; phi...@linaro.org; a...@rev.ng; a...@rev.ng; > ltaylorsimp...@gmail.com > Subject: [PATCH v2 9/9] Hexagon (target/hexagon) Remove > hex_common.read_attribs_file > > WARNING: This email originated from outside of Qualcomm. Please be wary > of any links or attachments, and do not enable macros. > > The attribinfo data structure is not used > Adjust the command-line arguments to the python scripts > Add hex_common.read_common_files for TCG/helper generation scripts > > Signed-off-by: Taylor Simpson > --- Reviewed-by: Brian Cain > target/hexagon/gen_analyze_funcs.py | 21 ++- > target/hexagon/gen_helper_funcs.py | 21 ++- > target/hexagon/gen_helper_protos.py | 21 ++- > target/hexagon/gen_idef_parser_funcs.py | 5 ++-- > target/hexagon/gen_op_attribs.py| 5 ++-- > target/hexagon/gen_opcodes_def.py | 4 +-- > target/hexagon/gen_printinsn.py | 5 ++-- > target/hexagon/gen_tcg_func_table.py| 5 ++-- > target/hexagon/gen_tcg_funcs.py | 21 ++- > target/hexagon/hex_common.py| 35 +++-- > target/hexagon/meson.build | 31 +++--- > 11 files changed, 54 insertions(+), 120 deletions(-) > > diff --git a/target/hexagon/gen_analyze_funcs.py > b/target/hexagon/gen_analyze_funcs.py > index a9af666cef..b73b4e2349 100755 > --- a/target/hexagon/gen_analyze_funcs.py > +++ b/target/hexagon/gen_analyze_funcs.py > @@ -1,7 +1,7 @@ > #!/usr/bin/env python3 > > ## > -## Copyright(c) 2022-2023 Qualcomm Innovation Center, Inc. All Rights > Reserved. > +## Copyright(c) 2022-2024 Qualcomm Innovation Center, Inc. All Rights > Reserved. > ## > ## This program is free software; you can redistribute it and/or modify > ## it under the terms of the GNU General Public License as published by > @@ -67,24 +67,7 @@ def gen_analyze_func(f, tag, regs, imms): > > > def main(): > -hex_common.read_semantics_file(sys.argv[1]) > -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() > -hex_common.init_registers() > +hex_common.read_common_files() > tagregs = hex_common.get_tagregs() > tagimms = hex_common.get_tagimms() > > diff --git a/target/hexagon/gen_helper_funcs.py > b/target/hexagon/gen_helper_funcs.py > index 9cc3d69c49..e9685bff2f 100755 > --- a/target/hexagon/gen_helper_funcs.py > +++ b/target/hexagon/gen_helper_funcs.py > @@ -1,7 +1,7 @@ > #!/usr/bin/env python3 > > ## > -## Copyright(c) 2019-2023 Qualcomm Innovation Center, Inc. All Rights > Reserved. > +## Copyright(c) 2019-2024 Qualcomm Innovation Center, Inc. All Rights > Reserved. > ## > ## This program is free software; you can redistribute it and/or modify > ## it under the terms of the GNU General Public License as published by > @@ -102,24 +102,7 @@ def gen_helper_function(f, tag, tagregs, tagimms): > > > def main(): > -hex_common.read_semantics_file(sys.argv[1]) > -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() > -hex_common.init_registers() > +hex_common.read_common_files() > tagregs = hex_common.get_tagregs() > tagimms = hex_common.get_tagimms() > > dif
Re: [PATCH v2 9/9] Hexagon (target/hexagon) Remove hex_common.read_attribs_file
On 7/3/24 04:23, Taylor Simpson wrote: The attribinfo data structure is not used Adjust the command-line arguments to the python scripts Add hex_common.read_common_files for TCG/helper generation scripts Signed-off-by: Taylor Simpson --- target/hexagon/gen_analyze_funcs.py | 21 ++- target/hexagon/gen_helper_funcs.py | 21 ++- target/hexagon/gen_helper_protos.py | 21 ++- target/hexagon/gen_idef_parser_funcs.py | 5 ++-- target/hexagon/gen_op_attribs.py| 5 ++-- target/hexagon/gen_opcodes_def.py | 4 +-- target/hexagon/gen_printinsn.py | 5 ++-- target/hexagon/gen_tcg_func_table.py| 5 ++-- target/hexagon/gen_tcg_funcs.py | 21 ++- target/hexagon/hex_common.py| 35 +++-- target/hexagon/meson.build | 31 +++--- 11 files changed, 54 insertions(+), 120 deletions(-) Reviewed-by: Philippe Mathieu-Daudé
[PATCH v2 9/9] Hexagon (target/hexagon) Remove hex_common.read_attribs_file
The attribinfo data structure is not used Adjust the command-line arguments to the python scripts Add hex_common.read_common_files for TCG/helper generation scripts Signed-off-by: Taylor Simpson --- target/hexagon/gen_analyze_funcs.py | 21 ++- target/hexagon/gen_helper_funcs.py | 21 ++- target/hexagon/gen_helper_protos.py | 21 ++- target/hexagon/gen_idef_parser_funcs.py | 5 ++-- target/hexagon/gen_op_attribs.py| 5 ++-- target/hexagon/gen_opcodes_def.py | 4 +-- target/hexagon/gen_printinsn.py | 5 ++-- target/hexagon/gen_tcg_func_table.py| 5 ++-- target/hexagon/gen_tcg_funcs.py | 21 ++- target/hexagon/hex_common.py| 35 +++-- target/hexagon/meson.build | 31 +++--- 11 files changed, 54 insertions(+), 120 deletions(-) diff --git a/target/hexagon/gen_analyze_funcs.py b/target/hexagon/gen_analyze_funcs.py index a9af666cef..b73b4e2349 100755 --- a/target/hexagon/gen_analyze_funcs.py +++ b/target/hexagon/gen_analyze_funcs.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 ## -## Copyright(c) 2022-2023 Qualcomm Innovation Center, Inc. All Rights Reserved. +## Copyright(c) 2022-2024 Qualcomm Innovation Center, Inc. All Rights Reserved. ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -67,24 +67,7 @@ def gen_analyze_func(f, tag, regs, imms): def main(): -hex_common.read_semantics_file(sys.argv[1]) -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() -hex_common.init_registers() +hex_common.read_common_files() tagregs = hex_common.get_tagregs() tagimms = hex_common.get_tagimms() diff --git a/target/hexagon/gen_helper_funcs.py b/target/hexagon/gen_helper_funcs.py index 9cc3d69c49..e9685bff2f 100755 --- a/target/hexagon/gen_helper_funcs.py +++ b/target/hexagon/gen_helper_funcs.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 ## -## Copyright(c) 2019-2023 Qualcomm Innovation Center, Inc. All Rights Reserved. +## Copyright(c) 2019-2024 Qualcomm Innovation Center, Inc. All Rights Reserved. ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -102,24 +102,7 @@ def gen_helper_function(f, tag, tagregs, tagimms): def main(): -hex_common.read_semantics_file(sys.argv[1]) -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() -hex_common.init_registers() +hex_common.read_common_files() tagregs = hex_common.get_tagregs() tagimms = hex_common.get_tagimms() diff --git a/target/hexagon/gen_helper_protos.py b/target/hexagon/gen_helper_protos.py index c82b0f54e4..4cc72a1581 100755 --- a/target/hexagon/gen_helper_protos.py +++ b/target/hexagon/gen_helper_protos.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 ## -## Copyright(c) 2019-2023 Qualcomm Innovation Center, Inc. All Rights Reserved. +## Copyright(c) 2019-2024 Qualcomm Innovation Center, Inc. All Rights Reserved. ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -44,24 +44,7 @@ def gen_helper_prototype(f, tag, tagregs, tagimms): def main(): -hex_common.read_semantics_file(sys.argv[1]) -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