Re: [rfc] skip_ilp32_tests / skip_lp64_tests predicates (was: Re: support biarch gcore?)

H.J. Lu
2010-07-09T21:43:18Z

On Fri, Jul 9, 2010 at 8:48 AM, Ulrich Weigand <uweigand@de.ibm.com> wrote:
> H.J. Lu wrote:
>
>> Very good point. There are some arch specific tests which are either
>> 32bit or 64bit. Currently, we check target. It doesn't work -m32. We
>> need something like
>>
>> /* { dg-require-effective-target lp64 } */
>> /* { dg-require-effective-target ilp32 } */
>
> Right; I noticed this problem with one ppc64 test case as well.
>
> I've tried to add testsuite predicates skip_ilp32_tests and skip_lp64_tests
> modeled along the lines of the above GCC effective-target flags, and this
> helps with this ppc64 test case.
>
> Could you try whether you can use this to fix the i386/x86_64 tests?
>
> I'd appreciate any comments on the approach below!
>
> Bye,
> Ulrich
>
>
> ChangeLog:
>
>        * lib/gdb.exp (skip_ilp32_tests): New procedure.
>        (skip_lp64_tests): New procedure.
>        * gdb.arch/ppc64-atomic-inst.exp: Use skip_lp64_tests to execute test
>        only when building 64-bit executables.  Do not hard-code -m64 option.
>

This syntax is strange. There are

--
if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } {
verbose "Skipping x86 AVX tests."
return
}
...
if [istarget i?86-*-*] {
set nr_regs 8
} else {
set nr_regs 16
}
...

I am looking for something like is_ilp32/is_lp64.

--
H.J.