qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Hexagon (target/hexagon/*.py): raise exception on reg parsin


From: Anton Johansson
Subject: Re: [PATCH] Hexagon (target/hexagon/*.py): raise exception on reg parsing error
Date: Fri, 5 May 2023 16:58:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0


On 5/4/23 18:17, Matheus Tavares Bernardino wrote:
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>
---
  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(-)
Reviewed-by: Anton Johansson <anjo@rev.ng>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]