This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: PATCH: Use is_x86_like_target to check x86 targets
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: GDB <gdb-patches at sourceware dot org>
- Date: Thu, 11 Oct 2012 10:37:19 -0700
- Subject: Re: PATCH: Use is_x86_like_target to check x86 targets
- References: <20121011152929.GC14479@gmail.com> <50770186.9090002@redhat.com>
On Thu, Oct 11, 2012 at 10:27 AM, Pedro Alves <palves@redhat.com> wrote:
> Some of these tests are written in assembly and have things like:
>
> "gdb1435:\n"
> " pushl %ebp\n"
> " mov %esp, %ebp\n"
> " call " SYMBOL (trap) "\n"
>
> I thought this use of 32-bit regs wouldn't be correct for x32.
>
> --
> Pedro Alves
>
We have
# Return 1 if this target is an x86 or x86-64 with -m32.
proc is_x86_like_target {} {
if {![istarget "x86_64-*-*"] && ![istarget i?86-*]} {
return 0
}
return [expr [is_ilp32_target] && ![is_amd64_regs_target]]
}
is_x86_like_target returns 0 for -mx32 and -m64.
--
H.J.