On 18/4/25 10:21, WANG Rui wrote:
This patch replaces the obsolete IOCSR_BRD bit with CRC in cpucfg1[25],
in both LA464 and LA132 CPU initialization functions. The corresponding
field macro in `cpu.h` is updated to reflect this change.

Additionally, the availability macro `avail_CRC()` is introduced in
`translate.h` to check the CRC feature flag.

All CRC-related instruction translations are updated to be gated by
the new CRC feature flag instead of hardcoded CPU features.

This ensures correctness and configurability when enabling CRC
instructions based on hardware capabilities.

Signed-off-by: WANG Rui <wang...@loongson.cn>
---
  target/loongarch/cpu.c                           |  4 ++--
  target/loongarch/cpu.h                           |  2 +-
  .../loongarch/tcg/insn_trans/trans_extra.c.inc   | 16 ++++++++--------
  target/loongarch/translate.h                     |  1 +
  4 files changed, 12 insertions(+), 11 deletions(-)

Nice.

Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>


Reply via email to