On 10/26/26 11:20, Philippe Mathieu-Daudé wrote:
From: Philippe Mathieu-Daudé<[email protected]>

Convert LI[16] and LI[48]. LI[16] decodes its 3-bit register
with gpr3() and its immediate with s_eu() (0x7f encodes -1).
LI[48] takes a 32-bit immediate and is not available in NMS
cores; handle it in trans_LI_nnms(), which checks NMS before
calling trans_LI(). Expose check_nms() for that purpose.

Signed-off-by: Philippe Mathieu-Daudé<[email protected]>
Signed-off-by: Philippe Mathieu-Daudé<[email protected]>
---
Since v3:
- Fix LI[16] register decoding, using the gpr3() mapping
- Fix LI[16] immediate, extracted unsigned
- Fix LI[48] immediate halfword order
- Replace the not_in_nms argument by trans_LI_nnms()
- Reuse check_nms() from translate.c
---
  target/mips/tcg/translate.h              |  1 +
  target/mips/tcg/nanomips16.decode        |  9 ++++++++
  target/mips/tcg/nanomips48.decode        |  8 ++++++++
  target/mips/tcg/nanomips_translate.c     | 26 ++++++++++++++++++++++++
  target/mips/tcg/translate.c              |  2 +-
  target/mips/tcg/nanomips_translate.c.inc | 17 ----------------
  6 files changed, 45 insertions(+), 18 deletions(-)

Reviewed-by: Richard Henderson <[email protected]>

r~

Reply via email to