From nobody Mon Feb 9 23:58:10 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=1556259120; cv=none; d=zoho.com; s=zohoarc; b=FxJNOJDCu9w8900gFYb4Vm+l3Ke1+O7DDh+3WKzEB8PGtnglVzTzzv9GLwA2slig2KftLSxbFiOvJkfFPEALeNFAVgCyiFuScYLruvrBk3XcRlFfySOBk56Bc34mlub6iVLAetwLVVXG4UcOiYn7VLvk+a7aTzYt2Ns6C7D082c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556259120; 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=/pifdfu4VgP5Z84EYMGA1gcTK2B41vMRtWFYoAXwNuk=; b=mbwJp7YHrL5iuOLSV2ttTLlZ0Rdh3WnGSHAfV0H0dmmEyx1r/5C3Q7W2nOUUldygCg8XedQnzJPeoKCIEcXFDThg6gdkLA7DLND7WOWzZBAAi/OttDTP1V0RpwIZ1NlLni9PmsYEiznczDpADztz0eHuTA/uZikRUBQIrVu+4Ls= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1556259120296240.54106778621394; Thu, 25 Apr 2019 23:12:00 -0700 (PDT) Received: from localhost ([127.0.0.1]:39941 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJu5T-0001Zn-6l for importer@patchew.org; Fri, 26 Apr 2019 02:11:55 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJu0X-0005Rm-45 for qemu-devel@nongnu.org; Fri, 26 Apr 2019 02:06:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJu0V-0004NO-FE for qemu-devel@nongnu.org; Fri, 26 Apr 2019 02:06:49 -0400 Received: from ozlabs.org ([203.11.71.1]:44461) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hJu0V-0004IM-2v; Fri, 26 Apr 2019 02:06:47 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 44r3Tl4Tmfz9sDn; 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=1556258795; bh=+NSCKHsz7Epefi0fzIqxusInerJTGVGvLh4ho+rkMlM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EQ7xL+Q0R4YG/bdYQYQF4yo3QX+9tyoed1chkIROqBkgNKy/twoejln6koCLw3urO 227NoQMBEizAlpUsuiReNyieAmfTxKJO0OiChNyBqN5J+rN+zl7GD4WQJec5xlB5p8 jNNqUIn25Yv0RNhETPjaHChW452L4HbOcJA7a+ik= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 26 Apr 2019 16:06:02 +1000 Message-Id: <20190426060627.18153-12-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: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 203.11.71.1 Subject: [Qemu-devel] [PULL 11/36] target/ppc: Style fixes for gdbstub.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/gdbstub.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/target/ppc/gdbstub.c b/target/ppc/gdbstub.c index fbf3821f4b..ce3625f44e 100644 --- a/target/ppc/gdbstub.c +++ b/target/ppc/gdbstub.c @@ -33,14 +33,14 @@ static int ppc_gdb_register_len_apple(int n) return 8; case 64 ... 95: return 16; - case 64+32: /* nip */ - case 65+32: /* msr */ - case 67+32: /* lr */ - case 68+32: /* ctr */ - case 70+32: /* fpscr */ + case 64 + 32: /* nip */ + case 65 + 32: /* msr */ + case 67 + 32: /* lr */ + case 68 + 32: /* ctr */ + case 70 + 32: /* fpscr */ return 8; - case 66+32: /* cr */ - case 69+32: /* xer */ + case 66 + 32: /* cr */ + case 69 + 32: /* xer */ return 4; default: return 0; @@ -84,11 +84,14 @@ static int ppc_gdb_register_len(int n) } } =20 -/* We need to present the registers to gdb in the "current" memory orderin= g. - For user-only mode we get this for free; TARGET_WORDS_BIGENDIAN is set = to - the proper ordering for the binary, and cannot be changed. - For system mode, TARGET_WORDS_BIGENDIAN is always set, and we must check - the current mode of the chip to see if we're running in little-endian. = */ +/* + * We need to present the registers to gdb in the "current" memory + * ordering. For user-only mode we get this for free; + * TARGET_WORDS_BIGENDIAN is set to the proper ordering for the + * binary, and cannot be changed. For system mode, + * TARGET_WORDS_BIGENDIAN is always set, and we must check the current + * mode of the chip to see if we're running in little-endian. + */ void ppc_maybe_bswap_register(CPUPPCState *env, uint8_t *mem_buf, int len) { #ifndef CONFIG_USER_ONLY @@ -104,11 +107,12 @@ void ppc_maybe_bswap_register(CPUPPCState *env, uint8= _t *mem_buf, int len) #endif } =20 -/* Old gdb always expects FP registers. Newer (xml-aware) gdb only +/* + * Old gdb always expects FP registers. Newer (xml-aware) gdb only * expects whatever the target description contains. Due to a * historical mishap the FP registers appear in between core integer - * regs and PC, MSR, CR, and so forth. We hack round this by giving the - * FP regs zero size when talking to a newer gdb. + * regs and PC, MSR, CR, and so forth. We hack round this by giving + * the FP regs zero size when talking to a newer gdb. */ =20 int ppc_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n) --=20 2.20.1