From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A9F9CC10F16 for ; Mon, 6 May 2024 12:39:44 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3xca-0002oB-OW; Mon, 06 May 2024 08:39:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3xcF-0001u5-C7 for qemu-devel@nongnu.org; Mon, 06 May 2024 08:38:48 -0400 Received: from ik1-413-38519.vs.sakura.ne.jp ([153.127.30.23] helo=sakura.ysato.name) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3xcD-00022i-3U for qemu-devel@nongnu.org; Mon, 06 May 2024 08:38:47 -0400 Received: from SIOS1075.ysato.ml (ZM005235.ppp.dion.ne.jp [222.8.5.235]) by sakura.ysato.name (Postfix) with ESMTPSA id 3643A1C00D7; Mon, 6 May 2024 21:38:37 +0900 (JST) Date: Mon, 06 May 2024 21:38:34 +0900 Message-ID: <87o79j15f9.wl-ysato@users.sourceforge.jp> From: Yoshinori Sato To: Michael Tokarev Cc: Richard Henderson , qemu-devel@nongnu.org, zack@buhman.org, peter.maydell@linaro.org, Cole Robinson , Philippe =?ISO-8859-1?Q?Mathieu-Daud=E9?= Subject: Re: [PATCH for-9.0 v3 0/4] target/sh4: Fix mac.[lw] In-Reply-To: <26711de4-180b-4448-8d79-30efec984900@tls.msk.ru> References: <20240406053732.191398-1-richard.henderson@linaro.org> <26711de4-180b-4448-8d79-30efec984900@tls.msk.ru> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Received-SPF: softfail client-ip=153.127.30.23; envelope-from=ysato@users.sourceforge.jp; helo=sakura.ysato.name X-Spam_score_int: -9 X-Spam_score: -1.0 X-Spam_bar: - X-Spam_report: (-1.0 / 5.0 requ) BAYES_00=-1.9, KHOP_HELO_FCRDNS=0.259, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On Sat, 04 May 2024 17:25:52 +0900, Michael Tokarev wrote: > > 06.04.2024 08:37, Richard Henderson wrote: > > Zack's recent patches, tidied a little bit, and with > > test cases added. > > These fixes ended up in stable-8.2, but not in stable-7.2. > This is because in 7.2, the context is a bit different. > > Later, a couple other fixes in this area come from Philippe > (Fix ADDV & SUBV opcodes) which are easy to pick up but it > wants changes in tests/tcg/sh4/Makefile.target introduced > in this patchset. > > b0f2f2976b "target/sh4: mac.w: memory accesses are 16-bit words" > also needs 03a0d87e8d "target/sh4: Use MO_ALIGN where required", > but this one, while simple, is a big one and doesn't apply to > 7.2 directly in many places in target/sh4/translate.c, in parts > due to bebd5cb300 "target/sh4: Drop tcg_temp_free" (but can be > easily tweaked manually). > > Or I can hand-apply b0f2f2976b (s/MO_TESL/MO_TESW) without > 03a0d87e8d (add MO_ALIGN). > > Does picking up this stuff for 7.2 make sense? > > (Cc'ing Cole for general stable-7.2 feedback on redhat side). > > Thanks, > > /mjt > > > Richard Henderson (1): > > target/sh4: Merge mach and macl into a union > > > > Zack Buhman (3): > > target/sh4: mac.w: memory accesses are 16-bit words > > target/sh4: Fix mac.l with saturation enabled > > target/sh4: Fix mac.w with saturation enabled > > > > target/sh4/cpu.h | 14 ++++++-- > > target/sh4/helper.h | 4 +-- > > target/sh4/op_helper.c | 51 +++++++++++++++----------- > > target/sh4/translate.c | 4 +-- > > tests/tcg/sh4/test-macl.c | 67 +++++++++++++++++++++++++++++++++++ > > tests/tcg/sh4/test-macw.c | 61 +++++++++++++++++++++++++++++++ > > tests/tcg/sh4/Makefile.target | 8 +++++ > > 7 files changed, 182 insertions(+), 27 deletions(-) > > create mode 100644 tests/tcg/sh4/test-macl.c > > create mode 100644 tests/tcg/sh4/test-macw.c > > > > -- > GPG Key transition (from rsa2048 to rsa4096) since 2024-04-24. > New key: rsa4096/61AD3D98ECDF2C8E 9D8B E14E 3F2A 9DD7 9199 28F1 61AD 3D98 ECDF 2C8E > Old key: rsa2048/457CE0A0804465C5 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044 65C5 > Transition statement: http://www.corpit.ru/mjt/gpg-transition-2024.txt > Does this mean you changed it like this? I think this is fine. index 7db3468b01..f3bf0fc50a 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -844,9 +844,9 @@ static void _decode_opc(DisasContext * ctx) { TCGv arg0, arg1; arg0 = tcg_temp_new(); - tcg_gen_qemu_ld_i32(arg0, REG(B7_4), ctx->memidx, MO_TESL); + tcg_gen_qemu_ld_i32(arg0, REG(B7_4), ctx->memidx, MO_TESW); arg1 = tcg_temp_new(); - tcg_gen_qemu_ld_i32(arg1, REG(B11_8), ctx->memidx, MO_TESL); + tcg_gen_qemu_ld_i32(arg1, REG(B11_8), ctx->memidx, MO_TESW); gen_helper_macw(cpu_env, arg0, arg1); tcg_temp_free(arg1); tcg_temp_free(arg0); -- Yosinori Sato