public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Yufeng Zhang <Yufeng.Zhang@arm.com>
To: libffi-discuss@sourceware.org
Subject: [PATCH, AArch64] Fix Call Frame Information in ffi_closure_SYSV
Date: Mon, 23 Dec 2013 18:30:00 -0000	[thread overview]
Message-ID: <52B8815B.5030700@arm.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 329 bytes --]

Hi,

This patch fixes a bug in ./src/aarch64/sysv.S:ffi_closure_SYSV where 
stack unwinding information was not generated correctly.

OK for the mainline?

Thanks,
Yufeng

2013-12-23  Yufeng Zhang  <yufeng.zhang@arm.com>

	* src/aarch64/sysv.S (ffi_closure_SYSV): Use x29 as the
	main CFA reg; update cfi_rel_offset.

[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 882 bytes --]

diff --git a/src/aarch64/sysv.S b/src/aarch64/sysv.S
index 1022454..ecf6371 100644
--- a/src/aarch64/sysv.S
+++ b/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)

             reply	other threads:[~2013-12-23 18:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-23 18:30 Yufeng Zhang [this message]
2014-01-06 12:36 ` Marcus Shawcroft
2014-01-14 12:10 ` [PING] " Yufeng Zhang
2014-02-12 18:08   ` [PING^2] " Yufeng Zhang
2014-02-20 14:59     ` [PING^3] " Yufeng Zhang
2014-02-28  5:28   ` [PING] " Anthony Green

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52B8815B.5030700@arm.com \
    --to=yufeng.zhang@arm.com \
    --cc=libffi-discuss@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).