On Tue, Jul 26, 2011 at 5:40 PM, Mike Stump <mikest...@comcast.net> wrote: > On Jul 26, 2011, at 7:50 AM, Kirill Yukhin <kirill.yuk...@gmail.com> wrote: >> I've also prepared a bunch of tests for lzcnt instuction generation.. > >> /ChangeLog entry: >> 2011-07-26 Kirill Yukhin <kirill.yuk...@intel.com> >> >> * lib/target-supports.exp (check_lzcnt_hw_available): New. >> (check_effective_target_lzcnt_runtime): Likewise. >> (check_effective_target_lzcnt): Likewise. > > For target supports, could you add an x86 to the name somewhere...
Actually, please implement LZCNT detection in gcc.target/i386 directory, since it is used only in this directory. You wull need only check_effective_target_lzcnt in gcc.target/i386/i386.exp, runtime detection should be handled in lzcnt-check.h. Oh, bonus points if you implement avx-os-support.h (to check OS support with xgetbv insn) and use it in all *-check.h that check for AVX runtime (including your new lzcnt-check.h). Other than that, your new option should be tested in gcc.target/i386/sse-12.c, gcc.target/i386/sse-13.c, gcc.target/i386/sse-14.c, g++.dg/other/i386-2.C and g++.dg/other/i386-3.C. See these testcases for further details. Uros.