From patchwork Thu Aug 10 16:39:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiong Wang X-Patchwork-Id: 800271 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-460193-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="pqIuCISb"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xSv4W11s9z9s2G for ; Fri, 11 Aug 2017 02:39:54 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=BI72IVTRMncEv2FhIWMuKv5o2whIU/VIdVNT6vQTorqz+Qcbke SZQdQw6hpn4GAmYm13GVyJ7dMIc+6AhDUarJBjEd/lRAsFCZzCv6FzQX9laqzhIb H5pPkSe0zk28pbXXfR/GvUIT7JU/cyhx437GZ6uYvdl+RyTqYs4bFlVe8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=xRvVWK9qE3AvF09RBDOrC31yk8Y=; b=pqIuCISb+FuRVKL/vWqt 7JSqY+LqGB1RJVtF9IzjwfU2gf/eoP0CEyDTK1skxlP8RHKru1hfmbVFuGzHz9l2 YX+54vubcmETi1gn3v8JdwYXo2wYv0EyR9VVj28r8ZiejIRT2U9ta2ax1PYfxoAh 3+AGEpZR3zUWQKlQsHgi2cU= Received: (qmail 124966 invoked by alias); 10 Aug 2017 16:39:42 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 124726 invoked by uid 89); 10 Aug 2017 16:39:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-22.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KAM_LOTSOFHASH, RP_MATCHES_RCVD, UNWANTED_LANGUAGE_BODY autolearn=ham version=3.3.2 spammy=usa, USA X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 10 Aug 2017 16:39:38 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 40E2713D5; Thu, 10 Aug 2017 09:39:36 -0700 (PDT) Received: from [10.2.206.198] (e104437-lin.cambridge.arm.com [10.2.206.198]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 572C63F540; Thu, 10 Aug 2017 09:39:35 -0700 (PDT) To: gcc-patches Cc: Cary Coutant , Jason Merrill From: Jiong Wang Subject: [PATCH, DWARF] Add DW_CFA_AARCH64_negate_ra_state to dwarf2.def/h and dwarfnames.c Message-ID: <94486f7a-5966-248d-823b-4f319c87808a@foss.arm.com> Date: Thu, 10 Aug 2017 17:39:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 X-IsSubscribed: yes Hi, A new vendor CFA DW_CFA_AARCH64_negate_ra_state was introduced for ARMv8.3-A return address signing, it is multiplexing DW_CFA_GNU_window_save in CFA vendor extension space. This patch adds necessary code to make it available to external, the GDB patch (https://sourceware.org/ml/gdb-patches/2017-08/msg00215.html) is intended to use it. A new DW_CFA_DUP for it is added in dwarf2.def. The use of DW_CFA_DUP is to avoid duplicated case value issue when included in libiberty/dwarfnames. Native x86 builds OK to make sure no macro expanding errors. OK for trunk? 2017-08-10 Jiong Wang include/ * dwarf2.def (DW_CFA_AARCH64_negate_ra_state): New DW_CFA_DUP. * dwarf2.h (DW_CFA_DUP): New define. libiberty/ * dwarfnames.c (DW_CFA_DUP): New define. diff --git a/include/dwarf2.def b/include/dwarf2.def index a91e9439cd82f3bb9fdddc14904114e5490c1af6..2a3b23fef873db9bb2498cd28c4fafc72e6a234f 100644 --- a/include/dwarf2.def +++ b/include/dwarf2.def @@ -778,6 +778,7 @@ DW_CFA (DW_CFA_MIPS_advance_loc8, 0x1d) /* GNU extensions. NOTE: DW_CFA_GNU_window_save is multiplexed on Sparc and AArch64. */ DW_CFA (DW_CFA_GNU_window_save, 0x2d) +DW_CFA_DUP (DW_CFA_AARCH64_negate_ra_state, 0x2d) DW_CFA (DW_CFA_GNU_args_size, 0x2e) DW_CFA (DW_CFA_GNU_negative_offset_extended, 0x2f) diff --git a/include/dwarf2.h b/include/dwarf2.h index 14b6f22e39e2f2f8cadb05009bfd10fafa9ea07c..a2e022dbdb35c18bb591e0f00930978846b82c01 100644 --- a/include/dwarf2.h +++ b/include/dwarf2.h @@ -52,6 +52,7 @@ #define DW_ATE(name, value) , name = value #define DW_ATE_DUP(name, value) , name = value #define DW_CFA(name, value) , name = value +#define DW_CFA_DUP(name, value) , name = value #define DW_IDX(name, value) , name = value #define DW_IDX_DUP(name, value) , name = value @@ -104,6 +105,7 @@ #undef DW_ATE #undef DW_ATE_DUP #undef DW_CFA +#undef DW_CFA_DUP #undef DW_IDX #undef DW_IDX_DUP diff --git a/libiberty/dwarfnames.c b/libiberty/dwarfnames.c index e58d03c3a3d814f3a271edb4689c6306a2f958f0..dacd78dbaa9b33d6e9fdf35330cdc446dcf4f76c 100644 --- a/libiberty/dwarfnames.c +++ b/libiberty/dwarfnames.c @@ -75,6 +75,7 @@ Boston, MA 02110-1301, USA. */ #define DW_ATE(name, value) case name: return # name ; #define DW_ATE_DUP(name, value) #define DW_CFA(name, value) case name: return # name ; +#define DW_CFA_DUP(name, value) #define DW_IDX(name, value) case name: return # name ; #define DW_IDX_DUP(name, value) @@ -105,5 +106,6 @@ Boston, MA 02110-1301, USA. */ #undef DW_ATE #undef DW_ATE_DUP #undef DW_CFA +#undef DW_CFA_DUP #undef DW_IDX #undef DW_IDX_DUP