From patchwork Tue Jun 5 01:21:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 162946 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A0266B6F9D for ; Tue, 5 Jun 2012 12:50:15 +1000 (EST) Received: from localhost ([::1]:36129 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbiWP-0004OF-Mg for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2012 21:25:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbiUw-0002Nh-Ds for qemu-devel@nongnu.org; Mon, 04 Jun 2012 21:23:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SbiUu-0008DD-F5 for qemu-devel@nongnu.org; Mon, 04 Jun 2012 21:23:49 -0400 Received: from cantor2.suse.de ([195.135.220.15]:52690 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbiUu-0008CM-6E for qemu-devel@nongnu.org; Mon, 04 Jun 2012 21:23:48 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 1B822914CD; Tue, 5 Jun 2012 03:23:47 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Tue, 5 Jun 2012 03:21:49 +0200 Message-Id: <1338859366-20689-18-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1338859366-20689-1-git-send-email-afaerber@suse.de> References: <1338859366-20689-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: "Edgar E. Iglesias" , =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH 17/74] target-cris: Reindent cpu_cris_init() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Judging by TCG variable initialization it used 8-char tabs; use 4 spaces instead. Also remove trailing whitespace. Signed-off-by: Andreas Färber Acked-by: Edgar E. Iglesias --- target-cris/translate.c | 103 ++++++++++++++++++++++++----------------------- 1 files changed, 52 insertions(+), 51 deletions(-) diff --git a/target-cris/translate.c b/target-cris/translate.c index e353ea3..a398057 100644 --- a/target-cris/translate.c +++ b/target-cris/translate.c @@ -3506,73 +3506,74 @@ static uint32_t vr_by_name(const char *name) CPUCRISState *cpu_cris_init (const char *cpu_model) { CRISCPU *cpu; - CPUCRISState *env; - static int tcg_initialized = 0; - int i; + CPUCRISState *env; + static int tcg_initialized = 0; + int i; cpu = CRIS_CPU(object_new(TYPE_CRIS_CPU)); env = &cpu->env; - env->pregs[PR_VR] = vr_by_name(cpu_model); + env->pregs[PR_VR] = vr_by_name(cpu_model); cpu_reset(CPU(cpu)); - qemu_init_vcpu(env); + qemu_init_vcpu(env); - if (tcg_initialized) - return env; + if (tcg_initialized) { + return env; + } - tcg_initialized = 1; + tcg_initialized = 1; #define GEN_HELPER 2 #include "helper.h" - if (env->pregs[PR_VR] < 32) { - cpu_crisv10_init(env); - return env; - } + if (env->pregs[PR_VR] < 32) { + cpu_crisv10_init(env); + return env; + } - cpu_env = tcg_global_reg_new_ptr(TCG_AREG0, "env"); - cc_x = tcg_global_mem_new(TCG_AREG0, - offsetof(CPUCRISState, cc_x), "cc_x"); - cc_src = tcg_global_mem_new(TCG_AREG0, - offsetof(CPUCRISState, cc_src), "cc_src"); - cc_dest = tcg_global_mem_new(TCG_AREG0, - offsetof(CPUCRISState, cc_dest), - "cc_dest"); - cc_result = tcg_global_mem_new(TCG_AREG0, - offsetof(CPUCRISState, cc_result), - "cc_result"); - cc_op = tcg_global_mem_new(TCG_AREG0, - offsetof(CPUCRISState, cc_op), "cc_op"); - cc_size = tcg_global_mem_new(TCG_AREG0, - offsetof(CPUCRISState, cc_size), - "cc_size"); - cc_mask = tcg_global_mem_new(TCG_AREG0, - offsetof(CPUCRISState, cc_mask), - "cc_mask"); + cpu_env = tcg_global_reg_new_ptr(TCG_AREG0, "env"); + cc_x = tcg_global_mem_new(TCG_AREG0, + offsetof(CPUCRISState, cc_x), "cc_x"); + cc_src = tcg_global_mem_new(TCG_AREG0, + offsetof(CPUCRISState, cc_src), "cc_src"); + cc_dest = tcg_global_mem_new(TCG_AREG0, + offsetof(CPUCRISState, cc_dest), + "cc_dest"); + cc_result = tcg_global_mem_new(TCG_AREG0, + offsetof(CPUCRISState, cc_result), + "cc_result"); + cc_op = tcg_global_mem_new(TCG_AREG0, + offsetof(CPUCRISState, cc_op), "cc_op"); + cc_size = tcg_global_mem_new(TCG_AREG0, + offsetof(CPUCRISState, cc_size), + "cc_size"); + cc_mask = tcg_global_mem_new(TCG_AREG0, + offsetof(CPUCRISState, cc_mask), + "cc_mask"); - env_pc = tcg_global_mem_new(TCG_AREG0, - offsetof(CPUCRISState, pc), - "pc"); - env_btarget = tcg_global_mem_new(TCG_AREG0, - offsetof(CPUCRISState, btarget), - "btarget"); - env_btaken = tcg_global_mem_new(TCG_AREG0, - offsetof(CPUCRISState, btaken), - "btaken"); - for (i = 0; i < 16; i++) { - cpu_R[i] = tcg_global_mem_new(TCG_AREG0, - offsetof(CPUCRISState, regs[i]), - regnames[i]); - } - for (i = 0; i < 16; i++) { - cpu_PR[i] = tcg_global_mem_new(TCG_AREG0, - offsetof(CPUCRISState, pregs[i]), - pregnames[i]); - } + env_pc = tcg_global_mem_new(TCG_AREG0, + offsetof(CPUCRISState, pc), + "pc"); + env_btarget = tcg_global_mem_new(TCG_AREG0, + offsetof(CPUCRISState, btarget), + "btarget"); + env_btaken = tcg_global_mem_new(TCG_AREG0, + offsetof(CPUCRISState, btaken), + "btaken"); + for (i = 0; i < 16; i++) { + cpu_R[i] = tcg_global_mem_new(TCG_AREG0, + offsetof(CPUCRISState, regs[i]), + regnames[i]); + } + for (i = 0; i < 16; i++) { + cpu_PR[i] = tcg_global_mem_new(TCG_AREG0, + offsetof(CPUCRISState, pregs[i]), + pregnames[i]); + } - return env; + return env; } void cpu_state_reset(CPUCRISState *env)