From nobody Tue Feb 10 00:59:50 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1556259817; cv=none; d=zoho.com; s=zohoarc; b=TFOxYJ23S1nlr0motftIN8W3ZcNzAQ+CXa0NCZhw7mYgXGglwBygfzq116VDBFi3FU5FGI5u5CsYxp5BjH6ip4BYjfwkJw+j/U9bGVfwQ1Ksa68f/c5cctC6xNoi1uDoaW/fY4RSMmE6tSGYMJArxPEd5JitIP4LCC0ZEor2A4I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556259817; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=l5uzHi2dh0kc/RDL4zUG5AvKiL5YKRfazMnSUuYfjKw=; b=F2n6Zr8GQD4N8KhF3Qh2/nT0rRcq256LMVIboKfwcBysGUwsYOboGfjRL13IknNHHSRR4MJscrIFK1bGXnesHrDW8ocTSRR6T58Ao3ZdwVBRYxTFqp4DrL5UplBG2m9X34ITd7b89hPccYgTzEkCrHAK3h/grjEiRVWmzLuSyC0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1556259817273614.2432249929237; Thu, 25 Apr 2019 23:23:37 -0700 (PDT) Received: from localhost ([127.0.0.1]:40135 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJuGh-0005as-6b for importer@patchew.org; Fri, 26 Apr 2019 02:23:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJu0u-0005w8-BN for qemu-devel@nongnu.org; Fri, 26 Apr 2019 02:07:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJu0t-00050I-5S for qemu-devel@nongnu.org; Fri, 26 Apr 2019 02:07:12 -0400 Received: from bilbo.ozlabs.org ([2401:3900:2:1::2]:54589 helo=ozlabs.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hJu0s-0004PT-FC; Fri, 26 Apr 2019 02:07:11 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 44r3Tm75fHz9sNK; Fri, 26 Apr 2019 16:06:35 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1556258797; bh=71hNapxXxJkb7FPRMtgPHqs6/xQm5Ig6vi2upazg1nU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eHwuYmN8EJgvuJpmwKBft0GCCAxyQx1+R2kUQOL8P84GrPimRd0cbqmYoQT3uEalu TSFLzeteLJ47j2tHrNNL3lfLpBjFxz8LHLq8w8ciKkLaZP2BuGNxA+Q9G4xZ8ndzla EHqS4zJAuy2iCpscY8Ap4HP0HgzfzjH8gm447ArA= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 26 Apr 2019 16:06:06 +1000 Message-Id: <20190426060627.18153-16-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190426060627.18153-1-david@gibson.dropbear.id.au> References: <20190426060627.18153-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 15/36] target/ppc: Style fixes for mem_helper.c 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: gkurz@kaod.org, Greg Kurz , qemu-devel@nongnu.org, qemu-ppc@nongnu.org, clg@kaod.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: David Gibson Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Greg Kurz --- target/ppc/mem_helper.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/target/ppc/mem_helper.c b/target/ppc/mem_helper.c index 9c5a68579e..5b0f9ee50d 100644 --- a/target/ppc/mem_helper.c +++ b/target/ppc/mem_helper.c @@ -27,7 +27,7 @@ #include "internal.h" #include "qemu/atomic128.h" =20 -//#define DEBUG_OP +/* #define DEBUG_OP */ =20 static inline bool needs_byteswap(const CPUPPCState *env) { @@ -103,10 +103,11 @@ void helper_lsw(CPUPPCState *env, target_ulong addr, = uint32_t nb, uint32_t reg) do_lsw(env, addr, nb, reg, GETPC()); } =20 -/* PPC32 specification says we must generate an exception if - * rA is in the range of registers to be loaded. - * In an other hand, IBM says this is valid, but rA won't be loaded. - * For now, I'll follow the spec... +/* + * PPC32 specification says we must generate an exception if rA is in + * the range of registers to be loaded. In an other hand, IBM says + * this is valid, but rA won't be loaded. For now, I'll follow the + * spec... */ void helper_lswx(CPUPPCState *env, target_ulong addr, uint32_t reg, uint32_t ra, uint32_t rb) @@ -199,7 +200,8 @@ void helper_dcbzep(CPUPPCState *env, target_ulong addr,= uint32_t opcode) void helper_icbi(CPUPPCState *env, target_ulong addr) { addr &=3D ~(env->dcache_line_size - 1); - /* Invalidate one cache line : + /* + * Invalidate one cache line : * PowerPC specification says this is to be treated like a load * (not a fetch) by the MMU. To be sure it will be so, * do the load "by hand". @@ -346,17 +348,19 @@ uint32_t helper_stqcx_be_parallel(CPUPPCState *env, t= arget_ulong addr, #define LO_IDX 0 #endif =20 -/* We use msr_le to determine index ordering in a vector. However, - byteswapping is not simply controlled by msr_le. We also need to take - into account endianness of the target. This is done for the little-end= ian - PPC64 user-mode target. */ +/* + * We use msr_le to determine index ordering in a vector. However, + * byteswapping is not simply controlled by msr_le. We also need to + * take into account endianness of the target. This is done for the + * little-endian PPC64 user-mode target. + */ =20 #define LVE(name, access, swap, element) \ void helper_##name(CPUPPCState *env, ppc_avr_t *r, \ target_ulong addr) \ { \ size_t n_elems =3D ARRAY_SIZE(r->element); \ - int adjust =3D HI_IDX*(n_elems - 1); \ + int adjust =3D HI_IDX * (n_elems - 1); \ int sh =3D sizeof(r->element[0]) >> 1; \ int index =3D (addr & 0xf) >> sh; \ if (msr_le) { \ @@ -476,12 +480,13 @@ VSX_STXVL(stxvll, 1) =20 void helper_tbegin(CPUPPCState *env) { - /* As a degenerate implementation, always fail tbegin. The reason + /* + * As a degenerate implementation, always fail tbegin. The reason * given is "Nesting overflow". The "persistent" bit is set, * providing a hint to the error handler to not retry. The TFIAR * captures the address of the failure, which is this tbegin - * instruction. Instruction execution will continue with the - * next instruction in memory, which is precisely what we want. + * instruction. Instruction execution will continue with the next + * instruction in memory, which is precisely what we want. */ =20 env->spr[SPR_TEXASR] =3D --=20 2.20.1