From nobody Thu Nov 13 22:06:43 2025 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail header.i=@quicinc.com; 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=fail(p=none dis=none) header.from=quicinc.com ARC-Seal: i=1; a=rsa-sha256; t=1582910859; cv=none; d=zohomail.com; s=zohoarc; b=fTC39il7WS0IAcH4kyATUBo8OS+l3QLomuHx6/2M531MAKfTxS2oioJnpuKybEzK9bOH8HA2ynkB715CEO9qY2gy4vHQgBsTF9OT6VphHuHKFLVlz9OQltyk9BVMWmVgZiPeMqbIaJwDIVms/AudvJRHlN3211QFPfjkcjQEjaA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582910859; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Nm+vVTfNxMVnMctBJRPyCaCUAcm5CSyN4QDd0Bp+mR4=; b=RLGIl0vJOczfJN9Ytj0ovS/Xt1UBa5mGFxgCY29HufY8PQbAErEPB5D06K9gfXtQRqBGwz+agNk/GoOyPLXacRWYAEPwBp1FFvqclqwCvtZLPzxvLP2r0e0arBfZRKfK9hwwKKp2qixxsU4xlslsFJMVikPqo3luFu+PKDwTeIM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail header.i=@quicinc.com; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1582910859576177.62617193435005; Fri, 28 Feb 2020 09:27:39 -0800 (PST) Received: from localhost ([::1]:51288 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7jQI-0004lQ-85 for importer@patchew.org; Fri, 28 Feb 2020 12:27:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58598) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7imQ-0005rP-PV for qemu-devel@nongnu.org; Fri, 28 Feb 2020 11:46:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7imP-0007TR-63 for qemu-devel@nongnu.org; Fri, 28 Feb 2020 11:46:26 -0500 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:13301) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j7imM-0005cG-D2 for qemu-devel@nongnu.org; Fri, 28 Feb 2020 11:46:23 -0500 Received: from unknown (HELO ironmsg03-sd.qualcomm.com) ([10.53.140.143]) by alexa-out-sd-01.qualcomm.com with ESMTP; 28 Feb 2020 08:44:33 -0800 Received: from vu-tsimpson-aus.qualcomm.com (HELO vu-tsimpson1-aus.qualcomm.com) ([10.222.150.1]) by ironmsg03-sd.qualcomm.com with ESMTP; 28 Feb 2020 08:44:32 -0800 Received: by vu-tsimpson1-aus.qualcomm.com (Postfix, from userid 47164) id E851AF0B; Fri, 28 Feb 2020 10:44:31 -0600 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1582908382; x=1614444382; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Nm+vVTfNxMVnMctBJRPyCaCUAcm5CSyN4QDd0Bp+mR4=; b=XBCJAcN/76i94ndIlaE5ESWnMFHJKn8kxEXXMjO6BHHbaCPuEeWhgeId aN2+xf808Cx/HpIJYwQB0gYA8uYH175lpu3WmbMDoJ9cx59tSJ1apaMOu cM3jGZhqVBbySoeNYmHUIVJOX0YWiCz01MsgqJTD+j419rl6lobwSdvTh U=; From: Taylor Simpson To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 48/67] Hexagon TCG generation - step 10 Date: Fri, 28 Feb 2020 10:43:44 -0600 Message-Id: <1582908244-304-49-git-send-email-tsimpson@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1582908244-304-1-git-send-email-tsimpson@quicinc.com> References: <1582908244-304-1-git-send-email-tsimpson@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 199.106.114.38 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: riku.voipio@iki.fi, richard.henderson@linaro.org, laurent@vivier.eu, Taylor Simpson , philmd@redhat.com, aleksandar.m.mail@gmail.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Override compound compare and jump instructions Signed-off-by: Taylor Simpson --- target/hexagon/helper_overrides.h | 105 ++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 105 insertions(+) diff --git a/target/hexagon/helper_overrides.h b/target/hexagon/helper_over= rides.h index 5443a94e..d3311be 100644 --- a/target/hexagon/helper_overrides.h +++ b/target/hexagon/helper_overrides.h @@ -1327,4 +1327,109 @@ #define fWRAP_J2_endloop1(GENHLPR, SHORTCODE) \ gen_endloop1() =20 +/* + * Compound compare and jump instructions + * Here is a primer to understand the tag names + * + * Comparison + * cmpeqi compare equal to an immediate + * cmpgti compare greater than an immediate + * cmpgtiu compare greater than an unsigned immediate + * cmpeqn1 compare equal to negative 1 + * cmpgtn1 compare greater than negative 1 + * cmpeq compare equal (two registers) + * + * Condition + * tp0 p0 is true p0 =3D cmp.eq(r0,#5); if (p0.new) jump:nt = address + * fp0 p0 is false p0 =3D cmp.eq(r0,#5); if (!p0.new) jump:nt= address + * tp1 p1 is true p1 =3D cmp.eq(r0,#5); if (p1.new) jump:nt = address + * fp1 p1 is false p1 =3D cmp.eq(r0,#5); if (!p1.new) jump:nt= address + * + * Prediction (not modelled in qemu) + * _nt not taken + * _t taken + */ +#define fWRAP_J4_cmpeqi_tp0_jump_nt(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(0, TCG_COND_EQ, true, RsV, UiV, riV) +#define fWRAP_J4_cmpeqi_fp0_jump_nt(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(0, TCG_COND_EQ, false, RsV, UiV, riV) +#define fWRAP_J4_cmpeqi_tp0_jump_t(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(0, TCG_COND_EQ, true, RsV, UiV, riV) +#define fWRAP_J4_cmpeqi_fp0_jump_t(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(0, TCG_COND_EQ, false, RsV, UiV, riV) +#define fWRAP_J4_cmpeqi_tp1_jump_nt(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(1, TCG_COND_EQ, true, RsV, UiV, riV) +#define fWRAP_J4_cmpeqi_fp1_jump_nt(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(1, TCG_COND_EQ, false, RsV, UiV, riV) +#define fWRAP_J4_cmpeqi_tp1_jump_t(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(1, TCG_COND_EQ, true, RsV, UiV, riV) +#define fWRAP_J4_cmpeqi_fp1_jump_t(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(1, TCG_COND_EQ, false, RsV, UiV, riV) +#define fWRAP_J4_cmpgti_tp0_jump_nt(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(0, TCG_COND_GT, true, RsV, UiV, riV) +#define fWRAP_J4_cmpgti_fp0_jump_nt(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(0, TCG_COND_GT, false, RsV, UiV, riV) +#define fWRAP_J4_cmpgti_tp0_jump_t(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(0, TCG_COND_GT, true, RsV, UiV, riV) +#define fWRAP_J4_cmpgti_fp0_jump_t(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(0, TCG_COND_GT, false, RsV, UiV, riV) +#define fWRAP_J4_cmpgti_tp1_jump_nt(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(1, TCG_COND_GT, true, RsV, UiV, riV) +#define fWRAP_J4_cmpgti_fp1_jump_nt(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(1, TCG_COND_GT, false, RsV, UiV, riV) +#define fWRAP_J4_cmpgti_tp1_jump_t(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(1, TCG_COND_GT, true, RsV, UiV, riV) +#define fWRAP_J4_cmpgti_fp1_jump_t(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(1, TCG_COND_GT, false, RsV, UiV, riV) +#define fWRAP_J4_cmpgtui_tp0_jump_nt(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(0, TCG_COND_GTU, true, RsV, UiV, riV) +#define fWRAP_J4_cmpgtui_fp0_jump_nt(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(0, TCG_COND_GTU, false, RsV, UiV, riV) +#define fWRAP_J4_cmpgtui_tp0_jump_t(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(0, TCG_COND_GTU, true, RsV, UiV, riV) +#define fWRAP_J4_cmpgtui_fp0_jump_t(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(0, TCG_COND_GTU, false, RsV, UiV, riV) +#define fWRAP_J4_cmpgtui_tp1_jump_nt(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(1, TCG_COND_GTU, true, RsV, UiV, riV) +#define fWRAP_J4_cmpgtui_fp1_jump_nt(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(1, TCG_COND_GTU, false, RsV, UiV, riV) +#define fWRAP_J4_cmpgtui_tp1_jump_t(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(1, TCG_COND_GTU, true, RsV, UiV, riV) +#define fWRAP_J4_cmpgtui_fp1_jump_t(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmpi_jmp(1, TCG_COND_GTU, false, RsV, UiV, riV) +#define fWRAP_J4_cmpeqn1_tp0_jump_nt(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmp_n1_jmp(0, TCG_COND_EQ, true, RsV, riV) +#define fWRAP_J4_cmpeqn1_fp0_jump_nt(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmp_n1_jmp(0, TCG_COND_EQ, false, RsV, riV) +#define fWRAP_J4_cmpeqn1_tp0_jump_t(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmp_n1_jmp(0, TCG_COND_EQ, true, RsV, riV) +#define fWRAP_J4_cmpeqn1_fp0_jump_t(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmp_n1_jmp(0, TCG_COND_EQ, false, RsV, riV) +#define fWRAP_J4_cmpeqn1_tp1_jump_nt(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmp_n1_jmp(1, TCG_COND_EQ, true, RsV, riV) +#define fWRAP_J4_cmpeqn1_fp1_jump_nt(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmp_n1_jmp(1, TCG_COND_EQ, false, RsV, riV) +#define fWRAP_J4_cmpeqn1_tp1_jump_t(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmp_n1_jmp(1, TCG_COND_EQ, true, RsV, riV) +#define fWRAP_J4_cmpeqn1_fp1_jump_t(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmp_n1_jmp(1, TCG_COND_EQ, false, RsV, riV) +#define fWRAP_J4_cmpgtn1_tp0_jump_nt(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmp_n1_jmp(0, TCG_COND_GT, true, RsV, riV) +#define fWRAP_J4_cmpgtn1_fp0_jump_nt(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmp_n1_jmp(0, TCG_COND_GT, false, RsV, riV) +#define fWRAP_J4_cmpgtn1_tp0_jump_t(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmp_n1_jmp(0, TCG_COND_GT, true, RsV, riV) +#define fWRAP_J4_cmpgtn1_fp0_jump_t(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmp_n1_jmp(0, TCG_COND_GT, false, RsV, riV) +#define fWRAP_J4_cmpgtn1_tp1_jump_nt(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmp_n1_jmp(1, TCG_COND_GT, true, RsV, riV) +#define fWRAP_J4_cmpgtn1_fp1_jump_nt(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmp_n1_jmp(1, TCG_COND_GT, false, RsV, riV) +#define fWRAP_J4_cmpgtn1_tp1_jump_t(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmp_n1_jmp(1, TCG_COND_GT, true, RsV, riV) +#define fWRAP_J4_cmpgtn1_fp1_jump_t(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmp_n1_jmp(1, TCG_COND_GT, false, RsV, riV) +#define fWRAP_J4_cmpeq_tp0_jump_t(GENHLPR, SHORTCODE) \ + gen_cmpnd_cmp_jmp(0, TCG_COND_EQ, true, RsV, RtV, riV) + #endif --=20 2.7.4