From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id 56CD23858C32; Wed, 10 Apr 2024 10:48:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 56CD23858C32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712746088; bh=9PbNBrPAMIMrDEffi9J3rOQDg+MIuAHu85fowZh4d8A=; h=From:To:Subject:Date:From; b=CynptCkEo2wEEnvXmLYpd3ZIW/vJeIpxMGCaolZfeQEGYceNwttNGOdzx/SubikVq 9g1o3ACxCI5rgaJOnzcSpy38qKWL5zEhoniaSgrUlwYeopUDImkysw7zNfVopZ8Cer J2FFEbuLizp0A1tbhzghTc1owRi3rdf+6+gewXaE= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Szabolcs Nagy To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/ARM/heads/gcs)] aarch64: Add support for chkfeat insn X-Act-Checkin: gcc X-Git-Author: Szabolcs Nagy X-Git-Refname: refs/vendors/ARM/heads/gcs X-Git-Oldrev: 311c3aa1e58672c36991a193db5752d3dcf8e7d9 X-Git-Newrev: 309f26c530aaaa1d11891a6adddf9515adf5a9b0 Message-Id: <20240410104808.56CD23858C32@sourceware.org> Date: Wed, 10 Apr 2024 10:48:08 +0000 (GMT) List-Id: https://gcc.gnu.org/g:309f26c530aaaa1d11891a6adddf9515adf5a9b0 commit 309f26c530aaaa1d11891a6adddf9515adf5a9b0 Author: Szabolcs Nagy Date: Tue May 9 15:37:49 2023 +0100 aarch64: Add support for chkfeat insn This is a hint space instruction to check for enabled HW features and update the x16 register accordingly. Use unspec_volatile to prevent reordering it around calls since calls can enable or disable HW features. gcc/ChangeLog: * config/aarch64/aarch64.md (aarch64_chkfeat): New. Diff: --- gcc/config/aarch64/aarch64.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index 385a669b9b3..a20462303b5 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -378,6 +378,7 @@ UNSPECV_BTI_C ; Represent BTI c. UNSPECV_BTI_J ; Represent BTI j. UNSPECV_BTI_JC ; Represent BTI jc. + UNSPECV_CHKFEAT ; Represent CHKFEAT X16. UNSPECV_TSTART ; Represent transaction start. UNSPECV_TCOMMIT ; Represent transaction commit. UNSPECV_TCANCEL ; Represent transaction cancel. @@ -8258,6 +8259,14 @@ "msr\tnzcv, %0" ) +;; CHKFEAT instruction +(define_insn "aarch64_chkfeat" + [(set (reg:DI R16_REGNUM) + (unspec_volatile:DI [(reg:DI R16_REGNUM)] UNSPECV_CHKFEAT))] + "" + "hint\\t40 // chkfeat x16" +) + ;; AdvSIMD Stuff (include "aarch64-simd.md")