From patchwork Mon Jun 26 10:04:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 106320 Delivered-To: patch@linaro.org Received: by 10.182.135.102 with SMTP id pr6csp1237338obb; Mon, 26 Jun 2017 03:04:48 -0700 (PDT) X-Received: by 10.55.3.139 with SMTP id 133mr22056345qkd.65.1498471488508; Mon, 26 Jun 2017 03:04:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498471488; cv=none; d=google.com; s=arc-20160816; b=0eE5XpZF6ABWixtfIQvI4PXpMYsWMRa1PLOrclGrwqJTTHjce87/2yz6RfEaZXZsii xOWFeQaQSvF8FZF4mkXHSiV8CAmEcumZ4GggKmkQAS5JPO1+KFdvV2NHiIWANXNCol+8 zLAPY/o8qKvxzVvOGdor6l/tYh3VczP0Unuv0lTXz1ZpI2eKmoVVhv68hhsUTl0CKdVK NE8Mg39vLvvJYSXFaPymGx2vTK+C63OVAhdlbXi9XtX18SHk0WZAEiTdulaPmdaLfARg zTpmnYFopx6HpA4ZluUgovdyhrlgB+gXdmthCiBntdlHty37S1XAW+znTwcdy+CxjWvq ksGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=EiN2eZgYif9x7fK6pbekw3eMLoict0AGTU4/UMcQ4Ks=; b=PWf1l7mz0LW8Fb8XXcTL+hpf7zDWwI2sPPNp6ooNMGJ5AmQN1MKuPf4yF4yFZV/gkr Td48V7ITNtbEUt6Q5eVfYDfAjWEbtz/7Wen5mz35uStjgzYJzcwQBC2XUcjR86DC/GSh 6/q+sDkdZCCEqd0DDt61iZ06Nbv8EmrOdC1n6R7jBdmhSIbUgVnB3zOgzsISjM376EVl NrEgOVzulmIi9UtDdZAv8hfvdyBDVJCA4+LXlMCQxcxsLxfb82axuDnr/wHrXILLwv68 uYbGTL7Mb++wh3tTI+kgxHKZgSiS5VjQnZxxjFN3+EsIBN58lEGErvdoaDNVAApxYRZo E9gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.b=D6v81IdP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id l66si10732200qkc.129.2017.06.26.03.04.47 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 26 Jun 2017 03:04:48 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.b=D6v81IdP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:45650 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPQsv-00064z-Vc for patch@linaro.org; Mon, 26 Jun 2017 06:04:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPQrw-0005nU-FI for qemu-devel@nongnu.org; Mon, 26 Jun 2017 06:03:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dPQrr-0006MP-Hf for qemu-devel@nongnu.org; Mon, 26 Jun 2017 06:03:44 -0400 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:36677) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dPQrr-0006M4-AY for qemu-devel@nongnu.org; Mon, 26 Jun 2017 06:03:39 -0400 Received: by mail-wm0-x22a.google.com with SMTP id 62so2976373wmw.1 for ; Mon, 26 Jun 2017 03:03:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EiN2eZgYif9x7fK6pbekw3eMLoict0AGTU4/UMcQ4Ks=; b=D6v81IdPCanj0G/DxxiNN9cbSRGe0G3XpgSFcS1Xp7Am0w3DvkuYl6XUY58UBeTnNs 5FjDAiMZz7fVOLGukwx8CxGFuO9wc6M/B5Kaeeaa2DGJtpByapLJLUBkdMJGA2uj6VdA q3CZeMTMT/3P54Mwo8Ejw6ZwjeQugKnyYZVxU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EiN2eZgYif9x7fK6pbekw3eMLoict0AGTU4/UMcQ4Ks=; b=blriZkFVK9MGZ8QVV0adbpPFeZUtGphrkEqL7zKTwrtt0uK2w0gabv4rABjWxoVl/B A6msi05VnxB3Fr+cGYZhCG3Pg7mEMocXPJQGuVlTIuD3KuxpVzVRf7KhW1sabM7zOmmg xQM8VFM7OUUkZx9PjYlLrHR8xUGXqWEd6eqeooGu6xgh3WL+pJPaynrgjlFcnYd9Tyo6 YOvekKNlnc3X+/h6Dk9c4DjidZaUDwjY/4n1m54EvcVtlmMOr4RvkDozURZq8AcRTeyU voWSFClj5EycqTbySc5JNt6RLa3zQBj6bDWDzJwqj9h6+8yZmT8P1oKF8DdDOqdwHNMM yHwA== X-Gm-Message-State: AKS2vOz+5h2m0nF1ye+gbfUwBTzfMfeAqGIeA52J16tWWToQXJ/UQ821 rZ7W9FOoUrFkWJjC X-Received: by 10.28.146.208 with SMTP id u199mr12746882wmd.6.1498471418060; Mon, 26 Jun 2017 03:03:38 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id w30sm18573035wrb.49.2017.06.26.03.03.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Jun 2017 03:03:37 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id B86383E0141; Mon, 26 Jun 2017 11:04:27 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: vilanova@ac.upc.edu Date: Mon, 26 Jun 2017 11:04:22 +0100 Message-Id: <20170626100422.6390-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <149838046604.6497.6648018844505723967.stgit@frigg.lan> References: <149838046604.6497.6648018844505723967.stgit@frigg.lan> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22a Subject: [Qemu-devel] [PATCH] fixup! Pass generic CPUState to gen_intermediate_code() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek Vasut , Chris Wulff , qemu-devel@nongnu.org, Stafford Horne , =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= , Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" --- target/hppa/translate.c | 5 ++--- target/nios2/translate.c | 5 ++--- target/openrisc/translate.c | 3 +-- 3 files changed, 5 insertions(+), 8 deletions(-) -- 2.13.0 diff --git a/target/hppa/translate.c b/target/hppa/translate.c index e10abc5e04..900870cd5a 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -3740,10 +3740,9 @@ static ExitStatus translate_one(DisasContext *ctx, uint32_t insn) return gen_illegal(ctx); } -void gen_intermediate_code(CPUHPPAState *env, struct TranslationBlock *tb) +void gen_intermediate_code(CPUState *cs, struct TranslationBlock *tb) { - HPPACPU *cpu = hppa_env_get_cpu(env); - CPUState *cs = CPU(cpu); + CPUHPPAState *env = cs->env_ptr; DisasContext ctx; ExitStatus ret; int num_insns, max_insns, i; diff --git a/target/nios2/translate.c b/target/nios2/translate.c index 2f3c2e5dfb..8b97d6585f 100644 --- a/target/nios2/translate.c +++ b/target/nios2/translate.c @@ -799,10 +799,9 @@ static void gen_exception(DisasContext *dc, uint32_t excp) } /* generate intermediate code for basic block 'tb'. */ -void gen_intermediate_code(CPUNios2State *env, TranslationBlock *tb) +void gen_intermediate_code(CPUState *cs, TranslationBlock *tb) { - Nios2CPU *cpu = nios2_env_get_cpu(env); - CPUState *cs = CPU(cpu); + CPUNios2State *env = cs->env_ptr; DisasContext dc1, *dc = &dc1; int num_insns; int max_insns; diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index aaac359d5b..4a28c96e53 100644 --- a/target/openrisc/translate.c +++ b/target/openrisc/translate.c @@ -1520,9 +1520,8 @@ static void disas_openrisc_insn(DisasContext *dc, OpenRISCCPU *cpu) void gen_intermediate_code(CPUState *cpu, struct TranslationBlock *tb) { - OpenRISCState *env = cpu->env_ptr; + CPUOpenRISCState *env = cpu->env_ptr; OpenRISCCPU *or_cpu = openrisc_env_get_cpu(env); - CPUState *cs = CPU(cpu); struct DisasContext ctx, *dc = &ctx; uint32_t pc_start; uint32_t next_page_start;