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]

[4.7 PATCH, i386]: Enable prefetchw for selected AMD targets


Hello!

Newer AMD processors does not enable 3dNOW anymore. However, prefetchw
depends on TARGET_3DNOW, so it is not generated anymore. Following
patch is a 4.7 version of mainline patch [1].

2012-09-12  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.h (x86_prefetchw): New global variable.
	(TARGET_PREFETCHW): New macro.
	* config/i386/i386.c (PTA_PREFETCHW): Ditto.
	(processor_alias_table): Add PTA_PREFETCHW to
	bdver1, bdver2 and btver1.
	(ix86_option_override_internal): Set x86_prefetchw for
	PTA_PREFETCHW targets.
	* config/i386/i386.md (prefetch): Expand to prefetchw
	for TARGET_PREFETCHW.
	(*prefetch_3dnow_<mode>): Also enable for TARGET_PREFETCHW.

Patch was bootstrapped and regression tested on x86_64-pc-linux-gnu
{,-m32}. Will be committed to 4.7 branch after [1] is committed to
mainline.

[1] http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00670.html

Uros.

Attachment: p.diff.txt
Description: Text document


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