From: Andrew Cagney <cagney@gnu.org>
To: Dave Korn <dk@artimi.com>, "'Mark Kettenis'" <kettenis@gnu.org>,
ashishm@linsyssoft.com
Cc: "'David Lecomber'" <david@streamline-computing.com>,
gdb@sources.redhat.com
Subject: Re: Possible improvement to i386 function prologue analysis.
Date: Fri, 15 Oct 2004 22:34:00 -0000 [thread overview]
Message-ID: <417019FE.4030403@gnu.org> (raw)
In-Reply-To: <NUTMEG8zNMwAeiMAIOR000004f3@NUTMEG.CAM.ARTIMI.COM>
>>> Please suggest if it would be worthwhile to work on a
>>> similar check for
>>> special instructions within the for loop in
>>> i386_analyze_register_saves().
>>> This will enable it to continue reading saved registers over such
>>> occurances.
>
>
> It's a consequence of the introduction of RTL prolog generation in recent
> versions of gcc; before, prologs and epilogs were output as straight
> hard-coded assembler. Now that they are generated from RTL insns, it is
> possible for the scheduler to move instructions from the body of the
> function into the prologue itself. While this is good for performance, it
> means that basically _any_ instruction can be found in the prolog. This
> makes writing the code to disassemble and interpret the prolog a good deal
> more difficult.
>
>
>>> It's not as important as getting the stack frame setup right (which is
>>> why the code in i386_analyze_frame_setup is there), but it would
>>> certainly be nice to have it. There a slight complication though.
>>> The prologue analyzing stuff is also used for implementing
>>> i386_skip_prologue(). Now i386_skip_prologue() shouldn't dwell too
>>> far into the function. Skipping the instructions we're talking about
>>> here might just do that.
GCC, at -O0, should not be mixing prologue and code body. Dwarf3 does
define a function prologue address attribute, and if available GDB
should use prefer it over the heuristic.
Andrew
prev parent reply other threads:[~2004-10-15 18:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-15 14:56 ashish mittal
2004-10-15 18:42 ` Mark Kettenis
2004-10-15 22:26 ` Dave Korn
2004-10-15 22:34 ` Andrew Cagney [this message]
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=417019FE.4030403@gnu.org \
--to=cagney@gnu.org \
--cc=ashishm@linsyssoft.com \
--cc=david@streamline-computing.com \
--cc=dk@artimi.com \
--cc=gdb@sources.redhat.com \
--cc=kettenis@gnu.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