On Fri, Jul 9, 2010 at 2:43 PM, H.J. Lu wrote: > On Fri, Jul 9, 2010 at 8:48 AM, Ulrich Weigand 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. > This patch seems to work. Thanks. -- H.J. --- 2010-07-09 Ulrich Weigand H.J. Lu * lib/gdb.exp (is_ilp32_target): New. (is_lp64_target): Likewise. * gdb.arch/amd64-byte.exp: Use is_lp64_target to check 64bit target. * gdb.arch/amd64-disp-step.exp: Likewise. * gdb.arch/amd64-dword.exp: Likewise. * gdb.arch/amd64-i386-address.exp: Likewise. * gdb.arch/amd64-word.exp: Likewise. * gdb.arch/i386-avx.exp: Use is_ilp32_target to check for 32bit target. * gdb.arch/i386-bp_permanent.exp: Likewise. * gdb.arch/i386-byte.exp: Likewise. * gdb.arch/i386-disp-step.exp: Likewise. * gdb.arch/i386-gnu-cfi.exp: Likewise. * gdb.arch/i386-prologue.exp: Likewise. * gdb.arch/i386-size-overlap.exp: Likewise. * gdb.arch/i386-size.exp: Likewise. * gdb.arch/i386-sse.exp: Likewise. * gdb.arch/i386-unwind.exp: Likewise. * gdb.arch/i386-word.exp: Likewise. * gdb.arch/ppc64-atomic-inst.exp: Use is_lp64_target to execute test only when building 64-bit executables. Do not hard-code -m64 option.