All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org,
	Richard Henderson <richard.henderson@linaro.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Pavel Dovgalyuk <dovgaluk@ispras.ru>
Subject: Re: [PATCH] target/arm: Remove unnecessary gen_io_end() calls
Date: Fri, 19 Jun 2020 18:15:22 +0100	[thread overview]
Message-ID: <875zbnugd1.fsf@linaro.org> (raw)
In-Reply-To: <20200619170324.12093-1-peter.maydell@linaro.org>


Peter Maydell <peter.maydell@linaro.org> writes:

> Since commit ba3e7926691ed3 it has been unnecessary for target code
> to call gen_io_end() after an IO instruction in icount mode; it is
> sufficient to call gen_io_start() before it and to force the end of
> the TB.
>
> Many now-unnecessary calls to gen_io_end() were removed in commit
> 9e9b10c6491153b, but some were missed or accidentally added later.
> Remove unneeded calls from the arm target:
>
>  * the call in the handling of exception-return-via-LDM is
>    unnecessary, and the code is already forcing end-of-TB
>  * the call in the VFP access check code is more complicated:
>    we weren't ending the TB, so we need to add the code to
>    force that by setting DISAS_UPDATE

That was the thing I was staring at trying to puzzle out.

I guess going forward we want to base the base DisasContext to
gen_io_start so we can flip a bit and then assert we don't start a new
instruction having already handled an IO instruction which should have
been the last one.

>  * the doc comment for ARM_CP_IO doesn't need to mention
>    gen_io_end() any more
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée

WARNING: multiple messages have this Message-ID (diff)
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	qemu-arm@nongnu.org,
	Richard Henderson <richard.henderson@linaro.org>,
	qemu-devel@nongnu.org, Pavel Dovgalyuk <dovgaluk@ispras.ru>
Subject: Re: [PATCH] target/arm: Remove unnecessary gen_io_end() calls
Date: Fri, 19 Jun 2020 18:15:22 +0100	[thread overview]
Message-ID: <875zbnugd1.fsf@linaro.org> (raw)
In-Reply-To: <20200619170324.12093-1-peter.maydell@linaro.org>


Peter Maydell <peter.maydell@linaro.org> writes:

> Since commit ba3e7926691ed3 it has been unnecessary for target code
> to call gen_io_end() after an IO instruction in icount mode; it is
> sufficient to call gen_io_start() before it and to force the end of
> the TB.
>
> Many now-unnecessary calls to gen_io_end() were removed in commit
> 9e9b10c6491153b, but some were missed or accidentally added later.
> Remove unneeded calls from the arm target:
>
>  * the call in the handling of exception-return-via-LDM is
>    unnecessary, and the code is already forcing end-of-TB
>  * the call in the VFP access check code is more complicated:
>    we weren't ending the TB, so we need to add the code to
>    force that by setting DISAS_UPDATE

That was the thing I was staring at trying to puzzle out.

I guess going forward we want to base the base DisasContext to
gen_io_start so we can flip a bit and then assert we don't start a new
instruction having already handled an IO instruction which should have
been the last one.

>  * the doc comment for ARM_CP_IO doesn't need to mention
>    gen_io_end() any more
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


  reply	other threads:[~2020-06-19 17:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-19 17:03 [PATCH] target/arm: Remove unnecessary gen_io_end() calls Peter Maydell
2020-06-19 17:03 ` Peter Maydell
2020-06-19 17:15 ` Alex Bennée [this message]
2020-06-19 17:15   ` Alex Bennée
2020-06-19 17:24 ` no-reply
2020-06-19 17:24   ` no-reply
2020-06-20  0:23 ` Richard Henderson
2020-06-20  0:23   ` Richard Henderson
2020-06-22  7:17 ` Pavel Dovgalyuk
2020-06-22  7:17   ` Pavel Dovgalyuk
2020-06-22  7:30   ` Role of qemu-arm vincent Dupaquis
2020-06-22  8:57     ` Alex Bennée
2020-06-22  9:29       ` Philippe Mathieu-Daudé
2020-06-22 11:27         ` vincent Dupaquis
2020-06-22 12:16           ` Peter Maydell
2020-06-22 13:03             ` vincent Dupaquis
2020-06-22 13:43               ` Peter Maydell
2020-06-24  8:45                 ` vincent Dupaquis
2020-06-24 10:14                   ` Alex Bennée
2020-06-25  6:52                     ` vincent Dupaquis
2020-06-25  8:46                       ` Peter Maydell
2020-06-25  9:23                       ` Alex Bennée

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=875zbnugd1.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=dovgaluk@ispras.ru \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.