From patchwork Wed Jun 5 17:22:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 801607 Delivered-To: patch@linaro.org Received: by 2002:adf:cf0e:0:b0:35b:5a80:51b4 with SMTP id o14csp550168wrj; Wed, 5 Jun 2024 10:24:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWDKk442I2h0A7DCTfFdrkBWeZVoI1FBvvllrC4YrGejjNAeShb2CtzovhsuBg5o0UkXqQtKfSbWBDuvkqWbkfs X-Google-Smtp-Source: AGHT+IEBAlo/ToAAScfOFTJtlRP6+sKeXa+9mpWeSVcKv1HVnL2+lf7nvhd8uCUTtJL5iIVs0Td0 X-Received: by 2002:a05:620a:164b:b0:792:f406:6db6 with SMTP id af79cd13be357-79523d939d0mr310772285a.39.1717608289697; Wed, 05 Jun 2024 10:24:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717608289; cv=none; d=google.com; s=arc-20160816; b=XKEBY3s10YyJVJCAcUoT0K5KwwZAZgzjI/qxG9nefUiYD7O5o+7r1HXEQMoWh7AWku p1qrO96se7RstUBtO72YbPdhVdDIA2vkDxMbkOBm/eJOoOh6VECpui+CWhL0eruNs+Sl IjlTXizo4S3BiLsGfVadukauF0SaUkH5cQ9oMCsHNQbf1PGuUjXrA3A3LWNDGDJhwnBg T+eizVfLdtzrZHszYe/3mrA1RZB4A/dTeOvw1aWGS8oPvlrnSV6WgtGQMZC0aLWq695L qSCSHu2tvLPaNB9yewgNfWaXnQVlZuLE5GI0MogdgFfqVwrlHgP6OQwK7uyAKdApbSmO eyoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NE3KV6Li9kGzQFCPbwah62llja+X88iRB27jiAmAxwo=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=hfWs+k/mlgB926QlVafHBtDZ+DGKCjtcQiMAvwcWWRlVUioBi8DMb+xsp67TzuES6n vSddNsJcaAYVZrYEcZZn+X6/ju2qAOk1D8wsom2GvEtgP+XmJwyXOnmrH+59T6cPd5ob QRB8r7CgVGqOnZe53BL86XgtnCBV7/sfmDWEJaIpykl8Hl8J+o+1GlMPcK74lt6/+eR3 ErFFD/g81wlL9RxJjMJZEVYWV6Yj3KvL4cbOkYkXyXidIXrotH61jQRqQjxa1K8H1aVz r1a85P9zmMHoO711dfFDa0t9xqcJRhTBBm7GrWQfXLAR+ftf5HJigDInBduistgiDzEm +G4g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AuVarOZz; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7952849e394si136895485a.488.2024.06.05.10.24.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Jun 2024 10:24:49 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AuVarOZz; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sEuME-0006CE-J1; Wed, 05 Jun 2024 13:23:30 -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 1sEuMC-0006AS-7A for qemu-devel@nongnu.org; Wed, 05 Jun 2024 13:23:28 -0400 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEuMA-0003wJ-8K for qemu-devel@nongnu.org; Wed, 05 Jun 2024 13:23:27 -0400 Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-656d8b346d2so20525a12.2 for ; Wed, 05 Jun 2024 10:23:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717608205; x=1718213005; 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=NE3KV6Li9kGzQFCPbwah62llja+X88iRB27jiAmAxwo=; b=AuVarOZzzpzTI7FD1wzRG/0pf64yAfnP+pIXOKvtGzpBvqptPf1WHTnPwKREEqK4Wf b68SisLsYfN7fy8n2K0ak4jd6VIAp7/geAIZHPfrhUG6sH+l3Ou9lmbAITK8/N0j9GUn Rs7TtQRmhtDNlsZDtqF89RCQf5XE1Clt3r5DZLmkMcYgH3o0zTXHhMZ7RCuwyaExOqcB WDCQxLaomyBU0VUoicD0LGuRcrUIIcMFqCga4cdk6TRTo1hYNyi7xEab/Pvc3A20l2Gy nLGH0qz+WAhHkhTFTzkgfmx+LwFgCEvCXW/Ves0aFAh31oeXiagsRg3lf9m4jhMA8VYB RIfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717608205; x=1718213005; 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=NE3KV6Li9kGzQFCPbwah62llja+X88iRB27jiAmAxwo=; b=YwwscJnNLXtoKP/DcXP60L8Hz482T8zfll81F9yQHRjCFyfk4cUVLJX+Me8iyezyQY 3i36n72ERc3pcyx+1GGZS9JjaGAg/7vbhI1OZWfOimV6CFDfaeLPQwXOjvfg6Gk4HlSI Q+xRWy1PMEA3SYdBUS/M9m7hjeoY/7pJmAK32nrAhPMilFQgCtmQMhfnW1G4CNrblRxe 7vrigFnHu1JgWTTpAkDKEBFFm2wK0D30dw23dw6BsOV81ZHwagwlEY3EebeTaKdiQ0WX ahhrlMLaXj7Ew/o3+sykqcyoj8VOoacqnRr2s6aG6KGqFnk47gW+92jeOlOF1b3lSgkR K7BA== X-Gm-Message-State: AOJu0Yz0xKEjmgznrrhN+yF4WKBpBnaVp7+5teQYMfnW/lJtOogmC3JE Hj07sCba0dXAQbb3yhhBPf3aUpxWRWcP/MQC7mm81J+12YU8xO6+j8NiLMWYU8n0/ZeiMCMEmRM u X-Received: by 2002:a17:90b:896:b0:2c2:5774:d52b with SMTP id 98e67ed59e1d1-2c27db119aamr3249132a91.20.1717608204955; Wed, 05 Jun 2024 10:23:24 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c28066d511sm1720915a91.9.2024.06.05.10.23.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 10:23:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 32/38] target/sparc: Implement 8-bit FPADD, FPADDS, and FPADDUS Date: Wed, 5 Jun 2024 10:22:47 -0700 Message-Id: <20240605172253.356302-33-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605172253.356302-1-richard.henderson@linaro.org> References: <20240605172253.356302-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::534; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x534.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 9 +++++++++ target/sparc/translate.c | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 0913fe7a86..80579642d1 100644 --- a/target/sparc/insns.decode +++ b/target/sparc/insns.decode @@ -509,6 +509,15 @@ FCMPEq 10 000 cc:2 110101 ..... 0 0101 0111 ..... \ MOVdTOx 10 ..... 110110 00000 1 0001 0000 ..... @r_d2 MOVxTOd 10 ..... 110110 00000 1 0001 1000 ..... @d_r2 + FPADD8 10 ..... 110110 ..... 1 0010 0100 ..... @d_d_d + FPADDS8 10 ..... 110110 ..... 1 0010 0110 ..... @d_d_d + FPADDUS8 10 ..... 110110 ..... 1 0010 0111 ..... @d_d_d + FPADDUS16 10 ..... 110110 ..... 1 0010 0011 ..... @d_d_d + FPSUB8 10 ..... 110110 ..... 1 0101 0100 ..... @d_d_d + FPSUBS8 10 ..... 110110 ..... 1 0101 0110 ..... @d_d_d + FPSUBUS8 10 ..... 110110 ..... 1 0101 0111 ..... @d_d_d + FPSUBUS16 10 ..... 110110 ..... 1 0101 0011 ..... @d_d_d + FLCMPs 10 000 cc:2 110110 rs1:5 1 0101 0001 rs2:5 FLCMPd 10 000 cc:2 110110 ..... 1 0101 0010 ..... \ rs1=%dfp_rs1 rs2=%dfp_rs2 diff --git a/target/sparc/translate.c b/target/sparc/translate.c index f51ce2ff2c..973c0cec07 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -5025,17 +5025,28 @@ static bool do_gvec_ddd(DisasContext *dc, arg_r_r_r *a, MemOp vece, return advance_pc(dc); } +TRANS(FPADD8, VIS4, do_gvec_ddd, a, MO_8, tcg_gen_gvec_add) TRANS(FPADD16, VIS1, do_gvec_ddd, a, MO_16, tcg_gen_gvec_add) TRANS(FPADD32, VIS1, do_gvec_ddd, a, MO_32, tcg_gen_gvec_add) + +TRANS(FPSUB8, VIS4, do_gvec_ddd, a, MO_8, tcg_gen_gvec_sub) TRANS(FPSUB16, VIS1, do_gvec_ddd, a, MO_16, tcg_gen_gvec_sub) TRANS(FPSUB32, VIS1, do_gvec_ddd, a, MO_32, tcg_gen_gvec_sub) + TRANS(FCHKSM16, VIS3, do_gvec_ddd, a, MO_16, gen_op_fchksm16) TRANS(FMEAN16, VIS3, do_gvec_ddd, a, MO_16, gen_op_fmean16) +TRANS(FPADDS8, VIS4, do_gvec_ddd, a, MO_8, tcg_gen_gvec_ssadd) TRANS(FPADDS16, VIS3, do_gvec_ddd, a, MO_16, tcg_gen_gvec_ssadd) TRANS(FPADDS32, VIS3, do_gvec_ddd, a, MO_32, tcg_gen_gvec_ssadd) +TRANS(FPADDUS8, VIS4, do_gvec_ddd, a, MO_8, tcg_gen_gvec_usadd) +TRANS(FPADDUS16, VIS4, do_gvec_ddd, a, MO_16, tcg_gen_gvec_usadd) + +TRANS(FPSUBS8, VIS4, do_gvec_ddd, a, MO_8, tcg_gen_gvec_sssub) TRANS(FPSUBS16, VIS3, do_gvec_ddd, a, MO_16, tcg_gen_gvec_sssub) TRANS(FPSUBS32, VIS3, do_gvec_ddd, a, MO_32, tcg_gen_gvec_sssub) +TRANS(FPSUBUS8, VIS4, do_gvec_ddd, a, MO_8, tcg_gen_gvec_ussub) +TRANS(FPSUBUS16, VIS4, do_gvec_ddd, a, MO_16, tcg_gen_gvec_ussub) TRANS(FSLL16, VIS3, do_gvec_ddd, a, MO_16, tcg_gen_gvec_shlv) TRANS(FSLL32, VIS3, do_gvec_ddd, a, MO_32, tcg_gen_gvec_shlv)