This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] improve decisions about running vmx tests
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Janis Johnson <janis187 at us dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 21 Apr 2004 22:57:20 -0400
- Subject: Re: [patch] improve decisions about running vmx tests
- References: <20040421222251.GB27578@us.ibm.com>
Hi Janis.
I'll defer the final review to other people who know and love tcl, but
the basic idea is good.
> + # Some simulators are known to not support VMX instructions.
> + if { [istarget powerpc-*-eabi] || [istarget powerpc*-*-eabispe] } {
Why not do "[istarget powerpc-*-eabi*]" ?
> + set f [open "tmp.c" "w"]
Where does this create the file? Wouldn't some PID hashing be in
order?
> + puts $f "int main() {\n"
> + puts $f "#ifdef __MACH__\n"
> + puts $f " asm volatile (\"vor v0,v0,v0\");\n"
> + puts $f "#else\n"
> + puts $f " asm volatile (\"vor 0,0,0\");\n"
> + puts $f "#endif\n"
> + puts $f " return 0; }\n"
> + close $f
> +
> + verbose "check_vmx_hw_available compiling testfile" 2
> + set lines [${tool}_target_compile "tmp.c" "tmp.x" executable ""]
> + file delete tmp.c
Neat idea BTW.
> -# Only run this test on PowerPC targets with Altivec support.
> -# For now, that's powerpc*-*-*altivec*. FIXME: generalize.
> -if {![istarget powerpc*-*-*altivec*]} {
> +# Skip these tests for non-PowerPC targets.
> +if {![istarget powerpc*-*-*]} {
> + return
> +}
> +# Skip these tests for AIX, where Altivec is not yet supported.
> +if {[istarget powerpc*-*-aix*]} {
> return
Isn't there an -or- in tcl?
Thanks for looking into this.
Aldy