From nobody Tue Nov 26 08:54:44 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1709356755; cv=none; d=zohomail.com; s=zohoarc; b=OZ6yJ3yv40K5rt11PWdrtl4qHprb8CFZbk5FOT3djKTqbJlD363XI9BHM5Zq6Q4x/+bmswzttMcQiWkNGjla8CTAv4088yzcfZLEPSHyuxdPhZNWvLbyrfb+wjFkWpGBgWj7vYT1n+Rkr3EPRWhNuZ7hsockz4mW4rR8c8ZNIZc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709356755; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=l1ra1voUNK7VumvOysSOTdB5wAQkGxh/tYoZzjk/66s=; b=GnVPmjAq5zvIjA1Y7RBYjK4DQDc9ss5VQRdlNXRUm3tAv0G11XGzversf21incUgfr77ReBiN//sMUDCi7gacGFfbOIN0GpoknO06sfcTU9y05ALOBeNBemNTwyTLSioOmUCw2J+vDb53xEkz9lAhdi+J7sISs/kRdf5B0uf5y8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1709356755886939.9054740513819; Fri, 1 Mar 2024 21:19:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rgHjy-0002z6-Ra; Sat, 02 Mar 2024 00:16:54 -0500 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 1rgHjw-0002vt-IF for qemu-devel@nongnu.org; Sat, 02 Mar 2024 00:16:52 -0500 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rgHju-0007aM-Tx for qemu-devel@nongnu.org; Sat, 02 Mar 2024 00:16:52 -0500 Received: by mail-pg1-x535.google.com with SMTP id 41be03b00d2f7-5e42b4bbfa4so2055218a12.1 for ; Fri, 01 Mar 2024 21:16:50 -0800 (PST) Received: from stoup.. (098-147-055-211.res.spectrum.com. [98.147.55.211]) by smtp.gmail.com with ESMTPSA id v8-20020a17090a458800b0029af67d4fd0sm4034901pjg.44.2024.03.01.21.16.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 21:16:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709356609; x=1709961409; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=l1ra1voUNK7VumvOysSOTdB5wAQkGxh/tYoZzjk/66s=; b=OGW891UtAj3u/rccOtn4aiQTDI5v+Wa7RrnE8ZmKoknRjLW0AGiL4opbOxJ+8eXU9d 4rTKLVb5q1r3x1qpBNuLUxLNHN8wWTZCJHVo5mA56NdSj7zFBaCR40q5qqzoS1j4I4P9 /YEcdg7Q3J+sxQkJokLEhPZCTUwqUM0QfmR+nTpCJQAx87fZrSFdgRdunVr3/fhjsy99 6PvjMxDem+wycFXf+RUapPoPQuTwlHlzgcUFX4xxibJl1eNYUE1q6CLMeC6FdvrDbe8S 9uzHM3Dxx02g24iubqXNAGzAyMoNJlpvGrmsrW0XV1KDYpGtHl92nj3RRKJRx0VulMHS Sh0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709356609; x=1709961409; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=l1ra1voUNK7VumvOysSOTdB5wAQkGxh/tYoZzjk/66s=; b=rxRywirzSNju/xhXXt+PLmqH7nq818qaRPTvAk+PBWLyecXoYID1UL0HeHItcpvgYq q5Auy3QETJEfdsglEfzawznVRT8TgCgyyMhPRHaXvECJN0NRgNhCaVehq6oW6Uq4PYCY F0u2WQFf9DYIJ7fFzvvMq34JdnaTNOUPSAFBioNodZl3mdyxSMbMQMSA4Y+YGd09k948 KOWBaqM/hQvyPauBs2pexVWv77Pe5PMDQSd5BzcvpOpoV/scn1RHh/mpnJxK1bcpTCai Fr5IapNolkk3fJl4QQGecxw1n6px949xO9BMAvrDCddQ2mCsd8ajm9p04gw6OeRr4CZm RN3w== X-Gm-Message-State: AOJu0YwVWiwmYqLJVtpQDrRDIM9yaN0kyTHVxCTFOVy0XcYDWKJQdAwB vKf4NS/I2E8LIGi4DV5RNcg2PnYdOzjkQchRke0gNjSNcHv4463nosDLkuosG7y5G/+weaD1Ehz J X-Google-Smtp-Source: AGHT+IGrT2935u4vZPSTLEh0pHV2aj4Nkq1qZpIplP00flexrmHDTGNpkSy0+/f+o4+hjEr0lYK/Ww== X-Received: by 2002:a05:6a20:4296:b0:1a1:45f1:562c with SMTP id o22-20020a056a20429600b001a145f1562cmr1234868pzj.6.1709356608993; Fri, 01 Mar 2024 21:16:48 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com Subject: [PATCH 27/41] target/sparc: Implement MOVsTOw, MOVdTOx, MOVwTOs, MOVxTOd Date: Fri, 1 Mar 2024 19:15:47 -1000 Message-Id: <20240302051601.53649-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240302051601.53649-1-richard.henderson@linaro.org> References: <20240302051601.53649-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::535; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x535.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1709356756984100013 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson --- target/sparc/translate.c | 36 ++++++++++++++++++++++++++++++++++++ target/sparc/insns.decode | 6 ++++++ 2 files changed, 42 insertions(+) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 761ae204b9..70d87a68cc 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -5393,6 +5393,42 @@ static bool trans_FLCMPd(DisasContext *dc, arg_FLCMP= d *a) return advance_pc(dc); } =20 +static bool do_movf2r(DisasContext *dc, arg_r_r *a, + int (*offset)(unsigned int), + void (*load)(TCGv, TCGv_ptr, tcg_target_long)) +{ + TCGv dst; + + if (gen_trap_ifnofpu(dc)) { + return true; + } + dst =3D gen_dest_gpr(dc, a->rd); + load(dst, tcg_env, offset(a->rs)); + gen_store_gpr(dc, a->rd, dst); + return advance_pc(dc); +} + +TRANS(MOVsTOsw, VIS3B, do_movf2r, a, gen_offset_fpr_F, tcg_gen_ld32s_tl) +TRANS(MOVsTOuw, VIS3B, do_movf2r, a, gen_offset_fpr_F, tcg_gen_ld32u_tl) +TRANS(MOVdTOx, VIS3B, do_movf2r, a, gen_offset_fpr_D, tcg_gen_ld_tl) + +static bool do_movr2f(DisasContext *dc, arg_r_r *a, + int (*offset)(unsigned int), + void (*store)(TCGv, TCGv_ptr, tcg_target_long)) +{ + TCGv src; + + if (gen_trap_ifnofpu(dc)) { + return true; + } + src =3D gen_load_gpr(dc, a->rs); + store(src, tcg_env, offset(a->rd)); + return advance_pc(dc); +} + +TRANS(MOVwTOs, VIS3B, do_movr2f, a, gen_offset_fpr_F, tcg_gen_st32_tl) +TRANS(MOVxTOd, VIS3B, do_movr2f, a, gen_offset_fpr_D, tcg_gen_st_tl) + static void sparc_tr_init_disas_context(DisasContextBase *dcbase, CPUState= *cs) { DisasContext *dc =3D container_of(dcbase, DisasContext, base); diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index f7f532002a..1189ad4c87 100644 --- a/target/sparc/insns.decode +++ b/target/sparc/insns.decode @@ -498,6 +498,12 @@ FCMPEq 10 000 cc:2 110101 ..... 0 0101 0111 ....= . \ FONEd 10 ..... 110110 00000 0 0111 1110 00000 rd=3D%dfp_rd FONEs 10 rd:5 110110 00000 0 0111 1111 00000 =20 + MOVsTOuw 10 ..... 110110 00000 1 0001 0001 ..... @r_r2 + MOVsTOsw 10 ..... 110110 00000 1 0001 0011 ..... @r_r2 + MOVwTOs 10 ..... 110110 00000 1 0001 1001 ..... @r_r2 + MOVdTOx 10 ..... 110110 00000 1 0001 0000 ..... @r_d2 + MOVxTOd 10 ..... 110110 00000 1 0001 1000 ..... @d_r2 + FLCMPs 10 000 cc:2 110110 rs1:5 1 0101 0001 rs2:5 FLCMPd 10 000 cc:2 110110 ..... 1 0101 0010 ..... \ rs1=3D%dfp_rs1 rs2=3D%dfp_rs2 --=20 2.34.1