diff options
| author | Marco Liebel <quic_mliebel@quicinc.com> | 2023-03-20 02:25:32 -0700 |
|---|---|---|
| committer | Taylor Simpson <tsimpson@quicinc.com> | 2023-04-21 09:32:51 -0700 |
| commit | cd6c4edff69ce6ba0aa8e6ed702f43a042a456bc (patch) | |
| tree | 82c755c9cabccd87f50aaca25c8dddde40d9bf08 /target/hexagon/gen_idef_parser_funcs.py | |
| parent | bee1fc56c2fae6fb96cc54b24a3a7ed7767a2f4a (diff) | |
| download | focaccia-qemu-cd6c4edff69ce6ba0aa8e6ed702f43a042a456bc.tar.gz focaccia-qemu-cd6c4edff69ce6ba0aa8e6ed702f43a042a456bc.zip | |
Use f-strings in python scripts
Replace python 2 format string with f-strings Signed-off-by: Marco Liebel <quic_mliebel@quicinc.com> Signed-off-by: Taylor Simpson <tsimpson@quicinc.com> Reviewed-by: Taylor Simpson <tsimpson@quicinc.com> Tested-by: Taylor Simpson <tsimpson@quicinc.com> Message-Id: <20230320092533.2859433-2-quic_mliebel@quicinc.com>
Diffstat (limited to 'target/hexagon/gen_idef_parser_funcs.py')
| -rw-r--r-- | target/hexagon/gen_idef_parser_funcs.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/target/hexagon/gen_idef_parser_funcs.py b/target/hexagon/gen_idef_parser_funcs.py index 917753d6d8..1b1fdf9790 100644 --- a/target/hexagon/gen_idef_parser_funcs.py +++ b/target/hexagon/gen_idef_parser_funcs.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 ## -## Copyright(c) 2019-2022 rev.ng Labs Srl. All Rights Reserved. +## Copyright(c) 2019-2023 rev.ng Labs Srl. 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 @@ -110,20 +110,20 @@ def main(): and hex_common.is_new_val(regtype, regid, tag)) if is_pair or is_single_old: - arguments.append("%s%s%sV" % (prefix, regtype, regid)) + arguments.append(f"{prefix}{regtype}{regid}V") elif is_single_new: - arguments.append("%s%s%sN" % (prefix, regtype, regid)) + arguments.append(f"{prefix}{regtype}{regid}N") else: print("Bad register parse: ",regtype,regid,toss,numregs) for immlett,bits,immshift in imms: arguments.append(hex_common.imm_name(immlett)) - f.write("%s(%s) {\n" % (tag, ", ".join(arguments))) + f.write(f"{tag}({', '.join(arguments)}) {{\n") f.write(" "); if hex_common.need_ea(tag): f.write("size4u_t EA; "); - f.write("%s\n" % hex_common.semdict[tag]) + f.write(f"{hex_common.semdict[tag]}\n") f.write("}\n\n") if __name__ == "__main__": |