From patchwork Fri Feb 28 17:44:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yufeng Zhang X-Patchwork-Id: 325307 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 6E9312C00AF for ; Sat, 1 Mar 2014 04:44:19 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=ncGRTOC6kuFptHMmY1/akqEA3kfqAtnmZidzGqzeXIu Ek2rHsTvQKaGn8XTZ3Fi4Q1EYnF0nqstxjvuIq+xPsGMHD9MhHmSqXZt5wpSZBrO LTxKYs90OS2SEE4tkBzEvNpMMYFkGyu6xVULlcAsWfcS3B9ZZEWEctNJI6k6OEqc = 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 :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=MYpu74fAloc4tSZ38o+kTimCCqs=; b=uj9jr3xBGd8muVv2T AkXmGD76mX5tDqvA895gfA8tov4A4ypuRiqAoS6iw2pMskA+RlQ+YrR4GUtcOmxs dxm4QMKjuEiuS7J4+OFNablYtslrcxotZTz1xk8Zx1nuuuJ6eYm2WMN9OuJoG/Uq DCttybO5GmpWoVJailiIE2BXIw= Received: (qmail 29158 invoked by alias); 28 Feb 2014 17:44:13 -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 29147 invoked by uid 89); 28 Feb 2014 17:44:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 28 Feb 2014 17:44:09 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Fri, 28 Feb 2014 17:44:06 +0000 Received: from [10.1.201.52] ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 28 Feb 2014 17:44:05 +0000 Message-ID: <5310CAE5.6090700@arm.com> Date: Fri, 28 Feb 2014 17:44:05 +0000 From: Yufeng Zhang User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: Marcus Shawcroft , green@moxielogic.com Subject: [PATCH, AArch64] Sync merge libffi - fix call frame information in ffi_closure_SYSV X-MC-Unique: 114022817440600201 X-IsSubscribed: yes Hi, The attached patch fixes a bug in ./src/aarch64/sysv.S:ffi_closure_SYSV where stack unwinding information was not generated correctly. The change has been reviewed, approved and merged into the stand-alone libffi release tree**. OK for the trunk? Thanks, Yufeng ** http://github.com/atgreen/libffi 2014-02-28 Yufeng Zhang * src/aarch64/sysv.S (ffi_closure_SYSV): Use x29 as the main CFA reg; update cfi_rel_offset. diff --git a/libffi/src/aarch64/sysv.S b/libffi/src/aarch64/sysv.S index b8cd421..ffb16f8 100644 --- a/libffi/src/aarch64/sysv.S +++ b/libffi/src/aarch64/sysv.S @@ -231,13 +231,13 @@ ffi_closure_SYSV: cfi_rel_offset (x30, 8) mov x29, sp + cfi_def_cfa_register (x29) sub sp, sp, #ffi_closure_SYSV_FS - cfi_adjust_cfa_offset (ffi_closure_SYSV_FS) stp x21, x22, [x29, #-16] - cfi_rel_offset (x21, 0) - cfi_rel_offset (x22, 8) + cfi_rel_offset (x21, -16) + cfi_rel_offset (x22, -8) /* Load x21 with &call_context. */ mov x21, sp @@ -295,7 +295,7 @@ ffi_closure_SYSV: cfi_restore (x22) mov sp, x29 - cfi_adjust_cfa_offset (-ffi_closure_SYSV_FS) + cfi_def_cfa_register (sp) ldp x29, x30, [sp], #16 cfi_adjust_cfa_offset (-16)