qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ulrich Weigand <uweigand@de.ibm.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: thuth@redhat.com, david@redhat.com, cohuck@redhat.com,
	qemu-devel@nongnu.org, Ulrich Weigand <ulrich.weigand@de.ibm.com>,
	qemu-s390x@nongnu.org
Subject: Re: [PATCH] target/s390x: Fix CC set by CONVERT TO FIXED/LOGICAL
Date: Mon, 28 Jun 2021 18:32:36 +0200	[thread overview]
Message-ID: <20210628163236.GA14822@oc3748833570.ibm.com> (raw)
In-Reply-To: <5c9a00df-aa43-d721-912c-eeb9eda839a4@linaro.org>

On Mon, Jun 28, 2021 at 06:26:52AM -0700, Richard Henderson wrote:
> On 6/28/21 5:58 AM, Ulrich Weigand wrote:
> >>>helper.h:DEF_HELPER_FLAGS_3(clgdb, TCG_CALL_NO_WG, i64, env, i64, i32)
> >>
> >>This won't work reliably.  You're writing to a tcg global inside of
> >>a function that says that it won't.
> >
> >I missed that, sorry.  That problem can be fixed by changing the above
> >line to something like:
> >DEF_HELPER_3(clgdb, i64, env, i64, i32)
> >right?
> 
> Yes.

OK, I'll send a v2 including that change shortly; maybe that is an
acceptable fix for the immediate bug, at least for now.

> >In any case, the current implementation already has two helpers, and
> >I initially tried to keep that, by using a different second part to
> >correctly compute CC.  But this ran into the problem that I didn't
> >see any way to detect the fact that the conversion operation had run
> >into one of the special cases in the second helper, without re-doing
> >the whole conversion a second time.  Is there any way to pass
> >information between the two helpers (without running again into the
> >same qemu global state updating problem)?
> 
> Don't clear out env->fpu_status.float_exception_flags in
> handle_exceptions.  Wait until we're actually done with the data.

I don't really know much about qemu internals, but this is really
confusing me, sorry.  Aren't env->fpu_status and env->cc_op two
elements of the same global state?  Why it is OK to use one of
these fields to pass information to the next helper, but not the
other?  I guess I must be missing something here ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


  reply	other threads:[~2021-06-28 16:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23 14:50 [PATCH] target/s390x: Fix CC set by CONVERT TO FIXED/LOGICAL Ulrich Weigand
2021-06-26  1:19 ` Richard Henderson
2021-06-28 12:58   ` Ulrich Weigand
2021-06-28 13:26     ` Richard Henderson
2021-06-28 16:32       ` Ulrich Weigand [this message]
2021-06-28 17:49         ` Richard Henderson
2021-06-30 10:47           ` Ulrich Weigand

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=20210628163236.GA14822@oc3748833570.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    --cc=ulrich.weigand@de.ibm.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).