mirror of
https://github.com/mii443/qemu.git
synced 2025-09-01 14:49:23 +00:00
Hexagon (target/hexagon/*.py): raise exception on reg parsing error
Currently, the python scripts used for the hexagon building will not abort the compilation when there is an error parsing a register. Let's make the compilation properly fail in such cases by rasing an exception instead of just printing a warning message, which might get lost in the output. This patch was generated with: git grep -l "Bad register" *hexagon* | \ xargs sed -i "" -e 's/print("Bad register parse: "[, ]*\([^)]*\))/hex_common.bad_register(\1)/g' Plus the bad_register() helper added to hex_common.py. Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com> Reviewed-by: Anton Johansson <anjo@rev.ng> Tested-by: Taylor Simpson <tsimpson@quicinc.com> Reviewed-by: Taylor Simpson <tsimpson@quicinc.com> Signed-off-by: Taylor Simpson <tsimpson@quicinc.com> Message-Id: <1f5dbd92f68fdd89e2647e4ba527a2c32cf0f070.1683217043.git.quic_mathbern@quicinc.com>
This commit is contained in:
committed by
Taylor Simpson
parent
4354f3dbae
commit
c3199390c2
@ -147,7 +147,7 @@ def main():
|
||||
elif is_single_new:
|
||||
arguments.append(f"{prefix}{regtype}{regid}N")
|
||||
else:
|
||||
print("Bad register parse: ", regtype, regid, toss, numregs)
|
||||
hex_common.bad_register(regtype, regid, toss, numregs)
|
||||
|
||||
for immlett, bits, immshift in imms:
|
||||
arguments.append(hex_common.imm_name(immlett))
|
||||
|
Reference in New Issue
Block a user