Re: PATCH: Use is_x86_like_target to check x86 targets

H.J. Lu
2012-10-11T17:37:26Z

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.