From nobody Tue Nov 26 08:42:03 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1708978737; cv=none; d=zohomail.com; s=zohoarc; b=jChAALVWEQVSHDRI5qChbtowGVoXsaXCso2gxLMgRlpe4dCp7SEZ6GRNXSv1gJLOJJ4NVv/KjegcdsjiGMCUuO+oTG9vbSh0AR7qj8LA6GzQ3IZacR3fHYdsSdUp5e4ucIB/VAmoL4jucuCANWXXzdBs8Voo5CCiRWCvhcaG+Iw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708978737; 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=yMW6AxjBVDIdk1/2CbavQRJvPc+W233QtqwWnqwEGOg=; b=Cpe/vkkfGdivetkkFrNVu2Y65SmPSAiGTyiW/l6ABW2VWQpYS20lTKFCGtEjoXTRm44RNqh6Ua9H/fgvRUcSHhQ1zlQqdoW6O34KoC46BtSXM6NLO9ZDA7l3sL/aJHlUGtEk+hwdsJgI2Yz5gOULuBbTzRVABN7WPwzl0+2coiE= 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 1708978737439527.7902635773172; Mon, 26 Feb 2024 12:18:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rehPr-0001cd-Pj; Mon, 26 Feb 2024 15:17:35 -0500 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 1rehPq-0001c7-OI for qemu-devel@nongnu.org; Mon, 26 Feb 2024 15:17:34 -0500 Received: from mail-oi1-x229.google.com ([2607:f8b0:4864:20::229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rehPp-000803-6F for qemu-devel@nongnu.org; Mon, 26 Feb 2024 15:17:34 -0500 Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-3bb9b28acb4so2482073b6e.2 for ; Mon, 26 Feb 2024 12:17:32 -0800 (PST) Received: from taylor-ubuntu.austin.rr.com (068-203-008-061.res.spectrum.com. [68.203.8.61]) by smtp.gmail.com with ESMTPSA id by11-20020a056808340b00b003c1a4a9ad17sm330594oib.46.2024.02.26.12.17.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 12:17:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708978651; x=1709583451; 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=yMW6AxjBVDIdk1/2CbavQRJvPc+W233QtqwWnqwEGOg=; b=Q+GPhQXabJHbTeYOOvQ6og0ZmVRWMYJiKpmzEoRMEoyYHNPzXaN9UjaQ0dtGb6ZdPE dNtn78X+t7SlpdKyvZCA8Lms/s5/9pZ7c3UzlUAqWjkWEbOndOgMoIWoMcuRWHQ1kMuH LZSQ5ORm0K9WK/r75rc2Q+JHNZbsJhZNlV9exhSydZR9swKmJwX/EjXKx3xaPdIrstju J4xchHopFKfwlwWvSW/rCKA/TeuIEuhq2LIZh7Qsm3jrVSsAGwkIOXd0rEXp+wCSLwzs +xs9A3NNdmuoZUA2AssG8h5rTAW+C1p1Q1Bh9/in/535L8nwUtEPQsVacRb/mWTOt2h9 VV6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708978651; x=1709583451; 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=yMW6AxjBVDIdk1/2CbavQRJvPc+W233QtqwWnqwEGOg=; b=I8za7lbo7B/Nf2spn1iTRB8U0pTgIzZTrPlldE0fZ/+lEpkh6irprh1rRtVRy+lw+S rq56qVar/5SqBeZ/P6PBkisYstr1BLZBgX1PhT8EciYtZdOtLC5sOrrkyEvJewuEzgAt Us75m94YGCFLYPiJjgrik9xs+KNtbMioRx5qlaB1Dp4K0kwSrk3ThIZMDXofwdZtdcu5 2+N0pzf99O69Y3gnJXZtQxqEU5MBrToA4dsHuyoGnkptoSLTl2dQ7Oahbxt/NIwC2fCB fYdqTIeQrOng3ThjRPBiNBi8+TvOgGjvWucLTywMALzFSvW8pTDa7uBjINt/xRsarWDD QDSw== X-Gm-Message-State: AOJu0YzbejoLXl4pdOs5d51pV7BwyolnQf40HQ6IPW+WI7E2Bk7WFqWX WtOBD04v9ui/kmxhuWI0rGT5lu/ZxzOH4PFINLkbCjfH4BkbQtskWHG6Iz7DsR4= X-Google-Smtp-Source: AGHT+IFVNxavW8N79nMnwL4jbkbBBZwkCjd/ENpRKu/qPCb6zKA1BLcU061IcUoOJMMb6FSXD0QmdQ== X-Received: by 2002:a05:6808:2189:b0:3bf:fdb2:ca5b with SMTP id be9-20020a056808218900b003bffdb2ca5bmr222894oib.3.1708978651490; Mon, 26 Feb 2024 12:17:31 -0800 (PST) From: Taylor Simpson To: qemu-devel@nongnu.org Cc: bcain@quicinc.com, quic_mathbern@quicinc.com, sidneym@quicinc.com, quic_mliebel@quicinc.com, richard.henderson@linaro.org, philmd@linaro.org, ale@rev.ng, anjo@rev.ng, ltaylorsimpson@gmail.com Subject: [PATCH 4/9] Hexagon (target/hexagon) Mark has_pred_dest in trans functions Date: Mon, 26 Feb 2024 13:17:17 -0700 Message-Id: <20240226201722.391879-5-ltaylorsimpson@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240226201722.391879-1-ltaylorsimpson@gmail.com> References: <20240226201722.391879-1-ltaylorsimpson@gmail.com> 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::229; envelope-from=ltaylorsimpson@gmail.com; helo=mail-oi1-x229.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, FREEMAIL_FROM=0.001, 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 @gmail.com) X-ZM-MESSAGEID: 1708978739401100003 Check that the value matches opcode_wregs Signed-off-by: Taylor Simpson --- target/hexagon/insn.h | 1 + target/hexagon/decode.c | 3 +++ target/hexagon/gen_trans_funcs.py | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/target/hexagon/insn.h b/target/hexagon/insn.h index a770379958..24dcf7fe9f 100644 --- a/target/hexagon/insn.h +++ b/target/hexagon/insn.h @@ -41,6 +41,7 @@ struct Instruction { uint32_t new_value_producer_slot:4; int32_t new_read_idx; int32_t dest_idx; + bool has_pred_dest; =20 bool part1; /* * cmp-jumps are split into two insns. diff --git a/target/hexagon/decode.c b/target/hexagon/decode.c index a4d8500fea..84a3899556 100644 --- a/target/hexagon/decode.c +++ b/target/hexagon/decode.c @@ -366,6 +366,9 @@ static void decode_shuffle_for_execution(Packet *packet) for (flag =3D false, i =3D 0; i < last_insn + 1; i++) { int opcode =3D packet->insn[i].opcode; =20 + g_assert(packet->insn[i].has_pred_dest =3D=3D + (strstr(opcode_wregs[opcode], "Pd4") || + strstr(opcode_wregs[opcode], "Pe4"))); if ((strstr(opcode_wregs[opcode], "Pd4") || strstr(opcode_wregs[opcode], "Pe4")) && GET_ATTRIB(opcode, A_STORE) =3D=3D 0) { diff --git a/target/hexagon/gen_trans_funcs.py b/target/hexagon/gen_trans_f= uncs.py index 07292e0170..f1972fd2dd 100755 --- a/target/hexagon/gen_trans_funcs.py +++ b/target/hexagon/gen_trans_funcs.py @@ -86,6 +86,7 @@ def gen_trans_funcs(f): =20 new_read_idx =3D -1 dest_idx =3D -1 + has_pred_dest =3D "false" for regno, regstruct in enumerate(regs): reg_type, reg_id, _, _ =3D regstruct reg =3D hex_common.get_register(tag, reg_type, reg_id) @@ -96,6 +97,8 @@ def gen_trans_funcs(f): new_read_idx =3D regno if reg.is_written() and dest_idx =3D=3D -1: dest_idx =3D regno + if reg_type =3D=3D "P" and not reg.is_read(): + has_pred_dest =3D "true" =20 if len(imms) !=3D 0: mark_which_imm_extended(f, tag) @@ -119,6 +122,7 @@ def gen_trans_funcs(f): f.write(code_fmt(f"""\ insn->new_read_idx =3D {new_read_idx}; insn->dest_idx =3D {dest_idx}; + insn->has_pred_dest =3D {has_pred_dest}; """)) f.write(textwrap.dedent(f"""\ return true; --=20 2.34.1