This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: cleanup gcc.dg/vect/ (take 2)


On Wed, Oct 20, 2004 at 02:28:14PM -0400, Aldy Hernandez wrote:
> > to add more when they are needed.  Aldy added an "exit" to vect.exp for
> > targets that never run these tests.
> 
> One of the reasons I had an exit was because the e500 cannot coexist
> with AltiVec, because they share the same opcodes.
> 
> So even if we compile these tests, they will error out on e500:
> 
>  if (TARGET_E500)
>     {
>       if (TARGET_ALTIVEC)
> 	error ("AltiVec and E500 instructions cannot coexist");
> 
> Could we also pass an -mcpu= option, when only compiling, to guarantee 
> we choose an architecture that has AltiVec?  Passing, say, -mcpu=7400
> guarantees we're not E500.

Oops, I thought your "exit" was still there.  There's an "exit" but it
no longer handles the case you were concerned about, sorry.  It's
probably fine to just add checks in vect.exp to skip specific subtargets
that shouldn't run the tests at all, as is done in gcc.dg/vmx/vmx.exp,
which I notice uses "return" instead of "exit".  Something like this
(untested):

# Set additional target dependent vector flags.
if { [istarget "powerpc*-*-*"] } {
    if { [istarget powerpc*-*-aix*] || [istarget powerpc*-*eabispe*] } {
        return
    }
    lappend DEFAULT_CFLAGS "-maltivec"
    if { [check_vmx_hw_available ] } {
        set dg-do-what-default run
    } else {
        set dg-do-what-default compile
    }
} elseif { [istarget "i?86-*-*" "x86_64-*-*"] } {
    set dg-do-what-default run
    lappend DEFAULT_CFLAGS "-msse2"
} elseif { [istarget "mipsisa64*-*-*"] } {
    set dg-do-what-default run
    lappend DEFAULT_CFLAGS "-mpaired-single"
} else {
    return
}

Janis


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