[PATCH] Intrinsics for ADCX, ADOX, RDSEED and PREFETCHW

Kirill Yukhin kirill.yukhin@gmail.com
Tue Jul 24 14:06:00 GMT 2012


> Can you please split the patch to three independent parts, prefetchw
> handling, rdseed and adxx. I got lost in the patch the second time.
Sure!

> I propose we start with prefetch. You are still changing prefetch
> patterns, while it should be enough to only change prefetch expander.
Actually, they're splitted since 3dnow has both prefetch and prefetchw
under single CPUID bit,
while under Intel's PRFTCH CPUID bit we have only prefetchw. So, old
pattern "*prefetch_3dnow_<mode>"
was set to be `prefetch` only for 3dnow, while new one is `prefetchw' only,
working both for PRFTCH and 3DNOW bits.

Changelog entry:
2012-07-24  Kirill Yukhin  <kirill.yukhin@intel.com>
	    Michael Zolotukhin  <michael.v.zolotukhin@intel.com>

        * common/config/i386/i386-common.c (OPTION_MASK_ISA_PRFCHW_SET): New.
        (OPTION_MASK_ISA_PRFCHW_UNSET): Likewise.
        (ix86_handle_option): Handle mprfchw option.
        * config.gcc (i[34567]86-*-*): Add prfchwintrin.h.
        (x86_64-*-*): Likewise.
        * config/i386/prfchwintrin.h: New header.
        * config/i386/cpuid.h (bit_PRFCHW): New.
        (bit_BMI): Formatting fix.
        (bit_HLE): Likewise.
        (bit_RTM): Likewise.
        * config/i386/driver-i386.c (host_detect_local_cpu): Detect
        PREFETCHW support.
        * config/i386/i386-c.c: Define __PRFCHW__ if needed.
        * config/i386/i386.c (ix86_target_string): Define
        -mprfchw option. Formatting fixes.
        (PTA_HLE): Formatting fix.
        (PTA_PRFCHW): New.
        (ix86_option_override_internal): Handle new option.
        (ix86_valid_target_attribute_inner_p): Add OPT_mprfchw.
        * config/i386/i386.h (TARGET_PRFCHW): New.
        * config/i386/i386.md (prefetch): Enable for TARGET_PRFCHW.
        (prefetchw_<mode>): New define_insn for write-prefetch.
        (prefetch_3dnow_<mode>): Keep only read-prefetch here.
        * config/i386/i386.opt (mprfchw): New.
        * config/i386/mm3dnow.h: Move _m_prefetchw from here to
        prfchwintrin.h.
        * config/i386/x86intrin.h: Include prfchwintrin.h.

testsuite/Changelog entry:
2012-07-24  Kirill Yukhin  <kirill.yukhin@intel.com>
	    Michael Zolotukhin  <michael.v.zolotukhin@intel.com>

        * gcc.target/i386/prefetchw-1.c: New.
	* gcc.target/i386/sse-12.c: Add -mprfchw.
	* gcc.target/i386/sse-13.c: Ditto.
	* gcc.target/i386/sse-14.c: Ditto.
	* g++.dg/other/i386-2.C: Ditto.
	* g++.dg/other/i386-3.C: Ditto.

patch is bootstrapping at the moment.

Any objections?

Thanks, K
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bdw-prefetchw-1.gcc.patch
Type: application/octet-stream
Size: 20252 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120724/142cb1ee/attachment.obj>


More information about the Gcc-patches mailing list