From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 692F33894424 for ; Tue, 15 Jun 2021 05:11:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 692F33894424 Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 94244340E71 for ; Tue, 15 Jun 2021 05:11:42 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH 2/6] sim: mips: add casts to fpu conversions Date: Tue, 15 Jun 2021 01:11:37 -0400 Message-Id: <20210615051141.4801-2-vapier@gentoo.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210615051141.4801-1-vapier@gentoo.org> References: <20210615051141.4801-1-vapier@gentoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Tue, 15 Jun 2021 05:11:44 -0000 These funcs expect signed int pointers, but the code uses unsigned. --- sim/mips/cp1.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sim/mips/cp1.c b/sim/mips/cp1.c index 03ed0c0558ff..b9c7a4b8074f 100644 --- a/sim/mips/cp1.c +++ b/sim/mips/cp1.c @@ -1422,11 +1422,11 @@ convert (sim_cpu *cpu, sim_fpu_to64 (&result64, &wop); break; case fmt_word: - status |= sim_fpu_to32i (&result32, &wop, round); + status |= sim_fpu_to32i ((void*)&result32, &wop, round); result64 = result32; break; case fmt_long: - status |= sim_fpu_to64i (&result64, &wop, round); + status |= sim_fpu_to64i ((void*)&result64, &wop, round); break; default: result64 = 0; @@ -1525,8 +1525,8 @@ convert_ps (sim_cpu *cpu, switch (to) { case fmt_word: /* fmt_pw */ - status_u |= sim_fpu_to32i (&res_u, &wop_u, round); - status_l |= sim_fpu_to32i (&res_l, &wop_l, round); + status_u |= sim_fpu_to32i ((void*)&res_u, &wop_u, round); + status_l |= sim_fpu_to32i ((void*)&res_l, &wop_l, round); result = (((unsigned64)res_u) << 32) | (unsigned64)res_l; break; case fmt_ps: -- 2.31.1