From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id YDiTJEplV2fTzgkAWB0awg (envelope-from ) for ; Mon, 09 Dec 2024 16:46:50 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=CSF40p2K; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 919771E097; Mon, 9 Dec 2024 16:46:50 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 3A2691E05C for ; Mon, 9 Dec 2024 16:46:50 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DC0613858288 for ; Mon, 9 Dec 2024 21:46:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DC0613858288 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=CSF40p2K Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 6B1383858415 for ; Mon, 9 Dec 2024 21:46:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6B1383858415 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6B1383858415 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1733780775; cv=none; b=AK4y/nDlgqNjmeJ0ekb3205zVovMMyxJFFwbORrfkkZR6MPC+6adIPAHt2QaXAh0taiWeKu+CrLWQLCdMGVc4cftOw+g7B/O4nBYbSMlCQ5i8AgEpKevz2xCKJOJ5sV3NnetyPuUBYaR8nB70kj3xJpG8zWMZowLj8B2T5/0JGQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1733780775; c=relaxed/simple; bh=Lm/rwaZ3R0USozI8O9Kbu+V/Dq2AcAYrLX1tJHBUaKE=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=N2FNaCURL0ctb39aVXn2U5rn1dw6AnWG0zQqJsqNs3+SbcSbJ/zugG5EGSoWm/HSee1XOG+rjucDSe5K71qosOgLvw0sO4xBELxH3HKEj6wCFrIPc01JbcWH/Jqx+fXHZCu+6HcKoYeRxH1VpZ0Z28s9SlqKHUjc1bgmP6Gc7ig= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6B1383858415 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733780775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TomcnzvNYslOec1yMErTAbh0Rc4d52Sje6rig+tYOeE=; b=CSF40p2KduM+MTD1EKqyKqd/TFegchAgUPMgDLmUgEAn6SBU4ebudN724WdqAEa80mZd4V 1xv8PZEQo+7O/w2S9Vb5CkCHG4EYERPcUferqJsKACGhXJy3RE9J4Z79NLxynNLvkDXHu6 EcRiRRjaEVVVxkfQR6YKjLSTf8V77iM= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-212-OIAtr956MfW_EBUJPPMiiA-1; Mon, 09 Dec 2024 16:46:12 -0500 X-MC-Unique: OIAtr956MfW_EBUJPPMiiA-1 X-Mimecast-MFC-AGG-ID: OIAtr956MfW_EBUJPPMiiA Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 72774193F048; Mon, 9 Dec 2024 21:46:10 +0000 (UTC) Received: from f40-zbm-amd (unknown [10.22.80.92]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C88361956089; Mon, 9 Dec 2024 21:46:07 +0000 (UTC) Date: Mon, 9 Dec 2024 14:46:02 -0700 From: Kevin Buettner To: Milica Matic Cc: gdb-patches@sourceware.org, Djordje Todorovic , Milos Kalicanin , Simon Marchi , Chao-ying Fu , Andrew Burgess , "Maciej W. Rozycki" Subject: Re: [PATCH^7] gdb: mips: Add MIPSR6 support Message-ID: <20241209144602.54286b31@f40-zbm-amd> In-Reply-To: References: Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: X-24KeGqdBxGRzHadF0_Jrq5YLxqR-Zi280TqJAo_sg_1733780770 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Hi Milica, Thanks for adding comments on new functions introduced by your patch. I still found a few nits; see below... On Mon, 9 Dec 2024 17:01:07 +0000 Milica Matic wrote: > return extract_unsigned_integer (buf, instlen, byte_order); > } > > + You are still introducing a extraneous newline here. See: https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards#Whitespaces Relevant quote from that link: "..., do not use more than one blank line to separate blocks,..." > - if (op >> 2 == 5) > - /* BEQL, BNEL, BLEZL, BGTZL: bits 0101xx */ > - { > - switch (op & 0x03) > - { > - case 0: /* BEQL */ > - goto equal_branch; > - case 1: /* BNEL */ > - goto neq_branch; > - case 2: /* BLEZL */ > - goto less_branch; > - case 3: /* BGTZL */ > - goto greater_branch; > - default: > - pc += 4; > - } > - } > + if (op >> 2 == 5 && ((op & 0x02) == 0 || itype_rt (inst) == 0)) > + /* BEQL, BNEL, BLEZL, BGTZL: bits 0101xx */ > + { > + switch (op & 0x03) > + { > + case 0: /* BEQL */ > + goto equal_branch; > + case 1: /* BNEL */ > + goto neq_branch; > + case 2: /* BLEZL */ > + goto lez_branch; > + case 3: /* BGTZL */ > + goto greater_branch; > + default: > + pc += 4; > + } > + } In this change, it appears that leading tabs were replaced by spaces. The GDB project prefers that tabs be used in place of leading spaces. See: https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards#Code_indentation Relevant quote from that link: "Lines should be indented with a mix of tabs and spaces. 8 spaces should be replaced with Tab." > else if (op == 17 && itype_rs (inst) == 8) > - /* BC1F, BC1FL, BC1T, BC1TL: 010001 01000 */ > - pc = mips32_bc1_pc (gdbarch, regcache, inst, pc + 4, 1); > - else if (op == 17 && itype_rs (inst) == 9 > + /* BC1F, BC1FL, BC1T, BC1TL: 010001 01000 */ > + pc = mips32_bc1_pc (gdbarch, regcache, inst, pc + 4, 1); > + else if (!is_mipsr6_isa (gdbarch) > + && op == 17 > + && itype_rs (inst) == 9 For the above change, and elsewhere too, make sure that you use tabs in place of 8 spaces for the leading indentation. (See above.) Kevin