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] improve decisions about running vmx tests


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


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