From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id IGL8DUkXUWNYsA4AWB0awg (envelope-from ) for ; Thu, 20 Oct 2022 05:39:21 -0400 Received: by simark.ca (Postfix, from userid 112) id 374E21E112; Thu, 20 Oct 2022 05:39:21 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=rXf4dTBx; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (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 simark.ca (Postfix) with ESMTPS id DEBBA1E0D5 for ; Thu, 20 Oct 2022 05:39:20 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2A398396E804 for ; Thu, 20 Oct 2022 09:38:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A398396E804 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666258690; bh=r0aaAv7OLLsxbWQ3RLGxINi4GmezOuh09aFpYxc1dNk=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=rXf4dTBxDbQtm3rxpC03uQbUPiXDmp6ElEdipMVPJ3iAdARfJI7O2Xwf5keIZDKCF BN3QLqO7iIangVHmMAzrqb4XhH96p8YoL5A9s3aUiZnI3Pg3Wg73tsIpJ4/zg+dCc5 oUHuDW4QUgc7cZIumyDC6PFPb/5A2VPQT5uDMGWg= Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id 565FA381F73E for ; Thu, 20 Oct 2022 09:34:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 565FA381F73E Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 96C9D300089; Thu, 20 Oct 2022 09:34:49 +0000 (UTC) To: Tsukasa OI , Andrew Burgess , Mike Frysinger , Nick Clifton Subject: [PATCH 11/40] cpu/frv: Initialize some variables Date: Thu, 20 Oct 2022 09:32:16 +0000 Message-Id: In-Reply-To: References: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tsukasa OI via Gdb-patches Reply-To: Tsukasa OI Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" GCC generates a warning if a variable may be used uninitialized on some cases ("-Wmaybe-uninitialized"). Despite that this will not cause a build failure even on the default configuration (with "--enable-werror"), it is better to be fixed. The cause of this warning, sim/frv/sem.c is generated by CGEN from cpu/frv.cpu. This commit adds initialization of some variables that caused GCC warnings. cpu/ChangeLog: * frv.cpu (cmpb): Initialize cc variable. (load-double-gr-u-semantics, clddu) Initialize address variable. --- cpu/frv.cpu | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpu/frv.cpu b/cpu/frv.cpu index cdb169eddc1..6af8c3ab347 100644 --- a/cpu/frv.cpu +++ b/cpu/frv.cpu @@ -4266,6 +4266,7 @@ "cmpb$pack $GRi,$GRj,$ICCi_1" (+ pack (GRk-null) OP_00 GRi ICCi_1 OPE2_0C GRj) (sequence ((QI cc)) + (set cc 0) (set-n cc (eq (and GRi #xff000000) (and GRj #xff000000))) (set-z cc (eq (and GRi #x00ff0000) (and GRj #x00ff0000))) (set-v cc (eq (and GRi #x0000ff00) (and GRj #x0000ff00))) @@ -4655,6 +4656,7 @@ (define-pmacro (load-double-gr-u-semantics) (sequence ((WI address)) + (set address 0) (load-double-semantics 0 DI GR address GRj) (if (ne (index-of GRi) (index-of GRdoublek)) (sequence () @@ -5309,6 +5311,7 @@ (+ pack GRdoublek OP_62 GRi CCi cond OPE4_1 GRj) (if (eq CCi (or cond 2)) (sequence ((WI address)) + (set address 0) (load-double-semantics 0 DI GR address GRj) (if (ne (index-of GRi) (index-of GRdoublek)) (set GRi address)))) -- 2.34.1