[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 0/4] target/s390x: CC fixes
From: |
David Hildenbrand |
Subject: |
Re: [PATCH 0/4] target/s390x: CC fixes |
Date: |
Tue, 31 Oct 2023 09:38:36 +0100 |
User-agent: |
Mozilla Thunderbird |
On 31.10.23 06:32, Ilya Leoshkevich wrote:
Hi,
This series fixes two issues with updating CC. David was suggesting a
bigger rewrite [1], but I did not dare do this (yet). Instead, these
I started coding that up but was distracted by other things; last time I
looked at that, I concluded that the way we are calculating the carry in
not suitable when we're doing two additions (like ADD LOGICAL WITH CARRY).
In addition, the way cout_addu32/cout_addu64 relies on cc_src/cc_dst is
wrong in some occurrences.
are targeted fixes: patch 1 helps with installing Fedora, and patch 3
addresses something I noticed when reviewing the code. Patches 2 and 4
are tests.
I assume you are only scratching the surface with your fixes and we
might be better off just doing CC_OP_ADDU / CC_OP_SUBU like CC_OP_ADD_32
/ CC_OP_ADD_64 / ... to fix all issues involved.
Best regards,
Ilya
[1] https://gitlab.com/qemu-project/qemu/-/issues/1865#note_1545060658
Ilya Leoshkevich (4):
target/s390x: Fix CLC corrupting cc_src
tests/tcg/s390x: Test CLC with inaccessible second operand
target/s390x: Fix LAALG not updating cc_src
tests/tcg/s390x: Test LAALG with negative cc_src
target/s390x/tcg/translate.c | 10 ++++---
tests/tcg/s390x/Makefile.target | 2 ++
tests/tcg/s390x/clc.c | 48 +++++++++++++++++++++++++++++++++
tests/tcg/s390x/laalg.c | 27 +++++++++++++++++++
4 files changed, 84 insertions(+), 3 deletions(-)
create mode 100644 tests/tcg/s390x/clc.c
create mode 100644 tests/tcg/s390x/laalg.c
--
Cheers,
David / dhildenb