From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Ilya Leoshkevich <iii@linux.ibm.com>,
Richard Henderson <richard.henderson@linaro.org>,
David Hildenbrand <david@redhat.com>,
Thomas Huth <thuth@redhat.com>
Cc: qemu-s390x@nongnu.org, qemu-devel@nongnu.org, qemu-stable@nongnu.org
Subject: Re: [PATCH v2 06/14] tcg/{i386, s390x}: Add earlyclobber to the op_add2's first output
Date: Wed, 19 Jul 2023 14:42:40 +0200 [thread overview]
Message-ID: <fb2c25e1-3ccd-3bf2-3694-85f0a24b45d0@linaro.org> (raw)
In-Reply-To: <ddf29fdedb5dbbe10a0204ed0d3714315e33174d.camel@linux.ibm.com>
On 19/7/23 14:30, Ilya Leoshkevich wrote:
> On Wed, 2023-07-19 at 14:08 +0200, Philippe Mathieu-Daudé wrote:
>> Hi Ilya,
>>
>> On 19/7/23 11:44, Ilya Leoshkevich wrote:
>>> i386 and s390x implementations of op_add2 require an earlyclobber,
>>> which is currently missing. This breaks VCKSM in s390x guests.
>>> E.g., on
>>> x86_64 the following op:
>>>
>>> add2_i32 tmp2,tmp3,tmp2,tmp3,tmp3,tmp2 dead: 0 2 3 4 5
>>> pref=none,0xffff
>>>
>>> is translated to:
>>>
>>> addl %ebx, %r12d
>>> adcl %r12d, %ebx
>>>
>>> Introduce a new C_N1_O1_I4 constraint, and make sure that
>>> earlyclobber
>>> of aliased outputs is honored.
>>>
>>> Cc: qemu-stable@nongnu.org
>>> Fixes: 82790a870992 ("tcg: Add markup for output requires new
>>> register")
>>> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
>>> ---
>>> tcg/i386/tcg-target-con-set.h | 2 +-
>>> tcg/i386/tcg-target.c.inc | 2 +-
>>> tcg/s390x/tcg-target-con-set.h | 5 ++---
>>> tcg/s390x/tcg-target.c.inc | 4 ++--
>>> tcg/tcg.c | 8 +++++++-
>>> 5 files changed, 13 insertions(+), 8 deletions(-)
>>
>>
>>> diff --git a/tcg/tcg.c b/tcg/tcg.c
>>> index 652e8ea6b93..ddfe9a96cb7 100644
>>> --- a/tcg/tcg.c
>>> +++ b/tcg/tcg.c
>>> @@ -648,6 +648,7 @@ static void tcg_out_movext3(TCGContext *s,
>>> const TCGMovExtend *i1,
>>> #define C_O2_I2(O1, O2, I1, I2) C_PFX4(c_o2_i2_, O1, O2,
>>> I1, I2),
>>> #define C_O2_I3(O1, O2, I1, I2, I3) C_PFX5(c_o2_i3_, O1, O2,
>>> I1, I2, I3),
>>> #define C_O2_I4(O1, O2, I1, I2, I3, I4) C_PFX6(c_o2_i4_, O1, O2,
>>> I1, I2, I3, I4),
>>> +#define C_N1_O1_I4(O1, O2, I1, I2, I3, I4) C_PFX6(c_n1_o1_i4_, O1,
>>> O2, I1, I2, I3, I4),
>>
>> No need for O2. Also can you place it earlier just after C_N1_I2?
>
> Shouldn't it still be a 6-argument constraint?
> INDEX_op_add2_i32 and friends take 6 arguments after all.
Oops sorry, you are right.
next prev parent reply other threads:[~2023-07-19 12:43 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-19 9:44 [PATCH v2 00/14] target/s390x: Miscellaneous TCG fixes, part 2 Ilya Leoshkevich
2023-07-19 9:44 ` [PATCH v2 01/14] target/s390x: Make CKSM raise an exception if R2 is odd Ilya Leoshkevich
2023-07-19 9:44 ` [PATCH v2 02/14] target/s390x: Fix CLM with M3=0 Ilya Leoshkevich
2023-07-19 9:44 ` [PATCH v2 03/14] target/s390x: Fix CONVERT TO LOGICAL/FIXED with out-of-range inputs Ilya Leoshkevich
2023-07-19 9:44 ` [PATCH v2 04/14] target/s390x: Fix ICM with M3=0 Ilya Leoshkevich
2023-07-19 9:44 ` [PATCH v2 05/14] target/s390x: Make MC raise specification exception when class >= 16 Ilya Leoshkevich
2023-07-19 9:44 ` [PATCH v2 06/14] tcg/{i386, s390x}: Add earlyclobber to the op_add2's first output Ilya Leoshkevich
2023-07-19 12:08 ` Philippe Mathieu-Daudé
2023-07-19 12:30 ` Ilya Leoshkevich
2023-07-19 12:42 ` Philippe Mathieu-Daudé [this message]
2023-07-19 14:04 ` Philippe Mathieu-Daudé
2023-07-19 9:44 ` [PATCH v2 07/14] target/s390x: Fix assertion failure in VFMIN/VFMAX with type 13 Ilya Leoshkevich
2023-07-19 9:47 ` David Hildenbrand
2023-07-19 9:44 ` [PATCH v2 08/14] tests/tcg/s390x: Test CKSM Ilya Leoshkevich
2023-07-19 14:20 ` Thomas Huth
2023-07-19 14:23 ` Ilya Leoshkevich
2023-07-19 9:44 ` [PATCH v2 09/14] tests/tcg/s390x: Test CLGEBR and CGEBRA Ilya Leoshkevich
2023-07-19 14:34 ` Thomas Huth
2023-07-19 9:44 ` [PATCH v2 10/14] tests/tcg/s390x: Test CLM Ilya Leoshkevich
2023-07-19 14:36 ` Thomas Huth
2023-07-19 9:44 ` [PATCH v2 11/14] tests/tcg/s390x: Test ICM Ilya Leoshkevich
2023-07-19 14:37 ` Thomas Huth
2023-07-19 9:44 ` [PATCH v2 12/14] tests/tcg/s390x: Test MC Ilya Leoshkevich
2023-07-19 14:39 ` Thomas Huth
2023-07-19 9:44 ` [PATCH v2 13/14] tests/tcg/s390x: Test STPQ Ilya Leoshkevich
2023-07-19 14:39 ` Thomas Huth
2023-07-19 9:44 ` [PATCH v2 14/14] tests/tcg/s390x: Test VCKSM Ilya Leoshkevich
2023-07-19 14:40 ` Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fb2c25e1-3ccd-3bf2-3694-85f0a24b45d0@linaro.org \
--to=philmd@linaro.org \
--cc=david@redhat.com \
--cc=iii@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).