Hexagon (target/hexagon/*.py): raise exception on reg parsing error
authorMatheus Tavares Bernardino <quic_mathbern@quicinc.com>
Thu, 4 May 2023 16:17:47 +0000 (13:17 -0300)
committerTaylor Simpson <tsimpson@quicinc.com>
Thu, 18 May 2023 19:40:52 +0000 (12:40 -0700)
commitc3199390c2357f5bf695fa0cbf2b1cfd48ebc5fc
tree04a46952ac2a8e52823e2b03636fa00b519afdb4
parent4354f3dbae3acf6a2116be361e4c497896270518
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>
target/hexagon/gen_analyze_funcs.py
target/hexagon/gen_helper_funcs.py
target/hexagon/gen_helper_protos.py
target/hexagon/gen_idef_parser_funcs.py
target/hexagon/gen_tcg_funcs.py
target/hexagon/hex_common.py