From patchwork Thu Apr 27 22:40:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Simpson X-Patchwork-Id: 13225784 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C3A88C77B73 for ; Thu, 27 Apr 2023 22:42:45 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1psAIb-0001uB-Sc; Thu, 27 Apr 2023 18:41:13 -0400 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 1psAIY-0001sv-Pi for qemu-devel@nongnu.org; Thu, 27 Apr 2023 18:41:10 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1psAIU-0005M9-Bd for qemu-devel@nongnu.org; Thu, 27 Apr 2023 18:41:10 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33RMVCLY027383; Thu, 27 Apr 2023 22:41:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-type : content-transfer-encoding; s=qcppdkim1; bh=r2m5doEhNQiyAm3rQsANP0eNKyYO9f1xPJ2sUZkyYHs=; b=Zv2mJHeMTEojQvEyPLmf+1vAoHNiSPo0enFuNazUrWprCGI094Co1/GEZq5BEtASriax l77fXrOHDLfvL0QaMNNZpZafwFZ3Qr2vy1LvWHhvZ7dRTf8AYeM1m6X+I2OVa98pkGVE hCPIdzxtQ31dvi9zGqMUE837y5s7keHBovhrSKwvoFguM2DVeRssgVhP8NXPHEy63KXo WC2FWNFGBLxAM/s+fpYu6FXKvlrYwRtlbhpvmXDP5yt54sP5HPycRIKWbLuwkATUoPaG rNcVSNO/QIAvNmFdDZlcXTD9mWZbKKcl6PEyqqvpa81qXJkPIqcB85yHLwNZnhgoGlC+ OQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3q7wq88fvh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Apr 2023 22:41:01 +0000 Received: from pps.filterd (NALASPPMTA04.qualcomm.com [127.0.0.1]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 33RMeWmD027165; Thu, 27 Apr 2023 22:41:00 GMT Received: from pps.reinject (localhost [127.0.0.1]) by NALASPPMTA04.qualcomm.com (PPS) with ESMTPS id 3q48nmj5ek-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Apr 2023 22:41:00 +0000 Received: from NALASPPMTA04.qualcomm.com (NALASPPMTA04.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 33RMf0Bi027707; Thu, 27 Apr 2023 22:41:00 GMT Received: from hu-devc-sd-u20-a-1.qualcomm.com (hu-tsimpson-lv.qualcomm.com [10.47.204.221]) by NALASPPMTA04.qualcomm.com (PPS) with ESMTPS id 33RMexPY027694 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Apr 2023 22:41:00 +0000 Received: by hu-devc-sd-u20-a-1.qualcomm.com (Postfix, from userid 47164) id C91DE5A5; Thu, 27 Apr 2023 15:40:59 -0700 (PDT) From: Taylor Simpson To: qemu-devel@nongnu.org Cc: tsimpson@quicinc.com, richard.henderson@linaro.org, philmd@linaro.org, ale@rev.ng, anjo@rev.ng, bcain@quicinc.com, quic_mathbern@quicinc.com Subject: [PATCH v2 0/9] Hexagon (target/hexagon) New architecture support Date: Thu, 27 Apr 2023 15:40:48 -0700 Message-Id: <20230427224057.3766963-1-tsimpson@quicinc.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: gHToVQihNNcFnJZncEeg8D8PnhMGAzNZ X-Proofpoint-ORIG-GUID: gHToVQihNNcFnJZncEeg8D8PnhMGAzNZ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-27_09,2023-04-27_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxlogscore=716 bulkscore=0 suspectscore=0 phishscore=0 adultscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 mlxscore=0 priorityscore=1501 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304270199 Received-SPF: pass client-ip=205.220.180.131; envelope-from=tsimpson@qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Add support for new Hexagon architecture versions v68/v69/v71/v73 **** Changes in v2 **** Address feedback from Anton Johansson Rename v6mpy_ref.h to v6mpy_ref.c.inc Shorten format of hexagon_v*_cpu_init_functions Change loop counts MAX_VEC_SIZE_BYTES / 2 to MAX_VEC_SIZE_BYTES / 4 Taylor Simpson (9): Hexagon (target/hexagon) Add support for v68/v69/v71/v73 Hexagon (target/hexagon) Add v68 scalar instructions Hexagon (tests/tcg/hexagon) Add v68 scalar tests Hexagon (target/hexagon) Add v68 HVX instructions Hexagon (tests/tcg/hexagon) Add v68 HVX tests Hexagon (target/hexagon) Add v69 HVX instructions Hexagon (tests/tcg/hexagon) Add v69 HVX tests Hexagon (target/hexagon) Add v73 scalar instructions Hexagon (tests/tcg/hexagon) Add v73 scalar tests configure | 2 +- linux-user/hexagon/target_elf.h | 13 +- target/hexagon/cpu.h | 4 + target/hexagon/gen_tcg.h | 22 ++ target/hexagon/gen_tcg_hvx.h | 12 + target/hexagon/mmvec/macros.h | 9 +- target/hexagon/attribs_def.h.inc | 16 + target/hexagon/cpu.c | 14 +- target/hexagon/translate.c | 3 + tests/tcg/hexagon/misc.c | 12 + tests/tcg/hexagon/v68_hvx.c | 90 ++++++ tests/tcg/hexagon/v68_scalar.c | 186 +++++++++++ tests/tcg/hexagon/v69_hvx.c | 318 ++++++++++++++++++ tests/tcg/hexagon/v73_scalar.c | 96 ++++++ tests/tcg/hexagon/v6mpy_ref.c.inc | 161 ++++++++++ target/hexagon/gen_idef_parser_funcs.py | 2 + target/hexagon/imported/branch.idef | 7 +- target/hexagon/imported/encode_pp.def | 21 +- target/hexagon/imported/ldst.idef | 20 +- target/hexagon/imported/mmvec/encode_ext.def | 16 +- target/hexagon/imported/mmvec/ext.idef | 321 ++++++++++++++++++- tests/tcg/hexagon/Makefile.target | 13 + 22 files changed, 1339 insertions(+), 19 deletions(-) create mode 100644 tests/tcg/hexagon/v68_hvx.c create mode 100644 tests/tcg/hexagon/v68_scalar.c create mode 100644 tests/tcg/hexagon/v69_hvx.c create mode 100644 tests/tcg/hexagon/v73_scalar.c create mode 100644 tests/tcg/hexagon/v6mpy_ref.c.inc