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=1582911310; cv=none; d=zohomail.com; s=zohoarc; b=i4Ud+qRjMfbAzbzT2SZGCvtWTMKuxDFCXjCR/h5WWw6t2VtBr3nMBOctV7vqrmtNssi4PfdDM0aQnU2bHf4iuaZg+rQihua1jVycQtwlA0VwWZKIoEAcrPr7qVSn+Oax+D45HgZ/mIbOQ3LhVhM0tDYYMMEy9ql96//1o05YzVU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582911310; 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=Oon+ZLGmQsITDihGp1RGELuotbYjaa/b3ywaekk6drE=; b=KLyE6paLsnvy/78Wq4WWWHHOdLm36OBOVZPgtO/Q9VFqIBa0JEQ4EPVJhqsZNvGKvwglNyCrTMUD7vITFJUmGiWtwbLAEhBnbRBRgr7WAuxY21XMyqa6cIXfNLtgHMf+RmIqsu8fjWHopn5Wq+34T6Kz/5WfKSuqFVpiMDOGmYA= 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 1582911310729242.37041958138514; Fri, 28 Feb 2020 09:35:10 -0800 (PST) Received: from localhost ([::1]:51578 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7jXX-0001Lb-2l for importer@patchew.org; Fri, 28 Feb 2020 12:35:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58383) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7im1-0005b2-5M for qemu-devel@nongnu.org; Fri, 28 Feb 2020 11:46:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7ily-00078k-V6 for qemu-devel@nongnu.org; Fri, 28 Feb 2020 11:46:01 -0500 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:13250) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j7ily-0005Uz-Ge for qemu-devel@nongnu.org; Fri, 28 Feb 2020 11:45:58 -0500 Received: from unknown (HELO ironmsg05-sd.qualcomm.com) ([10.53.140.145]) by alexa-out-sd-01.qualcomm.com with ESMTP; 28 Feb 2020 08:44:32 -0800 Received: from vu-tsimpson-aus.qualcomm.com (HELO vu-tsimpson1-aus.qualcomm.com) ([10.222.150.1]) by ironmsg05-sd.qualcomm.com with ESMTP; 28 Feb 2020 08:44:31 -0800 Received: by vu-tsimpson1-aus.qualcomm.com (Postfix, from userid 47164) id 728D3119A; 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=1582908358; x=1614444358; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Oon+ZLGmQsITDihGp1RGELuotbYjaa/b3ywaekk6drE=; b=QOprqI7ceNhUnsA3RFeXXnVpWKSurxJGLveqp1ny5jU/jnwV4xE0Zob8 284zp3p1j3leLStAS+u4P/wHZ0yIGYuCeTIbDjVDPngD/3k0EYZmKsScY 51JeMvv8sGcwnLrkca0AYcj/ROcrJXdufa7ZMLI/OuubIPpeDoXvWI0m+ c=; From: Taylor Simpson To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 42/67] Hexagon TCG generation - step 04 Date: Fri, 28 Feb 2020 10:43:38 -0600 Message-Id: <1582908244-304-43-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 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 20d8584..fdcc517 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