From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id 610DD381DC60 for ; Thu, 20 Oct 2022 09:28:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 610DD381DC60 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=irq.a4lg.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=irq.a4lg.com Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id BAE09300089; Thu, 20 Oct 2022 09:28:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq.a4lg.com; s=2017s01; t=1666258112; bh=r0aaAv7OLLsxbWQ3RLGxINi4GmezOuh09aFpYxc1dNk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Mime-Version:Content-Transfer-Encoding; b=Fgj4Tq2zVSoJZ9Mgy1Vudiv2ttEeWr4yhOTi+1dnOd1WZ7REVJd5gu+YiReVbME4j Y25LnR+bPZ9F1g2ft53yZUjwm8AuCzLSsSb2nwxNQvjL1dIlmEZalO3kk1DvH6zTni 4mtx+I6GPhvNHbuY44unbgLuJZ9TF9hzBsPeG07M= From: Tsukasa OI To: Tsukasa OI , Andrew Burgess , Mike Frysinger , Nick Clifton Cc: binutils@sourceware.org Subject: [PATCH 11/40] cpu/frv: Initialize some variables Date: Thu, 20 Oct 2022 09:25:57 +0000 Message-Id: In-Reply-To: References: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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