public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Yufeng Zhang 张玉峰" <yufeng.zhang.uk@googlemail.com>
To: Shiva Chen <shiva0217@gmail.com>
Cc: gcc@gcc.gnu.org
Subject: Re: Aarch64 implementation for dwarf exception handling
Date: Thu, 13 Feb 2014 11:41:00 -0000	[thread overview]
Message-ID: <CAOspo7r+HgWjZ-zb1GrjFx4Y3rHzfef4158a-xQT7W24PyB7Dw@mail.gmail.com> (raw)
In-Reply-To: <CAH=PD7byDjYwq3KjpR=THt-HO6a73Zy9abq8_Zttg8kqjy-VMw@mail.gmail.com>

Hi Shiva,

I wonder if you have any test case to demonstrate the potential
code-gen issue you are concerned with.

Thanks,
Yufeng

On Thu, Feb 13, 2014 at 2:14 AM, Shiva Chen <shiva0217@gmail.com> wrote:
> Hi,
>
> I have a question about the implementation of
>
> aarch64_final_eh_return_addr
>
> which is used to point out the return address of the frame
>
> According the source code
>
> If FP is not needed
>
>   return gen_frame_mem (DImode,
>                         plus_constant (Pmode,
>                                        stack_pointer_rtx,
>                                        fp_offset
>                                        + cfun->machine->frame.saved_regs_size
>                                        - 2 * UNITS_PER_WORD));
>
>
> According the frame layout
>
>         +-------------------------------+ <-- arg_pointer_rtx
>         |
>         |  callee-allocated save area
>         |  for register varargs
>         |
>         +-------------------------------+
>         |
>         |  local variables
>         |
>         +-------------------------------+ <-- frame_pointer_rtx
>         |
>         |  callee-saved registers
>         |
>         +-------------------------------+
>         |  LR'
>         +-------------------------------+
>         |  FP'
>        P+-------------------------------+ <-- hard_frame_pointer_rtx
>         |  dynamic allocation
>         +-------------------------------+
>         |
>         |  outgoing stack arguments
>         |
>         +-------------------------------+ <-- stack_pointer_rtx
>
> Shouldn't the return value be
>
>   return gen_frame_mem (DImode,
>                         plus_constant (Pmode,
>                                        stack_pointer_rtx,
>                                        fp_offset
>                                        +  2* UNITS_PER_WORD));
>
> Or I just mis-understanding something ?
>
>
> Hope someone could give me a tip.
>
> It would be very helpful.
>
> Thanks
>
> Shiva Chen

  reply	other threads:[~2014-02-13 11:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-13  2:15 Shiva Chen
2014-02-13 11:41 ` Yufeng Zhang 张玉峰 [this message]
2014-02-13 14:32 ` Renlin Li
2014-02-13 15:37   ` Shiva Chen

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=CAOspo7r+HgWjZ-zb1GrjFx4Y3rHzfef4158a-xQT7W24PyB7Dw@mail.gmail.com \
    --to=yufeng.zhang.uk@googlemail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=shiva0217@gmail.com \
    /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).