From nobody Mon Nov 25 10:17:29 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=1716752699; cv=none; d=zohomail.com; s=zohoarc; b=kSeXOPGloC1nmZf7iOllXn6vF/6+MBvA17p/thtKv9Fm2r0KC9602GmtgW7JauZPtsyLZ9Td5/B4XppjktLYtOJXj9dIenVKql/yf6G/pW7gKTQmriFqLZz1QgWVRdbif9OeVPbLe06cNriv6hpscyN8/UunHaRn6yRqEgLHaCs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716752699; h=Content-Type: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=hcyoZD3anU/IH/PLJOi2XftX4jEwUCrYWawOxmyODIk=; b=f5BXlsasVoTajG/CoYszm8EXNt95PExBaBK+5fzGcBFszMDIVxUxEjh8W+HpxAcLgXpbJ7fqqUo6Or8JGM9RcgwEn5HuwKxSAHbaMbgYxLbf1F2Gf64NAxEELfWibuLH0os0XAZQ+Mh4I0nLqpU4+DSl5FGflE9aMl8xnmRuuEk= 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 1716752699365806.5489415084569; Sun, 26 May 2024 12:44:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBJmH-0000dC-6w; Sun, 26 May 2024 15:43:34 -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 1sBJmD-0000R4-7x for qemu-devel@nongnu.org; Sun, 26 May 2024 15:43:29 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sBJm7-0007lr-G5 for qemu-devel@nongnu.org; Sun, 26 May 2024 15:43:27 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1f4a52b9413so445585ad.2 for ; Sun, 26 May 2024 12:43:23 -0700 (PDT) Received: from stoup.. (174-21-72-5.tukw.qwest.net. [174.21.72.5]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f46ad93c2esm28165935ad.263.2024.05.26.12.43.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 12:43:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716752602; x=1717357402; 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=hcyoZD3anU/IH/PLJOi2XftX4jEwUCrYWawOxmyODIk=; b=Yuah1sJvshy/L9SmbwmFTB35sLyqSAYAE7TAl8sxoxzxzDPGtwGqbYdev2B/ErXavX Ks0EqVrWXHx7JyMsk6h4bk3KQzBsafPqJFRee1KQnUYLkSPhvyY8RCmFnCuib+lMQw0F 6l9HZsnfmGrLMIKNMlWoVBgGtyep2qXq+Suou1nve4ZuYRY6U3mIr//7/58jE2ULjHx+ cQ3ntjfiDuPQRHQ21Vk/9o1iQ/fFt9DvX8EoBgHIBg5wXqYSIRiv6A2PRO2cfv+II7BN 4y+kgo+GsMOsPwENd9S4PW5y7D/wckuxIT64S8kh1+Sou3W1pGDSk9Yjvd+dNXGp1Z2e mpfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716752602; x=1717357402; 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=hcyoZD3anU/IH/PLJOi2XftX4jEwUCrYWawOxmyODIk=; b=AS5B2CehF+agmgm2178zShBxjZ7LuMrTNnMZPcWYRWnbDf2Pd375LhGhuCKwRl/NKZ SHk05a6wj8URFMoa721qZpQcxbbdiw2SQU4Tkw/q/SMgUi96eWLh8N2j3sF0XSUJUXOZ WGkxUIRRa3n+ni2BnMIT75mgVG+LIzY1hMkg+O8/w/HZhWRAdL9yxrTGqZqwyXfVgGyR 1eQq0KXQ85qoyCI64Ll9PbIsZEKHYFkRtD2eJo6Iscc+0FxmOOjigzhGla6jZ9h5QWEs AngxeDeUsZC2J5d/0bGNh54/ngEypwVipHowu/dVvb2tFD5FZEGp77Pes8asmMJyOoW+ Zh7Q== X-Gm-Message-State: AOJu0Yy8uP032wUFxwtHt8bXeOOQNCGSji73vDJkHfpodv+Nb1Xv1w74 25iMkFWiyPxqU0Z2+Kcg/rRZTudfX9tyTzs1dq3lBgv6kQuXExbmJ/euCBWZZllnuzn/nVYoswC Y X-Google-Smtp-Source: AGHT+IEEQ9497rFlz3wvKwFu4uHyBhqIn9IjmFYQLEjeZGUoNDHCLlNip5knLDz6H/b4S2cLV9t/Ng== X-Received: by 2002:a17:902:c40d:b0:1f3:121e:e3cd with SMTP id d9443c01a7336-1f44872bc0fmr90028035ad.15.1716752602186; Sun, 26 May 2024 12:43:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 34/37] target/sparc: Implement SUBXC, SUBXCcc Date: Sun, 26 May 2024 12:42:51 -0700 Message-Id: <20240526194254.459395-35-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240526194254.459395-1-richard.henderson@linaro.org> References: <20240526194254.459395-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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::634; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x634.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: 1716752700117100007 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 2 ++ target/sparc/translate.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 2ebee5a1ca..a7720560f8 100644 --- a/target/sparc/insns.decode +++ b/target/sparc/insns.decode @@ -447,6 +447,8 @@ FCMPEq 10 000 cc:2 110101 ..... 0 0101 0111 .....= \ PDISTN 10 ..... 110110 ..... 0 0011 1111 ..... @r_d_d =20 FMEAN16 10 ..... 110110 ..... 0 0100 0000 ..... @d_d_d + SUBXC 10 ..... 110110 ..... 0 0100 0001 ..... @r_r_r + SUBXCcc 10 ..... 110110 ..... 0 0100 0011 ..... @r_r_r FCHKSM16 10 ..... 110110 ..... 0 0100 0100 ..... @d_d_d FALIGNDATAg 10 ..... 110110 ..... 0 0100 1000 ..... @d_d_d FPMERGE 10 ..... 110110 ..... 0 0100 1011 ..... @d_r_r diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 242f483fd2..e3e92bcf83 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -515,6 +515,17 @@ static void gen_op_subccc(TCGv dst, TCGv src1, TCGv sr= c2) gen_op_subcc_int(dst, src1, src2, gen_carry32()); } =20 +static void gen_op_subxc(TCGv dst, TCGv src1, TCGv src2) +{ + tcg_gen_sub_tl(dst, src1, src2); + tcg_gen_sub_tl(dst, dst, cpu_cc_C); +} + +static void gen_op_subxccc(TCGv dst, TCGv src1, TCGv src2) +{ + gen_op_subcc_int(dst, src1, src2, cpu_cc_C); +} + static void gen_op_mulscc(TCGv dst, TCGv src1, TCGv src2) { TCGv zero =3D tcg_constant_tl(0); @@ -3963,6 +3974,9 @@ 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) =20 +TRANS(SUBXC, VIS4, do_rrr, a, gen_op_subxc) +TRANS(SUBXCcc, VIS4, do_rrr, a, gen_op_subxccc) + TRANS(UMULXHI, VIS3, do_rrr, a, gen_op_umulxhi) =20 static void gen_op_alignaddr(TCGv dst, TCGv s1, TCGv s2) --=20 2.34.1