Re: PATCH: Also check for `movl %esp, %ebp' for x32

Yao Qi
2012-04-17T10:49:52Z

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
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.

--
Yao (é½å°§)