This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Use is_x86_like_target to check x86 targets


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]