Received: from eggs.gnu.org ([2001:4830:134:3::10]:58929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brord-0006Ot-FL for qemu-devel@nongnu.org; Wed, 05 Oct 2016 12:16:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brorX-0001YN-FG for qemu-devel@nongnu.org; Wed, 05 Oct 2016 12:16:12 -0400 Received: from mail-it0-x243.google.com ([2607:f8b0:4001:c0b::243]:33638) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brorX-0001YH-AV for qemu-devel@nongnu.org; Wed, 05 Oct 2016 12:16:07 -0400 Received: by mail-it0-x243.google.com with SMTP id o21so4424378itb.0 for ; Wed, 05 Oct 2016 09:16:07 -0700 (PDT) Sender: Richard Henderson References: <874m50yxbk.fsf@fimbulvetr.bsc.es> <3cf0876d-6163-254d-68dd-601a713baccf@twiddle.net> <87r381ju8h.fsf@fimbulvetr.bsc.es> <87k2dnt8j7.fsf@fimbulvetr.bsc.es> From: Richard Henderson Message-ID: <8cd53be5-d3d9-0468-3bc1-b2b802614661@twiddle.net> Date: Wed, 5 Oct 2016 09:16:03 -0700 MIME-Version: 1.0 In-Reply-To: <87k2dnt8j7.fsf@fimbulvetr.bsc.es> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [RFC] Tracing guest register usage List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Paolo Bonzini , Peter Crosthwaite , Stefan Hajnoczi On 10/05/2016 03:06 AM, Lluís Vilanova wrote: > Richard Henderson writes: > >> On 09/30/2016 08:13 AM, Lluís Vilanova wrote: >>>> (2) an internal state change >>>> to DisasContext, reflected in INDEX_op_insn_start, with no changes to any TCG >>>> registers. So you'll not actually be tracking eflags at all. >>> >>> I don't follow what you mean. AFAIK INDEX_op_insn_start does not change the >>> guest eflags. > >> It sets cc_op, which affects how eflags is computed. > > I see tcg_gen_insn_start() gets dc->cc_op as a second argument, but I really > don't see where it gets modified (I'm looking at tcg_gen_code() on the > INDEX_op_insn_start case). The ultimate change is in restore_state_to_opc, via cpu_restore_state. r~