[PATCH v2 0/6] TriCore PCXI/ICR register fixes

Bastian Koppelmann posted 6 patches 1 year ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230526061946.54514-1-kbastian@mail.uni-paderborn.de
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, Thomas Huth <thuth@redhat.com>, Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
configure                                     |   1 +
target/tricore/cpu.h                          |  39 +-
target/tricore/helper.c                       |  45 +++
target/tricore/op_helper.c                    |  87 ++---
target/tricore/translate.c                    |  10 +-
tests/tcg/tricore/Makefile.softmmu-target     |  49 ++-
tests/tcg/tricore/{ => asm}/macros.h          |   1 -
tests/tcg/tricore/{ => asm}/test_abs.S        |   0
tests/tcg/tricore/{ => asm}/test_bmerge.S     |   0
tests/tcg/tricore/{ => asm}/test_clz.S        |   0
tests/tcg/tricore/{ => asm}/test_dextr.S      |   0
tests/tcg/tricore/{ => asm}/test_dvstep.S     |   0
tests/tcg/tricore/{ => asm}/test_fadd.S       |   0
tests/tcg/tricore/{ => asm}/test_fmul.S       |   0
tests/tcg/tricore/{ => asm}/test_ftoi.S       |   0
tests/tcg/tricore/{ => asm}/test_imask.S      |   0
tests/tcg/tricore/{ => asm}/test_insert.S     |   0
tests/tcg/tricore/{ => asm}/test_ld_bu.S      |   4 +-
tests/tcg/tricore/asm/test_ld_h.S             |  15 +
tests/tcg/tricore/{ => asm}/test_madd.S       |   0
tests/tcg/tricore/{ => asm}/test_msub.S       |   0
tests/tcg/tricore/{ => asm}/test_muls.S       |   0
tests/tcg/tricore/c/crt0-tc2x.S               | 335 ++++++++++++++++++
tests/tcg/tricore/c/test_boot_to_main.c       |  13 +
tests/tcg/tricore/c/test_context_save_areas.c |  15 +
tests/tcg/tricore/c/testdev_assert.h          |  18 +
tests/tcg/tricore/link.ld                     |  16 +
tests/tcg/tricore/test_ld_h.S                 |  15 -
28 files changed, 572 insertions(+), 91 deletions(-)
rename tests/tcg/tricore/{ => asm}/macros.h (99%)
rename tests/tcg/tricore/{ => asm}/test_abs.S (100%)
rename tests/tcg/tricore/{ => asm}/test_bmerge.S (100%)
rename tests/tcg/tricore/{ => asm}/test_clz.S (100%)
rename tests/tcg/tricore/{ => asm}/test_dextr.S (100%)
rename tests/tcg/tricore/{ => asm}/test_dvstep.S (100%)
rename tests/tcg/tricore/{ => asm}/test_fadd.S (100%)
rename tests/tcg/tricore/{ => asm}/test_fmul.S (100%)
rename tests/tcg/tricore/{ => asm}/test_ftoi.S (100%)
rename tests/tcg/tricore/{ => asm}/test_imask.S (100%)
rename tests/tcg/tricore/{ => asm}/test_insert.S (100%)
rename tests/tcg/tricore/{ => asm}/test_ld_bu.S (68%)
create mode 100644 tests/tcg/tricore/asm/test_ld_h.S
rename tests/tcg/tricore/{ => asm}/test_madd.S (100%)
rename tests/tcg/tricore/{ => asm}/test_msub.S (100%)
rename tests/tcg/tricore/{ => asm}/test_muls.S (100%)
create mode 100644 tests/tcg/tricore/c/crt0-tc2x.S
create mode 100644 tests/tcg/tricore/c/test_boot_to_main.c
create mode 100644 tests/tcg/tricore/c/test_context_save_areas.c
create mode 100644 tests/tcg/tricore/c/testdev_assert.h
delete mode 100644 tests/tcg/tricore/test_ld_h.S
[PATCH v2 0/6] TriCore PCXI/ICR register fixes
Posted by Bastian Koppelmann 1 year ago
Hi,

the main motivator for this series was
https://gitlab.com/qemu-project/qemu/-/issues/1453. To test that I'm not
screwing up this refactor I also extended the tests by C programs so we can test
the PCXI/ICR registers by recursive function call. Through these tests I also
found a problem, where we were not correctly updating PSW when we did a context
save.

Cheers,
Bastian

v1 -> v2:
    - Created icr_ie_mask for DisasCtx to simplify SYS_ENABLE and SYS_DISABLE
      insns translation.

Bastian Koppelmann (6):
  tests/tcg/tricore: Move asm tests into 'asm' directory
  tests/tcg/tricore: Uses label for memory addresses
  tests/tcg/tricore: Add first C program
  target/tricore: Refactor PCXI/ICR register fields
  target/tricore: Fix wrong PSW for call insns
  tests/tcg/tricore: Add recursion test for CSAs

 configure                                     |   1 +
 target/tricore/cpu.h                          |  39 +-
 target/tricore/helper.c                       |  45 +++
 target/tricore/op_helper.c                    |  87 ++---
 target/tricore/translate.c                    |  10 +-
 tests/tcg/tricore/Makefile.softmmu-target     |  49 ++-
 tests/tcg/tricore/{ => asm}/macros.h          |   1 -
 tests/tcg/tricore/{ => asm}/test_abs.S        |   0
 tests/tcg/tricore/{ => asm}/test_bmerge.S     |   0
 tests/tcg/tricore/{ => asm}/test_clz.S        |   0
 tests/tcg/tricore/{ => asm}/test_dextr.S      |   0
 tests/tcg/tricore/{ => asm}/test_dvstep.S     |   0
 tests/tcg/tricore/{ => asm}/test_fadd.S       |   0
 tests/tcg/tricore/{ => asm}/test_fmul.S       |   0
 tests/tcg/tricore/{ => asm}/test_ftoi.S       |   0
 tests/tcg/tricore/{ => asm}/test_imask.S      |   0
 tests/tcg/tricore/{ => asm}/test_insert.S     |   0
 tests/tcg/tricore/{ => asm}/test_ld_bu.S      |   4 +-
 tests/tcg/tricore/asm/test_ld_h.S             |  15 +
 tests/tcg/tricore/{ => asm}/test_madd.S       |   0
 tests/tcg/tricore/{ => asm}/test_msub.S       |   0
 tests/tcg/tricore/{ => asm}/test_muls.S       |   0
 tests/tcg/tricore/c/crt0-tc2x.S               | 335 ++++++++++++++++++
 tests/tcg/tricore/c/test_boot_to_main.c       |  13 +
 tests/tcg/tricore/c/test_context_save_areas.c |  15 +
 tests/tcg/tricore/c/testdev_assert.h          |  18 +
 tests/tcg/tricore/link.ld                     |  16 +
 tests/tcg/tricore/test_ld_h.S                 |  15 -
 28 files changed, 572 insertions(+), 91 deletions(-)
 rename tests/tcg/tricore/{ => asm}/macros.h (99%)
 rename tests/tcg/tricore/{ => asm}/test_abs.S (100%)
 rename tests/tcg/tricore/{ => asm}/test_bmerge.S (100%)
 rename tests/tcg/tricore/{ => asm}/test_clz.S (100%)
 rename tests/tcg/tricore/{ => asm}/test_dextr.S (100%)
 rename tests/tcg/tricore/{ => asm}/test_dvstep.S (100%)
 rename tests/tcg/tricore/{ => asm}/test_fadd.S (100%)
 rename tests/tcg/tricore/{ => asm}/test_fmul.S (100%)
 rename tests/tcg/tricore/{ => asm}/test_ftoi.S (100%)
 rename tests/tcg/tricore/{ => asm}/test_imask.S (100%)
 rename tests/tcg/tricore/{ => asm}/test_insert.S (100%)
 rename tests/tcg/tricore/{ => asm}/test_ld_bu.S (68%)
 create mode 100644 tests/tcg/tricore/asm/test_ld_h.S
 rename tests/tcg/tricore/{ => asm}/test_madd.S (100%)
 rename tests/tcg/tricore/{ => asm}/test_msub.S (100%)
 rename tests/tcg/tricore/{ => asm}/test_muls.S (100%)
 create mode 100644 tests/tcg/tricore/c/crt0-tc2x.S
 create mode 100644 tests/tcg/tricore/c/test_boot_to_main.c
 create mode 100644 tests/tcg/tricore/c/test_context_save_areas.c
 create mode 100644 tests/tcg/tricore/c/testdev_assert.h
 delete mode 100644 tests/tcg/tricore/test_ld_h.S

--
2.40.1