> -----Original Message-----
> From: Matheus Tavares Bernardino <[email protected]>
> Sent: Thursday, May 4, 2023 11:18 AM
> To: [email protected]
> Cc: [email protected]; Taylor Simpson <[email protected]>; [email protected]
> Subject: [PATCH] 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 <[email protected]>
> ---
> target/hexagon/gen_analyze_funcs.py | 30 +++++-----
> target/hexagon/gen_helper_funcs.py | 14 ++---
> target/hexagon/gen_helper_protos.py | 2 +-
> target/hexagon/gen_idef_parser_funcs.py | 2 +-
> target/hexagon/gen_tcg_funcs.py | 78 ++++++++++++-------------
> target/hexagon/hex_common.py | 3 +
> 6 files changed, 66 insertions(+), 63 deletions(-)
Tested-by: Taylor Simpson <[email protected]>
Reviewed-by: Taylor Simpson <[email protected]>
Queued for next Hexagon PR
Thanks,
Taylor