From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id F0335385E45F; Wed, 14 Feb 2024 15:26:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F0335385E45F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707924399; bh=gQKCd4boohgfdWzK5reqR8cUTU3XR780hyUwCdmyfFM=; h=From:To:Subject:Date:From; b=SekxQLqaN4VgZ5gc+HPnJKpxNSwET7JgT2gNg9S25rBrJSiUceEHbk26gaj3SaLXk uKlCJeymMG9iyleuZQgojGc+nhyjUDY1A9kjJkYbhwQ2A8qGUNQ882AwW5XZkI1TQj XoSxSNr7xEKGslp1KD7yzGVji79z1vbNwLEjF3bM= 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: f98aa4a1db28ebc67dd753d9ee33b41fc1d55253 X-Git-Newrev: 3e65859dae0437d51d8e0aba24471fa11ec1aeeb Message-Id: <20240214152639.F0335385E45F@sourceware.org> Date: Wed, 14 Feb 2024 15:26:39 +0000 (GMT) List-Id: https://gcc.gnu.org/g:3e65859dae0437d51d8e0aba24471fa11ec1aeeb commit 3e65859dae0437d51d8e0aba24471fa11ec1aeeb 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 15b08ab19819..3a3dc9ac6fe6 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. @@ -8253,6 +8254,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")