From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHZra-0008LQ-Te for qemu-devel@nongnu.org; Fri, 08 Jan 2016 11:26:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHZrW-00085w-Mp for qemu-devel@nongnu.org; Fri, 08 Jan 2016 11:26:06 -0500 Received: from mail-pa0-x241.google.com ([2607:f8b0:400e:c03::241]:34676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHZrW-00085a-Hc for qemu-devel@nongnu.org; Fri, 08 Jan 2016 11:26:02 -0500 Received: by mail-pa0-x241.google.com with SMTP id yy13so21721533pab.1 for ; Fri, 08 Jan 2016 08:26:01 -0800 (PST) From: "Edgar E. Iglesias" Date: Fri, 8 Jan 2016 17:25:54 +0100 Message-Id: <1452270356-26373-1-git-send-email-edgar.iglesias@gmail.com> Subject: [Qemu-devel] [RFC 0/2] tcg-icount: Add and use tcg_set_insn_param to update tcg insn params List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, rth@twiddle.net From: "Edgar E. Iglesias" 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