From patchwork Wed Jun 11 10:19:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Baylis X-Patchwork-Id: 31759 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f200.google.com (mail-qc0-f200.google.com [209.85.216.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AB3A82054B for ; Wed, 11 Jun 2014 10:22:11 +0000 (UTC) Received: by mail-qc0-f200.google.com with SMTP id o8sf1218708qcw.7 for ; Wed, 11 Jun 2014 03:22:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:sender:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results; bh=89dP5tP/49qyZPnM5F4XPu3bmRwiLrMFD9azd4vaazQ=; b=bYBbPm21IwbJ1srDOeP16PKup99/wGMT9W83Kejn+m4+MkRK7e6p0COp9SUVIH8ozT SwsDeKbswGmsFsZO0F/WRxoXXgzTT0I0ihlO3AjSJzA/q6Y5qZGAfU+FZuvAedXPv4Uq Q/R9hEDdysM97RYoiURMe94bCElS048CdwTYhHYUR//ewE+Ul+INBvOFqz8Fc2h9YAvW kDW+ynd7hmR2mrRkPXCLuko3RgBL3/E/4v0/Xk8VXX94LRpa0wRiHlx/MZCe89Gyb3y9 q8VrUpHmOeDrGKLBe3BjIS3Vrt/0Uolg4BIgeMWwa2XxWRNo7Ab2FE/HoEW5SBz0kQa9 uW6w== X-Gm-Message-State: ALoCoQlwN+R4fuqldcHNHpOh0rpnrKut4OMOtA40fTFHpaflMJwI28Jg/L3qj1K2lINQV7QGPN84 X-Received: by 10.236.55.69 with SMTP id j45mr1175145yhc.49.1402482131495; Wed, 11 Jun 2014 03:22:11 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.34.46 with SMTP id k43ls2455920qgk.58.gmail; Wed, 11 Jun 2014 03:22:11 -0700 (PDT) X-Received: by 10.52.185.72 with SMTP id fa8mr2567893vdc.12.1402482131380; Wed, 11 Jun 2014 03:22:11 -0700 (PDT) Received: from mail-ve0-x229.google.com (mail-ve0-x229.google.com [2607:f8b0:400c:c01::229]) by mx.google.com with ESMTPS id n10si14097168vei.8.2014.06.11.03.22.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Jun 2014 03:22:11 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c01::229 as permitted sender) client-ip=2607:f8b0:400c:c01::229; Received: by mail-ve0-f169.google.com with SMTP id pa12so4221528veb.0 for ; Wed, 11 Jun 2014 03:22:11 -0700 (PDT) X-Received: by 10.58.211.133 with SMTP id nc5mr4744757vec.28.1402482131068; Wed, 11 Jun 2014 03:22:11 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp290982vcb; Wed, 11 Jun 2014 03:22:10 -0700 (PDT) X-Received: by 10.68.172.193 with SMTP id be1mr3952768pbc.31.1402482130211; Wed, 11 Jun 2014 03:22:10 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id zm3si6105818pac.97.2014.06.11.03.22.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jun 2014 03:22:10 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-369989-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 29348 invoked by alias); 11 Jun 2014 10:20:38 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 29128 invoked by uid 89); 11 Jun 2014 10:20:37 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wg0-f41.google.com Received: from mail-wg0-f41.google.com (HELO mail-wg0-f41.google.com) (74.125.82.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 11 Jun 2014 10:20:36 +0000 Received: by mail-wg0-f41.google.com with SMTP id a1so5261927wgh.12 for ; Wed, 11 Jun 2014 03:20:32 -0700 (PDT) X-Received: by 10.180.218.41 with SMTP id pd9mr28518123wic.7.1402482032878; Wed, 11 Jun 2014 03:20:32 -0700 (PDT) Received: from sale.linaro.local ([213.122.173.130]) by mx.google.com with ESMTPSA id ej2sm33548768wjd.21.2014.06.11.03.20.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Jun 2014 03:20:32 -0700 (PDT) From: Charles Baylis To: rearnsha@arm.com Cc: gcc-patches@gcc.gnu.org, Ramana.Radhakrishnan@arm.com Subject: [PATCH 7/9] Fix cfi annotations Date: Wed, 11 Jun 2014 11:19:53 +0100 Message-Id: <1402481995-12749-7-git-send-email-charles.baylis@linaro.org> In-Reply-To: <1402481995-12749-1-git-send-email-charles.baylis@linaro.org> References: <5398226C.5060905@arm.com> <1402481995-12749-1-git-send-email-charles.baylis@linaro.org> X-IsSubscribed: yes X-Original-Sender: charles.baylis@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c01::229 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gcc.gnu.org X-Google-Group-Id: 836684582541 2014-05-22 Charles Baylis * config/arm/bpabi.S (__aeabi_ldivmod, __aeabi_uldivmod, push_for_divide, pop_for_divide): Use .cfi_* directives for DWARF annotations. Fix DWARF information. --- libgcc/config/arm/bpabi.S | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/libgcc/config/arm/bpabi.S b/libgcc/config/arm/bpabi.S index c044167..959ecb1 100644 --- a/libgcc/config/arm/bpabi.S +++ b/libgcc/config/arm/bpabi.S @@ -22,6 +22,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ + .cfi_sections .debug_frame + #ifdef __ARM_EABI__ /* Some attributes that are common to all routines in this file. */ /* Tag_ABI_align_needed: This code does not require 8-byte @@ -145,7 +147,8 @@ ARM_FUNC_START aeabi_ulcmp sub sp, sp, #8 do_push {sp, lr} #endif -98: cfi_push 98b - \fname, 0xe, -0xc, 0x10 + .cfi_adjust_cfa_offset 16 + .cfi_offset 14, -12 .endm /* restore stack */ @@ -158,6 +161,8 @@ ARM_FUNC_START aeabi_ulcmp add sp, sp, #8 do_pop {r2, r3} #endif + .cfi_restore 14 + .cfi_adjust_cfa_offset 0 .endm #ifdef L_aeabi_ldivmod @@ -171,7 +176,7 @@ ARM_FUNC_START aeabi_ulcmp r2:r3 remainder */ ARM_FUNC_START aeabi_ldivmod - cfi_start __aeabi_ldivmod, LSYM(Lend_aeabi_ldivmod) + .cfi_startproc test_div_by_zero signed push_for_divide __aeabi_ldivmod @@ -181,16 +186,19 @@ ARM_FUNC_START aeabi_ldivmod blt 2f /* arguments in (r0:r1), (r2:r3) and *sp */ bl SYM(__udivmoddi4) __PLT__ + .cfi_remember_state pop_for_divide RET 1: /* xxh:xxl is negative */ + .cfi_restore_state negs xxl, xxl sbc xxh, xxh, xxh, lsl #1 /* Thumb-2 has no RSC, so use X - 2X */ cmp yyh, #0 blt 3f /* arguments in (r0:r1), (r2:r3) and *sp */ bl SYM(__udivmoddi4) __PLT__ + .cfi_remember_state pop_for_divide negs xxl, xxl sbc xxh, xxh, xxh, lsl #1 /* Thumb-2 has no RSC, so use X - 2X */ @@ -199,16 +207,19 @@ ARM_FUNC_START aeabi_ldivmod RET 2: /* only yyh:yyl is negative */ + .cfi_restore_state negs yyl, yyl sbc yyh, yyh, yyh, lsl #1 /* Thumb-2 has no RSC, so use X - 2X */ /* arguments in (r0:r1), (r2:r3) and *sp */ bl SYM(__udivmoddi4) __PLT__ + .cfi_remember_state pop_for_divide negs xxl, xxl sbc xxh, xxh, xxh, lsl #1 /* Thumb-2 has no RSC, so use X - 2X */ RET 3: /* both xxh:xxl and yyh:yyl are negative */ + .cfi_restore_state negs yyl, yyl sbc yyh, yyh, yyh, lsl #1 /* Thumb-2 has no RSC, so use X - 2X */ /* arguments in (r0:r1), (r2:r3) and *sp */ @@ -218,7 +229,7 @@ ARM_FUNC_START aeabi_ldivmod sbc yyh, yyh, yyh, lsl #1 /* Thumb-2 has no RSC, so use X - 2X */ RET - cfi_end LSYM(Lend_aeabi_ldivmod) + .cfi_endproc #endif /* L_aeabi_ldivmod */ @@ -233,7 +244,7 @@ ARM_FUNC_START aeabi_ldivmod r2:r3 remainder */ ARM_FUNC_START aeabi_uldivmod - cfi_start __aeabi_uldivmod, LSYM(Lend_aeabi_uldivmod) + .cfi_startproc test_div_by_zero unsigned push_for_divide __aeabi_uldivmod @@ -241,7 +252,7 @@ ARM_FUNC_START aeabi_uldivmod bl SYM(__udivmoddi4) __PLT__ pop_for_divide RET - cfi_end LSYM(Lend_aeabi_uldivmod) + .cfi_endproc #endif /* L_aeabi_divmod */