x86-64 ABI testsuite for GCC

Michael Matz matz@suse.de
Mon Jun 20 11:33:00 GMT 2005


Hi,

On Mon, 20 Jun 2005, Joseph S. Myers wrote:

> > foreach src [lsort [find $srcdir/$subdir test_*.c]] {
> >     if {[runtest_file_p $runtests $src]} {
> > 	c-torture-execute [list $src \
> > 			        $srcdir/$subdir/asm-support.s] \
> > 				$additional_flags
> >     }
> > }
> 
> How does this harness ensure that tests are run only for x86_64 / i386 
> (64-bit) and not for other targets or x86_64 / i386 (32-bit)?

/me looking astonished into the .exp file again

I _swear_ I initially had this in my .exp file, when still using the dg 
framework:

  if { ![istarget x86_64-*-*] } then {
    return
  }

like it's done in the other target specific .exp files, then I changed it 
to c-torture and somehow lost that hunk :-|  Consider it to be existing ;)
Thanks for noticing.

> (As noted in bug 20772, any test for one of x86_64 or i?86 should also
> be enabled for the other, and restricted to ilp32 or lp64 mode as
> appropriate.

Is the i386 compiler when using -m64 really obeying the x86-64 ABI?  I.e. 
is "lp64" indeed the property I should be testing instead of x86_64, even 
for such ABI testsuite?  I've added this to my .exp file; I've only 
verified that it's still running correctly on x86_64-linux:

-----------
load_lib target-supports.exp
if { (![istarget x86_64-*-*] && ![istarget i?86-*-*])
     || ![is-effective-target lp64] } then {
  return
}
-----------

Does that look better?


Ciao,
Michael.



More information about the Gcc-patches mailing list