From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlixH-0001UQ-KI for qemu-devel@nongnu.org; Sat, 17 May 2014 14:03:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wlix8-0006a6-Fw for qemu-devel@nongnu.org; Sat, 17 May 2014 14:03:31 -0400 Received: from mail-ie0-x235.google.com ([2607:f8b0:4001:c03::235]:61664) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wlix8-0006Zm-9l for qemu-devel@nongnu.org; Sat, 17 May 2014 14:03:22 -0400 Received: by mail-ie0-f181.google.com with SMTP id rp18so989952iec.26 for ; Sat, 17 May 2014 11:03:21 -0700 (PDT) Sender: Richard Henderson Message-ID: <5377A464.5090300@twiddle.net> Date: Sat, 17 May 2014 11:03:16 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1400264014-78911-1-git-send-email-petar.jovanovic@rt-rk.com> <1400264014-78911-2-git-send-email-petar.jovanovic@rt-rk.com> In-Reply-To: <1400264014-78911-2-git-send-email-petar.jovanovic@rt-rk.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] target-mips: pass CPUMIPSState to gen_mfc0/mtc0/dmfc0/dmtc0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Petar Jovanovic , qemu-devel@nongnu.org Cc: petar.jovanovic@imgtec.com, aurelien@aurel32.net On 05/16/2014 11:13 AM, Petar Jovanovic wrote: > > -static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel) > +static void gen_mfc0(CPUMIPSState *env, DisasContext *ctx, > + You should not be passing around env within the translator, at all. You should be able to get everything you need from ctx->hflags or ctx->insn_flags. If there's something missing from ctx, then we'll talk about additional changes. r~