From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ywLnJNa1sWA5bQAAWB0awg (envelope-from ) for ; Fri, 28 May 2021 23:32:38 -0400 Received: by simark.ca (Postfix, from userid 112) id 855DF1F11C; Fri, 28 May 2021 23:32:38 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 4C9E31E783 for ; Fri, 28 May 2021 23:32:37 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9B0D6385480B; Sat, 29 May 2021 03:32:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9B0D6385480B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1622259156; bh=FREnRqOhwfoTn9AUTRGHs13VK1PYSWL6C68ViSNrSuI=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=mtfr+AuGmVqiyWCEOOhifdahx533tWSOGXVjSw8MVTFfPOkUzXjeGo3voa4qdJGE/ nim5nAuKpm2ITdOEEVUrviI8KYdyKj/jxExcfM4brw2ipXDYJ4VgoiViRS4aydfMlH Ngkto0arumrgnr3VbD4EigQUT/9sQ3qmk2gr8HS4= Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id B55383857C74 for ; Sat, 29 May 2021 03:32:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B55383857C74 Received: from vapier (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 84058340D23; Sat, 29 May 2021 03:32:33 +0000 (UTC) Date: Fri, 28 May 2021 23:32:32 -0400 To: Simon Marchi Subject: Re: Sim bfin build failure with gcc 11 Message-ID: Mail-Followup-To: Simon Marchi , gdb-patches@sourceware.org References: <3e083bf0-ce0b-9e9c-4fc5-954d569bdea1@polymtl.ca> <53def67b-7cca-7d66-202c-cd0826537187@polymtl.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <53def67b-7cca-7d66-202c-cd0826537187@polymtl.ca> 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: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 28 May 2021 21:52, Simon Marchi via Gdb-patches wrote: > On 2021-05-23 10:16 p.m., Mike Frysinger wrote: > > static void > > bfin_otp_write_page (struct bfin_otp *otp, bu16 page) > > { > > - bfin_otp_write_page_val2 (otp, page, otp->data0, otp->data1); > > + bfin_otp_write_page_val2 (otp, page, (bu64)otp->data1 | otp->data0, > > + (bu64)otp->data3 | otp->data2); > > I really don't know what this is doing but... did you mean to have some > shifts in there? err, yeah. thanks. -mike commit f006d9e205f729aad48c0876eb8cd8feb70a6972 Author: Mike Frysinger Date: Fri May 28 23:29:40 2021 -0400 sim: bfin: fix the otp fix fix Need to shift the upper 32-bits and not just combine directly with the lower 32-bits. diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 29dfde8fe6e3..e5b644990947 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,7 @@ +2021-05-28 Mike Frysinger + + * dv-bfin_otp.c (bfin_otp_write_page): Shift data1 & data3 by 32-bits. + 2021-05-23 Mike Frysinger * dv-bfin_otp.c (bfin_otp_write_page): Fix args to diff --git a/sim/bfin/dv-bfin_otp.c b/sim/bfin/dv-bfin_otp.c index cdc010ae551b..a9f768d0c0ea 100644 --- a/sim/bfin/dv-bfin_otp.c +++ b/sim/bfin/dv-bfin_otp.c @@ -91,8 +91,8 @@ bfin_otp_write_page_val2 (struct bfin_otp *otp, bu16 page, bu64 lo, bu64 hi) static void bfin_otp_write_page (struct bfin_otp *otp, bu16 page) { - bfin_otp_write_page_val2 (otp, page, (bu64)otp->data1 | otp->data0, - (bu64)otp->data3 | otp->data2); + bfin_otp_write_page_val2 (otp, page, ((bu64)otp->data1 << 32) | otp->data0, + ((bu64)otp->data3 << 32) | otp->data2); } static unsigned