From: "H.J. Lu" <hjl.tools@gmail.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb-patches@sourceware.org
Subject: Re: PATCH: Also check for `movl %esp, %ebp' for x32
Date: Thu, 03 May 2012 19:01:00 -0000 [thread overview]
Message-ID: <CAMe9rOqQrPBYrMaHCq5od9YZ0WfLMa5XDeo7EDih6EAZUaY6_A@mail.gmail.com> (raw)
In-Reply-To: <CAMe9rOrQAavAifu=+GzEgY4NV2vDWWeT64Cf9x6iVC=dMGLkaQ@mail.gmail.com>
On Wed, May 2, 2012 at 3:14 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Wed, May 2, 2012 at 2:43 PM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>>> Date: Sun, 29 Apr 2012 11:37:49 -0700
>>> From: "H.J. Lu" <hjl.tools@gmail.com>
>>>
>>> On Tue, Apr 24, 2012 at 9:27 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> > On Tue, Apr 17, 2012 at 7:30 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> >> On Tue, Apr 17, 2012 at 4:43 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>>> >>>> Date: Tue, 10 Apr 2012 13:29:53 -0700
>>> >>>> From: "H.J. Lu" <hongjiu.lu@intel.com>
>>> >>>>
>>> >>>> Hi,
>>> >>>>
>>> >>>> X32 may use `movl %esp, %ebp' in prologue. This patch checks it for
>>> >>>> x32. Tested on Linux/x86-64. OK for trunk?
>>> >>>
>>> >>> Sorry, but I'm not sure it is a good idea to mix ABIs in the code like
>>> >>> that. Up until now, I've made a conscious attempt to keep the i386
>>> >>> and amd64 ABIs seperated out as much as possible. Can you post a
>>> >>> complete diff of the -tdep.c related changes to support x32 in GDB,
>>> >>> such that I can judge where this is heading?
>>> >>
>>> >> Here is the complete x32 GDB patch:
>>> >>
>>> >> http://sourceware.org/ml/gdb-patches/2012-04/msg00476.html
>>> >>
>>> >
>>> > Hi Mark,
>>> >
>>> > Have you looked at my change?
>>> >
>>> > Thanks.
>>>
>>> Ping.
>>
>> Sorry; been travelling too much lately...
>>
>> I did have a look at it, but still have some questions.
>>
>>> Hi,
>>>
>>> X32 may use `movl %esp, %ebp' in prologue. This patch checks it for
>>> x32. Tested on Linux/x86-64. OK for trunk?
>>
>> But the prologues generated by various compilers are expected to be
>> otherwise the same for both the x32 ABI and the normal 64-bit ABI? I
>> guess x32 has to use "pushq %rbp" as "pushl %ebp" isn't available.
>> And I guess you want to keep the stack 16-byte aligned anyway. I
>> suppose that "movq %rsp, %rbp" is still ok for x32, but "movl %esp,
>> %ebp" can be encoded in less bytes, so it might be a bit more
>> efficient for x32.
>
> That is correct.
Is my patch OK to install?
>> But what about the stack align code that we check for in
>> amd64_analyze_stack_align()? Wouldn't that be different for x32 as
>> well?
>
> That is true. I will submit a separate patch for it.
>
The patch to add x32 support to amd64_analyze_stack_align:
http://sourceware.org/ml/gdb-patches/2012-05/msg00097.html
Thanks.
--
H.J.
next prev parent reply other threads:[~2012-05-03 19:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-10 20:52 H.J. Lu
2012-04-16 17:54 ` PING: " H.J. Lu
2012-04-17 11:35 ` Yao Qi
2012-04-17 14:41 ` H.J. Lu
2012-04-17 11:51 ` Mark Kettenis
2012-04-17 14:32 ` H.J. Lu
2012-04-24 16:33 ` H.J. Lu
2012-04-29 23:21 ` H.J. Lu
2012-05-02 21:44 ` Mark Kettenis
2012-05-02 22:14 ` H.J. Lu
2012-05-03 19:01 ` H.J. Lu [this message]
2012-05-03 21:50 ` Mark Kettenis
2012-05-03 21:52 ` H.J. Lu
2012-05-06 20:31 ` Mark Kettenis
2012-05-06 20:42 ` H.J. Lu
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=CAMe9rOqQrPBYrMaHCq5od9YZ0WfLMa5XDeo7EDih6EAZUaY6_A@mail.gmail.com \
--to=hjl.tools@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/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