From nobody Mon Feb 9 17:58:51 2026 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581383489470539.6385399253269; Mon, 10 Feb 2020 17:11:29 -0800 (PST) Received: from localhost ([::1]:41978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1K5I-00081K-2b for importer@patchew.org; Mon, 10 Feb 2020 20:11:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33133) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1JcS-0001ul-Tq for qemu-devel@nongnu.org; Mon, 10 Feb 2020 19:41:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1JcP-0008Bw-6x for qemu-devel@nongnu.org; Mon, 10 Feb 2020 19:41:40 -0500 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:3639) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j1JcO-0004qc-R7 for qemu-devel@nongnu.org; Mon, 10 Feb 2020 19:41:37 -0500 Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-01.qualcomm.com with ESMTP; 10 Feb 2020 16:41:02 -0800 Received: from vu-tsimpson-aus.qualcomm.com (HELO vu-tsimpson1-aus.qualcomm.com) ([10.222.150.1]) by ironmsg-SD-alpha.qualcomm.com with ESMTP; 10 Feb 2020 16:41:01 -0800 Received: by vu-tsimpson1-aus.qualcomm.com (Postfix, from userid 47164) id 3E9E71B53; Mon, 10 Feb 2020 18:41:01 -0600 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1581381696; x=1612917696; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=okMTwXWLlAbgL/fZ+s2uNpU/z0vaGChC2zVJE2leJAI=; b=TFGSZg1g3YdJmcikQp39Fr39evEMP9WBZam+3DxchQup6XeAcDZE73QT Hucus4NQrWKOWISObVIe2qvZPZbbbx1k2O9ZOihRK83Oa3xgFV0+KMAu2 6wLDOq6WjEmyuSXfIeDPg0olExdFwaH8xSFAiOm8BvVoe2WW/LVbiL3Bn 8=; From: Taylor Simpson To: qemu-devel@nongnu.org Subject: [RFC PATCH 41/66] Hexagon TCG generation - step 04 Date: Mon, 10 Feb 2020 18:40:19 -0600 Message-Id: <1581381644-13678-42-git-send-email-tsimpson@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1581381644-13678-1-git-send-email-tsimpson@quicinc.com> References: <1581381644-13678-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 store instructions Signed-off-by: Taylor Simpson --- target/hexagon/helper_overrides.h | 241 ++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 241 insertions(+) diff --git a/target/hexagon/helper_overrides.h b/target/hexagon/helper_over= rides.h index 673b7a5..648fc5d 100644 --- a/target/hexagon/helper_overrides.h +++ b/target/hexagon/helper_overrides.h @@ -636,4 +636,245 @@ #define fWRAP_L4_ploadrdfnew_abs(GENHLPR, SHORTCODE) \ fWRAP_PRED_LOAD_PAIR(fEA_IMM(uiV), fLSBNEWNOT(PtN)) =20 +/* load-locked and store-locked */ +#define fWRAP_L2_loadw_locked(GENHLPR, SHORTCODE) \ + SHORTCODE +#define fWRAP_L4_loadd_locked(GENHLPR, SHORTCODE) \ + SHORTCODE +#define fWRAP_S2_storew_locked(GENHLPR, SHORTCODE) \ + do { SHORTCODE; READ_PREG(PdV, PdN); } while (0) +#define fWRAP_S4_stored_locked(GENHLPR, SHORTCODE) \ + do { SHORTCODE; READ_PREG(PdV, PdN); } while (0) + +#define fWRAP_STORE(SHORTCODE) \ + do { \ + TCGv HALF =3D tcg_temp_new(); \ + TCGv BYTE =3D tcg_temp_new(); \ + TCGv NEWREG_ST =3D tcg_temp_new(); \ + TCGv tmp =3D tcg_temp_new(); \ + SHORTCODE; \ + tcg_temp_free(HALF); \ + tcg_temp_free(BYTE); \ + tcg_temp_free(NEWREG_ST); \ + tcg_temp_free(tmp); \ + } while (0) + +#define fWRAP_STORE_ap(STORE) \ + do { \ + TCGv HALF =3D tcg_temp_new(); \ + TCGv BYTE =3D tcg_temp_new(); \ + TCGv NEWREG_ST =3D tcg_temp_new(); \ + { \ + fEA_IMM(UiV); \ + STORE; \ + tcg_gen_movi_tl(ReV, UiV); \ + } \ + tcg_temp_free(HALF); \ + tcg_temp_free(BYTE); \ + tcg_temp_free(NEWREG_ST); \ + } while (0) + +#define fWRAP_STORE_pcr(SHIFT, STORE) \ + do { \ + TCGv ireg =3D tcg_temp_new(); \ + TCGv HALF =3D tcg_temp_new(); \ + TCGv BYTE =3D tcg_temp_new(); \ + TCGv NEWREG_ST =3D tcg_temp_new(); \ + TCGv tmp =3D tcg_temp_new(); \ + fEA_REG(RxV); \ + fPM_CIRR(RxV, fREAD_IREG(MuV, SHIFT), MuV); \ + STORE; \ + tcg_temp_free(ireg); \ + tcg_temp_free(HALF); \ + tcg_temp_free(BYTE); \ + tcg_temp_free(NEWREG_ST); \ + tcg_temp_free(tmp); \ + } while (0) + +#define fWRAP_S2_storerb_io(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerb_pi(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S4_storerb_ap(GENHLPR, SHORTCODE) \ + fWRAP_STORE_ap(fSTORE(1, 1, EA, fGETBYTE(0, RtV))) +#define fWRAP_S2_storerb_pr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S4_storerb_ur(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerb_pbr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerb_pci(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerb_pcr(GENHLPR, SHORTCODE) \ + fWRAP_STORE_pcr(0, fSTORE(1, 1, EA, fGETBYTE(0, RtV))) +#define fWRAP_S4_storerb_rr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S4_storerbnew_rr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S4_storeirb_io(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerbgp(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_SS1_storeb_io(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_SS2_storebi0(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) + +#define fWRAP_S2_storerh_io(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerh_pi(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S4_storerh_ap(GENHLPR, SHORTCODE) \ + fWRAP_STORE_ap(fSTORE(1, 2, EA, fGETHALF(0, RtV))) +#define fWRAP_S2_storerh_pr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S4_storerh_ur(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerh_pbr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerh_pci(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerh_pcr(GENHLPR, SHORTCODE) \ + fWRAP_STORE_pcr(1, fSTORE(1, 2, EA, fGETHALF(0, RtV))) +#define fWRAP_S4_storerh_rr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S4_storeirh_io(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerhgp(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_SS2_storeh_io(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) + +#define fWRAP_S2_storerf_io(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerf_pi(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S4_storerf_ap(GENHLPR, SHORTCODE) \ + fWRAP_STORE_ap(fSTORE(1, 2, EA, fGETHALF(1, RtV))) +#define fWRAP_S2_storerf_pr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S4_storerf_ur(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerf_pbr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerf_pci(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerf_pcr(GENHLPR, SHORTCODE) \ + fWRAP_STORE_pcr(1, fSTORE(1, 2, EA, fGETHALF(1, RtV))) +#define fWRAP_S4_storerf_rr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerfgp(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) + +#define fWRAP_S2_storeri_io(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storeri_pi(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S4_storeri_ap(GENHLPR, SHORTCODE) \ + fWRAP_STORE_ap(fSTORE(1, 4, EA, RtV)) +#define fWRAP_S2_storeri_pr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S4_storeri_ur(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storeri_pbr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storeri_pci(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storeri_pcr(GENHLPR, SHORTCODE) \ + fWRAP_STORE_pcr(2, fSTORE(1, 4, EA, RtV)) +#define fWRAP_S4_storeri_rr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S4_storerinew_rr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S4_storeiri_io(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerigp(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_SS1_storew_io(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_SS2_storew_sp(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_SS2_storewi0(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) + +#define fWRAP_S2_storerd_io(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerd_pi(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S4_storerd_ap(GENHLPR, SHORTCODE) \ + fWRAP_STORE_ap(fSTORE(1, 8, EA, RttV)) +#define fWRAP_S2_storerd_pr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S4_storerd_ur(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerd_pbr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerd_pci(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerd_pcr(GENHLPR, SHORTCODE) \ + fWRAP_STORE_pcr(3, fSTORE(1, 8, EA, RttV)) +#define fWRAP_S4_storerd_rr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerdgp(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_SS2_stored_sp(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) + +#define fWRAP_S2_storerbnew_io(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerbnew_pi(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S4_storerbnew_ap(GENHLPR, SHORTCODE) \ + fWRAP_STORE_ap(fSTORE(1, 1, EA, fGETBYTE(0, fNEWREG_ST(NtN)))) +#define fWRAP_S2_storerbnew_pr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S4_storerbnew_ur(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerbnew_pbr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerbnew_pci(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerbnew_pcr(GENHLPR, SHORTCODE) \ + fWRAP_STORE_pcr(0, fSTORE(1, 1, EA, fGETBYTE(0, fNEWREG_ST(NtN)))) +#define fWRAP_S2_storerbnewgp(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) + +#define fWRAP_S2_storerhnew_io(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerhnew_pi(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S4_storerhnew_ap(GENHLPR, SHORTCODE) \ + fWRAP_STORE_ap(fSTORE(1, 2, EA, fGETHALF(0, fNEWREG_ST(NtN)))) +#define fWRAP_S2_storerhnew_pr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S4_storerhnew_ur(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerhnew_pbr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerhnew_pci(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerhnew_pcr(GENHLPR, SHORTCODE) \ + fWRAP_STORE_pcr(1, fSTORE(1, 2, EA, fGETHALF(0, fNEWREG_ST(NtN)))) +#define fWRAP_S2_storerhnewgp(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) + +#define fWRAP_S2_storerinew_io(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerinew_pi(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S4_storerinew_ap(GENHLPR, SHORTCODE) \ + fWRAP_STORE_ap(fSTORE(1, 4, EA, fNEWREG_ST(NtN))) +#define fWRAP_S2_storerinew_pr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S4_storerinew_ur(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerinew_pbr(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerinew_pci(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) +#define fWRAP_S2_storerinew_pcr(GENHLPR, SHORTCODE) \ + fWRAP_STORE_pcr(2, fSTORE(1, 4, EA, fNEWREG_ST(NtN))) +#define fWRAP_S2_storerinewgp(GENHLPR, SHORTCODE) \ + fWRAP_STORE(SHORTCODE) + #endif --=20 2.7.4