qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ilya Leoshkevich <iii@linux.ibm.com>
To: "Richard Henderson" <richard.henderson@linaro.org>,
	"David Hildenbrand" <david@redhat.com>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-s390x@nongnu.org, qemu-devel@nongnu.org,
	Christian Borntraeger <borntraeger@linux.ibm.com>
Subject: Re: [PATCH 3/3] tests/tcg/s390x: test signed vfmin/vfmax
Date: Wed, 13 Jul 2022 18:14:41 +0200	[thread overview]
Message-ID: <9ce0270d042b1d4cc011757dafa6ea6a882c49c7.camel@linux.ibm.com> (raw)
In-Reply-To: <3c321cef-b574-1396-237a-d1ac1cf19e01@linaro.org>

On Wed, 2022-07-13 at 21:14 +0530, Richard Henderson wrote:
> On 7/12/22 18:02, Ilya Leoshkevich wrote:
> > > This works, of course.  It could be simpler using EXECUTE, to
> > > store
> > > just the one
> > > instruction and not worry about an executable mapped page, but I
> > > guess it doesn't matter.
> > 
> > I thought about this too, but EX/EXRL operate only on the second
> > byte,
> > and I need to modify bytes 3-5 here.
> 
> I didn't mean modify the instruction via EX, but something like
> 
>    static char minmax[6] __attribute__((aligned(2)))
>      = { xx, yy, zz, 0, 0, 0 };
> 
>    minmax[3] = m6 ...
>    minmax[4] = ...
>    minmax[5] = op;
> 
>    asm("vl %%v25,0(%1)\n"
>        "vl %%v26,0(%2)\n"
>        "ex 0,0(%3)\n"
>        "vst %%v24,0(%0)"
>        : : "a"(v1), "a"(v2), "a"(v3), "a"(minmax)
>        : "memory", "v24", "v25", "v26);
> 
> 
> r~

Nice trick!

This works in qemu, but not natively: EX target must be executable.
I'd still like to try to find a way to establish an rwx section, and
send a v2 with this improvement.

I guess we'll need to fix the access check discrepancy some day.


      reply	other threads:[~2022-07-13 16:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-12  1:57 [PATCH 0/3] target/s390x: vfmin/vfmax fixes Ilya Leoshkevich
2022-07-12  1:57 ` [PATCH 1/3] target/s390x: fix handling of zeroes in vfmin/vfmax Ilya Leoshkevich
2022-07-12  4:23   ` Richard Henderson
2022-07-12  7:16   ` David Hildenbrand
2022-07-12  1:57 ` [PATCH 2/3] target/s390x: fix NaN propagation rules Ilya Leoshkevich
2022-07-12  4:24   ` Richard Henderson
2022-07-12  7:17   ` David Hildenbrand
2022-07-12  1:57 ` [PATCH 3/3] tests/tcg/s390x: test signed vfmin/vfmax Ilya Leoshkevich
2022-07-12  4:49   ` Richard Henderson
2022-07-12 12:32     ` Ilya Leoshkevich
2022-07-13 15:44       ` Richard Henderson
2022-07-13 16:14         ` Ilya Leoshkevich [this message]

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=9ce0270d042b1d4cc011757dafa6ea6a882c49c7.camel@linux.ibm.com \
    --to=iii@linux.ibm.com \
    --cc=alex.bennee@linaro.org \
    --cc=aurelien@aurel32.net \
    --cc=borntraeger@linux.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@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).