From nobody Thu Nov 13 22:08:04 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=1582910176; cv=none; d=zohomail.com; s=zohoarc; b=nLiBWfuyK7sDOOR49Jt9+PhzqHovafZ9KNu4PW9mwjUCzN2caWH07HFgTJYguLSNl6hbc6bjqkKeRC6OYl5kYjkOTok75IT1Tauy5pDDcsnBEkYlrcZoeYrdrVIynRJjmqOAm//sTfMrkOYYWJa/2we3ojLIZYf06gp8CZRdEyg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582910176; 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=aUnucCXNDqTLAKibifQCy+WW+56jaP4aw4DAtOOja18=; b=hB2vF7ar1nZvytHckJmnxC5Oed4X1zZoONJerxHE+Mviii0Pa/HsqhvJTUSwtdkiEled7cog6tPINRwIVw9BYuSIgQ1sUF0NwKtjQUXb10NN8GsbEeynO+u2+CA+CHQMKWnDx9xchcYJYkmlkf6hPA5G+RrYtujXISKlphktP6U= 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 1582910176583744.8201779699496; Fri, 28 Feb 2020 09:16:16 -0800 (PST) Received: from localhost ([::1]:51116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7jFH-0002n3-BY for importer@patchew.org; Fri, 28 Feb 2020 12:16:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58535) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7imF-0005lx-Nv for qemu-devel@nongnu.org; Fri, 28 Feb 2020 11:46:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7imE-0007M6-DP for qemu-devel@nongnu.org; Fri, 28 Feb 2020 11:46:15 -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 1j7imD-0005Uz-U5 for qemu-devel@nongnu.org; Fri, 28 Feb 2020 11:46:14 -0500 Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) 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 ironmsg02-sd.qualcomm.com with ESMTP; 28 Feb 2020 08:44:31 -0800 Received: by vu-tsimpson1-aus.qualcomm.com (Postfix, from userid 47164) id 8567C11D2; 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=1582908373; x=1614444373; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aUnucCXNDqTLAKibifQCy+WW+56jaP4aw4DAtOOja18=; b=WIAbdj4qt6PeID/ef7pR2tdO2JacSC27sZbzlbGnebWbVTc2o4lRTTl9 4cn1KGjrjej38eLFF8auDcp13DFO7XKOSYdE5TV+z5VcWABe66c+BNBKJ wxyO2WtFgmojW8vmgKdopfjORLRdpGctbWaayGdpRQY7nmsgYjMNDVMZl I=; From: Taylor Simpson To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 43/67] Hexagon TCG generation - step 05 Date: Fri, 28 Feb 2020 10:43:39 -0600 Message-Id: <1582908244-304-44-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 predicated store instructions Signed-off-by: Taylor Simpson --- target/hexagon/helper_overrides.h | 54 +++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 54 insertions(+) diff --git a/target/hexagon/helper_overrides.h b/target/hexagon/helper_over= rides.h index fdcc517..a6cbce0 100644 --- a/target/hexagon/helper_overrides.h +++ b/target/hexagon/helper_overrides.h @@ -877,4 +877,58 @@ #define fWRAP_S2_storerinewgp(GENHLPR, SHORTCODE) \ fWRAP_STORE(SHORTCODE) =20 +/* Predicated stores */ +#define fWRAP_PRED_STORE(GET_EA, PRED, SRC, SIZE, INC) \ + do { \ + TCGv LSB =3D tcg_temp_local_new(); \ + TCGv NEWREG_ST =3D tcg_temp_local_new(); \ + TCGv BYTE =3D tcg_temp_local_new(); \ + TCGv HALF =3D tcg_temp_local_new(); \ + TCGLabel *label =3D gen_new_label(); \ + GET_EA; \ + PRED; \ + PRED_STORE_CANCEL(LSB, EA); \ + tcg_gen_brcondi_tl(TCG_COND_EQ, LSB, 0, label); \ + INC; \ + fSTORE(1, SIZE, EA, SRC); \ + gen_set_label(label); \ + tcg_temp_free(LSB); \ + tcg_temp_free(NEWREG_ST); \ + tcg_temp_free(BYTE); \ + tcg_temp_free(HALF); \ + } while (0) + +#define NOINC do {} while (0) + +#define fWRAP_S4_pstorerinewfnew_rr(GENHLPR, SHORTCODE) \ + fWRAP_PRED_STORE(fEA_RRs(RsV, RuV, uiV), fLSBNEWNOT(PvN), \ + hex_new_value[NtX], 4, NOINC) +#define fWRAP_S2_pstorerdtnew_pi(GENHLPR, SHORTCODE) \ + fWRAP_PRED_STORE(fEA_REG(RxV), fLSBNEW(PvN), \ + RttV, 8, tcg_gen_addi_tl(RxV, RxV, IMMNO(0))) +#define fWRAP_S4_pstorerdtnew_io(GENHLPR, SHORTCODE) \ + fWRAP_PRED_STORE(fEA_RI(RsV, uiV), fLSBNEW(PvN), \ + RttV, 8, NOINC) +#define fWRAP_S4_pstorerbtnew_io(GENHLPR, SHORTCODE) \ + fWRAP_PRED_STORE(fEA_RI(RsV, uiV), fLSBNEW(PvN), \ + fGETBYTE(0, RtV), 1, NOINC) +#define fWRAP_S2_pstorerhtnew_pi(GENHLPR, SHORTCODE) \ + fWRAP_PRED_STORE(fEA_REG(RxV), fLSBNEW(PvN), \ + fGETHALF(0, RtV), 2, tcg_gen_addi_tl(RxV, RxV, IMMNO(= 0))) +#define fWRAP_S2_pstoreritnew_pi(GENHLPR, SHORTCODE) \ + fWRAP_PRED_STORE(fEA_REG(RxV), fLSBNEW(PvN), \ + RtV, 4, tcg_gen_addi_tl(RxV, RxV, IMMNO(0))) +#define fWRAP_S2_pstorerif_io(GENHLPR, SHORTCODE) \ + fWRAP_PRED_STORE(fEA_RI(RsV, uiV), fLSBOLDNOT(PvV), \ + RtV, 4, NOINC) +#define fWRAP_S4_pstorerit_abs(GENHLPR, SHORTCODE) \ + fWRAP_PRED_STORE(fEA_IMM(uiV), fLSBOLD(PvV), \ + RtV, 4, NOINC) +#define fWRAP_S2_pstorerinewf_io(GENHLPR, SHORTCODE) \ + fWRAP_PRED_STORE(fEA_RI(RsV, uiV), fLSBOLDNOT(PvV), \ + hex_new_value[NtX], 4, NOINC) +#define fWRAP_S4_pstorerbnewfnew_abs(GENHLPR, SHORTCODE) \ + fWRAP_PRED_STORE(fEA_IMM(uiV), fLSBNEWNOT(PvN), \ + fGETBYTE(0, hex_new_value[NtX]), 1, NOINC) + #endif --=20 2.7.4