All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, rth@twiddle.net
Subject: [Qemu-devel] [RFC 0/2] tcg-icount: Add and use tcg_set_insn_param to update tcg insn params
Date: Fri,  8 Jan 2016 17:25:54 +0100	[thread overview]
Message-ID: <1452270356-26373-1-git-send-email-edgar.iglesias@gmail.com> (raw)

From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>

Hi,

On AArch64, when some load/stores trap under specific conditions, a set of
detailed info describing the insn is provided to the trap handler (e.g size
of the access, target registers, insn-length mode etc).
This specific info is known at translation time and Peter suggested that
we have a look at the insn_start mechanism to see if we can reuse it
to pass along the info to the exception handling models. This would avoid
the need for moves that slow down the non-trapping case.

To do so, we'd need to first emit the insn_start and then after translating the
given target-insn, update the insn_start parameters with the decoded insn
details.

I noticed that icount does a similar thing where it emits a movi and later
updates the immediate parameter with the real insn counter.

These patches illustrate a possible change by updating the icount code to
use a new tcg_set_insn_param() tcg call instead of directly peeking/poking
into tcg structures. This same mechanism can be used in the AArch64
translator.

Any thoughts on this approach? Or ideas on better options to achieve this?

Best regards,
Edgar

Edgar E. Iglesias (2):
  tcg: Add tcg_set_insn_param
  gen-icount: Use tcg_set_insn_param

 include/exec/gen-icount.h | 16 ++++++++--------
 tcg/tcg.h                 |  6 ++++++
 2 files changed, 14 insertions(+), 8 deletions(-)

-- 
1.9.1

             reply	other threads:[~2016-01-08 16:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-08 16:25 Edgar E. Iglesias [this message]
2016-01-08 16:25 ` [Qemu-devel] [RFC 1/2] tcg: Add tcg_set_insn_param Edgar E. Iglesias
2016-01-08 16:25 ` [Qemu-devel] [RFC 2/2] gen-icount: Use tcg_set_insn_param Edgar E. Iglesias
2016-01-08 16:43 ` [Qemu-devel] [RFC 0/2] tcg-icount: Add and use tcg_set_insn_param to update tcg insn params Richard Henderson
2016-01-11 20:16 ` Lluís Vilanova
2016-01-11 22:29   ` Peter Maydell
2016-01-12 12:12     ` Lluís Vilanova
2016-01-12 13:52       ` Edgar E. Iglesias
2016-01-12 16:36         ` Lluís Vilanova

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=1452270356-26373-1-git-send-email-edgar.iglesias@gmail.com \
    --to=edgar.iglesias@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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.