All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC 0/2] tcg-icount: Add and use tcg_set_insn_param to update tcg insn params
@ 2016-01-08 16:25 Edgar E. Iglesias
  2016-01-08 16:25 ` [Qemu-devel] [RFC 1/2] tcg: Add tcg_set_insn_param Edgar E. Iglesias
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Edgar E. Iglesias @ 2016-01-08 16:25 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, rth

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-01-12 16:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-08 16:25 [Qemu-devel] [RFC 0/2] tcg-icount: Add and use tcg_set_insn_param to update tcg insn params Edgar E. Iglesias
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

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.