From patchwork Wed Jun 5 17:22:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 801616 Delivered-To: patch@linaro.org Received: by 2002:adf:cf0e:0:b0:35b:5a80:51b4 with SMTP id o14csp550533wrj; Wed, 5 Jun 2024 10:25:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVaOq580czZd2VuID8CYgZJCvuQX53AYWi7N/fQkHeUzqhSZLhcDDhjJDiG22kF6+GqvcoOcvN+JzerQlF8ucTn X-Google-Smtp-Source: AGHT+IEqM8T58NZAGT37wzC5OXmoKgG9QEuTnDXWq7MyJZF9/l2+lJCV496+MP026KUkMluI+hn9 X-Received: by 2002:a05:620a:2f8:b0:795:1962:708b with SMTP id af79cd13be357-79523d473ebmr342704185a.28.1717608337879; Wed, 05 Jun 2024 10:25:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717608337; cv=none; d=google.com; s=arc-20160816; b=kDLgZMKnmQPAhhkG3GXx1nhG3YKpD/uOwJAkThZj4HguWCVwAYG8DciuOS0ozhP1xl p2IgE1MBWLvTm73s7DT+m66ZZNLatOx90mWgC6zY288mKtNTAGLK0LcgsaV+5MqWvKSn flQf/soI2jqF+n+1+WTBn9AqUgDlEUllXjjfpIdturq+psjICpRdEsOtHwcz9WwJclTh nIeKeSFStkIJqQhpbbNFXgKZGygfZFDwpMNX2QEx2XO5ezJ8RNugBoFILBn4Q0R4N4RP CGZY/rXXT1yxNt12OY9bcj6CWnEtkubbPFH9xUsyFiXvNBlUf1FU0HD7Q/kj/cHMAkUh B1Jw== 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=PBCU7kemEaxMNx4Xnmn8j/Roj1P+mR9pGOaXhWJ3PgY=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=F0A4d+SGEY/NZIwd+wQqX3FZOwFXA5ihomLdYHetGS1J8jNptro85J2gJZLppy5Iwf h3dtowmV3hhuOCWEo9bBVHkrhL0f3hSOLwrSlsxJwjck3P830cCt7D2qmXeSXRUEK4q6 pKYe/1w4FSgNCKS5UboTuXMkIbJz5Ywk5H2npbvGPBVBgjGJC6qdxrfcKggGtoMMeCON Kxi3OOPK2uwTptx9uFD8B6SCurpdNEU+ixWYYam+hSLQuOovjPMFj3GRBBg0Pg3KvPyJ FhDVa3MUVtwJGtHQryIj0G+NLNvPYVHKYT5mt/93WkLkyeAPOMPA6i1QdjNkkP6Kh1vr 8A8Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TQ4uIsB8; 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-794f53bb0c1si393485985a.663.2024.06.05.10.25.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Jun 2024 10:25:37 -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=TQ4uIsB8; 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 1sEuM7-000685-O9; Wed, 05 Jun 2024 13:23:23 -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 1sEuM5-00063r-Re for qemu-devel@nongnu.org; Wed, 05 Jun 2024 13:23:21 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEuM4-0003tI-92 for qemu-devel@nongnu.org; Wed, 05 Jun 2024 13:23:21 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1f44b4404dfso1149515ad.0 for ; Wed, 05 Jun 2024 10:23:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717608199; x=1718212999; 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=PBCU7kemEaxMNx4Xnmn8j/Roj1P+mR9pGOaXhWJ3PgY=; b=TQ4uIsB86q5gDFvCTMsS2Ap/CpIJ8oFuPE+pXLMt+jJA+vle5Jn3hmNQIqj8D4668p qNAwe2aVUUdjz+ONyKsqKO2iGf2C3Ypx3HJTW7swTUDunDQoDAlMd1SvIOPhhfAN0xgm xfA4t11JEDhSS7oMS7VYoK4L9de5hwVaL50cADpAtnYGDZtJEOpiQ7MhyMtyvFUVvZv5 m4wHalmoCxsXWc7K5B6Qgn54DgL3mDMZ1RCEmX13uFXDJIAC9UIAl3derNn4SPinMkv+ 61SAf3j1SlxBfIy2LafSUlclPVW84TGwa6KT3RpiF0eOIynxXlChKcMMIPqiTGT+IZQ3 /cKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717608199; x=1718212999; 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=PBCU7kemEaxMNx4Xnmn8j/Roj1P+mR9pGOaXhWJ3PgY=; b=BvWW9CGiC8wi3WQfZrxmusEJD0skFjEuQ14WI5iqQ8U50B5FrU5aWJAj95hIgx3r0m rEez64N8cnXlOylwDrXgh5JPevoMi6VFXHFNgZSqS87MM7BKTB61v75WSk7AjKCfMYBp YGQsEEt4hYFJHSeHN7WOEWM5m/v1ZIwcmrtF0M77UzLnZaeJ8zf6ALFenataXeGP4uTx OY28mkNGRDDkET94aKByLIwQfndfbZjLebPVQOGbZKi6eNEoc+6QyE1M/pmQSWQXl5Pg KlTdxuM3yP2Tbc8K4cys9IpD7nCITxqQtuHpkm5b+MBEEWd71dEdpPa8jUgeHD6deh1Y /rIQ== X-Gm-Message-State: AOJu0YwgTAVEV+PBU6gvah+NuPbR1BGr+X2SPRRl5UAnHWzXS/RKBQzq 02jLNJ8OZUGHs91ykbDp9JoJwyzjtKGkXz3c/kdRws6rTL8lV+P69rE7LjTBcsapmvn6xIty4B6 n X-Received: by 2002:a17:90b:33ca:b0:2bf:ea42:d0c3 with SMTP id 98e67ed59e1d1-2c27db1652bmr2931360a91.16.1717608198971; Wed, 05 Jun 2024 10:23:18 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c28066d511sm1720915a91.9.2024.06.05.10.23.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 10:23:18 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 26/38] target/sparc: Implement UMULXHI Date: Wed, 5 Jun 2024 10:22:41 -0700 Message-Id: <20240605172253.356302-27-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::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.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 | 1 + target/sparc/translate.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 09c8adca37..508175eccd 100644 --- a/target/sparc/insns.decode +++ b/target/sparc/insns.decode @@ -389,6 +389,7 @@ FCMPEq 10 000 cc:2 110101 ..... 0 0101 0111 ..... \ ADDXC 10 ..... 110110 ..... 0 0001 0001 ..... @r_r_r ADDXCcc 10 ..... 110110 ..... 0 0001 0011 ..... @r_r_r + UMULXHI 10 ..... 110110 ..... 0 0001 0110 ..... @r_r_r LZCNT 10 ..... 110110 00000 0 0001 0111 ..... @r_r2 ALIGNADDR 10 ..... 110110 ..... 0 0001 1000 ..... @r_r_r diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 2480eed1e7..2a38152f58 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -581,6 +581,12 @@ static void gen_op_smul(TCGv dst, TCGv src1, TCGv src2) gen_op_multiply(dst, src1, src2, 1); } +static void gen_op_umulxhi(TCGv dst, TCGv src1, TCGv src2) +{ + TCGv discard = tcg_temp_new(); + tcg_gen_mulu2_tl(discard, dst, src1, src2); +} + static void gen_op_sdiv(TCGv dst, TCGv src1, TCGv src2) { #ifdef TARGET_SPARC64 @@ -3919,6 +3925,8 @@ TRANS(ARRAY32, VIS1, do_rrr, a, gen_op_array32) TRANS(ADDXC, VIS3, do_rrr, a, gen_op_addxc) TRANS(ADDXCcc, VIS3, do_rrr, a, gen_op_addxccc) +TRANS(UMULXHI, VIS3, do_rrr, a, gen_op_umulxhi) + static void gen_op_alignaddr(TCGv dst, TCGv s1, TCGv s2) { #ifdef TARGET_SPARC64