From: "H.J. Lu" <hjl.tools@gmail.com>
To: Yao Qi <yao@codesourcery.com>
Cc: GDB <gdb-patches@sourceware.org>
Subject: Re: PATCH: Also check for `movl %esp, %ebp' for x32
Date: Tue, 17 Apr 2012 14:41:00 -0000 [thread overview]
Message-ID: <CAMe9rOr0G84_KHV-MYmyWgKVwCdpqWmQes-8+jACkgYhJE9DgQ@mail.gmail.com> (raw)
In-Reply-To: <4F8D4AC8.6010402@codesourcery.com>
On Tue, Apr 17, 2012 at 3:49 AM, Yao Qi <yao@codesourcery.com> wrote:
> On 04/11/2012 04:29 AM, H.J. Lu wrote:
>> - && memcmp (buf, mov_rsp_rbp_2, 3) != 0)
>> + && memcmp (buf, mov_rsp_rbp_2, 3) != 0
>> + && (gdbarch_ptr_bit (gdbarch) == 64
>> + || (memcmp (buf, mov_rsp_rbp_1 + 1, 2) != 0
> ^^
>> + && memcmp (buf, mov_rsp_rbp_2 + 1, 2) != 0)))
> ^^
>
> I don't understand these two constants "2" here. Does this mean the
> encoding of `movl %esp, %ebp' is { 0x48, 0x89 } and { 0x48, 0x8b }? If
movl %esp, %ebp is 0x89, 0xe5 or 0x8b, 0xec.
> my understand is correct, why don't we define two new array
> "movl_esp_ebp_1" and "movl_esp_ebp_2"? which is easier to read/understand.
>
I don't see it is necessary since the difference of movl and movq is
the 0x48 REX prefix.
--
H.J.
next prev parent reply other threads:[~2012-04-17 14:33 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 [this message]
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
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=CAMe9rOr0G84_KHV-MYmyWgKVwCdpqWmQes-8+jACkgYhJE9DgQ@mail.gmail.com \
--to=hjl.tools@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=yao@codesourcery.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