From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: hjl.tools@gmail.com
Cc: gdb-patches@sourceware.org, xuepeng.guo@intel.com, joey.ye@intel.com
Subject: Re: PATCH: Update x86 stack align analyzer
Date: Sat, 09 Aug 2008 15:33:00 -0000 [thread overview]
Message-ID: <200808091532.m79FW1gl026254@brahms.sibelius.xs4all.nl> (raw)
In-Reply-To: <20080809145147.GA19462@lucon.org> (hjl.tools@gmail.com)
> Date: Sat, 9 Aug 2008 07:51:47 -0700
> From: "H.J. Lu" <hjl.tools@gmail.com>
>
> On Sat, Aug 09, 2008 at 02:02:39PM +0200, Mark Kettenis wrote:
> > I feel, rather strongly, that the stack align stuff stuff should only
> > deal with stack alignment done *before* a frame gets setup. I think
> > setting saved_sp_reg to -1, and proceeding as usual if it is still set
> > at that value after the stack alignment analysis, works just fine. I
> > also noticed a problem with your diff in that it doesn't use the
> > proper saved sp value if you do have a frame (not sure GCC actually
> > generates such code).
> >
> > How about the attached diff? Does it work with GCC 4.4?
> >
> >
>
> Yes, it works. OK to install?
Sure, but can you change the ChangeLog to use kettenis@gnu.org as my
mail-address?
> 2008-08-09 Xuepeng Guo <xuepeng.guo@intel.com>
> H.J. Lu <hongjiu.lu@intel.com>
> Mark Kettenis <mark.kettenis@xs4all.nl>
>
> * amd64-tdep.c (amd64_frame_cache): Add saved_sp_reg.
> (amd64_init_frame_cache): Initialize saved_sp_reg.
> (amd64_analyze_stack_align): New.
> (amd64_analyze_prologue): Call it.
> (amd64_frame_cache): Use saved_sp_reg if it is invalid. Don't set
> %rip to 8 when halfway aligning the stack.
>
> * amd64-tdep.h (amd64_regnum): Add AMD64_R9_REGNUM to
> AMD64_R14_REGNUM.
>
> * i386-tdep.c (i386_frame_cache): Remove stack_align. Add
> saved_sp_reg.
> (i386_alloc_frame_cache): Remove stack_align. Initialize
> saved_sp_reg to -1.
> (i386_analyze_stack_align): Rewrite.
> (i386_frame_cache): Use saved_sp_reg if it is valid.
prev parent reply other threads:[~2008-08-09 15:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-30 21:12 H.J. Lu
2008-08-06 21:06 ` Mark Kettenis
2008-08-06 21:36 ` H.J. Lu
2008-08-09 12:03 ` Mark Kettenis
2008-08-09 14:52 ` H.J. Lu
2008-08-09 15:33 ` Mark Kettenis [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=200808091532.m79FW1gl026254@brahms.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=gdb-patches@sourceware.org \
--cc=hjl.tools@gmail.com \
--cc=joey.ye@intel.com \
--cc=xuepeng.guo@intel.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