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]

[PATCH] TARGET_<xxx> support, was [PATCH] Rs6000 infrastructure cleanup


The powerpc port is running out of switches that set bits in target_flags, and
I am in the process of changing all of the switches to use a secondary flag
word that is HOST_WIDE_INT (at least 64-bits on powerpc).  One of the changes
is that the options machinery changes all of the TARGET_<xxx> names to
OPTION_<xxx>.  Joseph and I have been talking about going back to using
TARGET_<xxx> all of the time.

I did some digging, and there are only two ports that use this:
  1) The x86 had a similar problem some time ago; (and)
  2) All Android linux ports uses it for setting a single bit to avoid adding
     any bits to the target_flags in the target machine.

I made a set of changes to make this change.  I have bootstrapped the x86
compiler with no problems, and before I go home tonight, I will kick off a
build/make compare of an unmodified tree.  Assuming there are no regressions
found, are these patches ok to check in?

Now, the x86 actually maps the OPTION_ISA_xxx switches to TARGET_xxx switches,
so it is easy to change all of the defines from OPTION_ISA_<xxx> to
TARGET_ISA_<xxx>.  For Android, it was simple to change the one line of
reference.

2012-10-16  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* opth-gen.awk (TARGET_* generation): Always generate TARGET_<xxx>
	for Mask options, whether they use Var(...) or not.

	* config/linux-android.h (ANDROID_TARGET_OS_CPP_BUILTINS): Use
	TARGET_<xxx> instead of OPTION_<xxx>.
	* config/i386/i386.h (TARGET_64BIT): Likewise.
	(TARGET_MMX): Likewise.
	(TARGET_3DNOW): Likewise.
	(TARGET_3DNOW_A): Likewise.
	(TARGET_SSE): Likewise.
	(TARGET_SSE2): Likewise.
	(TARGET_SSE3): Likewise.
	(TARGET_SSSE3): Likewise.
	(TARGET_SSE4_1): Likewise.
	(TARGET_SSE4_2): Likewise.
	(TARGET_AVX): Likewise.
	(TARGET_AVX2): Likewise.
	(TARGET_FMA): Likewise.
	(TARGET_SSE4A): Likewise.
	(TARGET_FMA4): Likewise.
	(TARGET_XOP): Likewise.
	(TARGET_LWP): Likewise.
	(TARGET_ROUND): Likewise.
	(TARGET_ABM): Likewise.
	(TARGET_BMI): Likewise.
	(TARGET_BMI2): Likewise.
	(TARGET_LZCNT): Likewise.
	(TARGET_TBM): Likewise.
	(TARGET_POPCNT): Likewise.
	(TARGET_SAHF): Likewise.
	(TARGET_MOVBE): Likewise.
	(TARGET_CRC32): Likewise.
	(TARGET_AES): Likewise.
	(TARGET_PCLMUL): Likewise.
	(TARGET_CMPXCHG16B): Likewise.
	(TARGET_FSGSBASE): Likewise.
	(TARGET_RDRND): Likewise.
	(TARGET_F16C): Likewise.
	(TARGET_RTM     ): Likewise.
	(TARGET_HLE): Likewise.
	(TARGET_RDSEED): Likewise.
	(TARGET_PRFCHW): Likewise.
	(TARGET_ADX): Likewise.
	(TARGET_64BIT): Likewise.
	(TARGET_MMX): Likewise.
	(TARGET_3DNOW): Likewise.
	(TARGET_3DNOW_A): Likewise.
	(TARGET_SSE): Likewise.
	(TARGET_SSE2): Likewise.
	(TARGET_SSE3): Likewise.
	(TARGET_SSSE3): Likewise.
	(TARGET_SSE4_1): Likewise.
	(TARGET_SSE4_2): Likewise.
	(TARGET_AVX): Likewise.
	(TARGET_AVX2): Likewise.
	(TARGET_FMA): Likewise.
	(TARGET_SSE4A): Likewise.
	(TARGET_FMA4): Likewise.
	(TARGET_XOP): Likewise.
	(TARGET_LWP): Likewise.
	(TARGET_ROUND): Likewise.
	(TARGET_ABM): Likewise.
	(TARGET_BMI): Likewise.
	(TARGET_BMI2): Likewise.
	(TARGET_LZCNT): Likewise.
	(TARGET_TBM): Likewise.
	(TARGET_POPCNT): Likewise.
	(TARGET_SAHF): Likewise.
	(TARGET_MOVBE): Likewise.
	(TARGET_CRC32): Likewise.
	(TARGET_AES): Likewise.
	(TARGET_PCLMUL): Likewise.
	(TARGET_CMPXCHG16B): Likewise.
	(TARGET_FSGSBASE): Likewise.
	(TARGET_RDRND): Likewise.
	(TARGET_F16C): Likewise.
	(TARGET_RTM): Likewise.
	(TARGET_HLE): Likewise.
	(TARGET_RDSEED): Likewise.
	(TARGET_PRFCHW): Likewise.
	(TARGET_ADX): Likewise.
	(TARGET_LP64): Likewise.
	(TARGET_X32): Likewise.
	(TARGET_ISA_ROUND): Likewise.
	* config/i386/darwin.h (TARGET_64BIT): Likewise.

-- 
Michael Meissner, IBM
5 Technology Place Drive, M/S 2757, Westford, MA 01886-3141, USA
meissner@linux.vnet.ibm.com	fax +1 (978) 399-6899

Attachment: gcc-power7.patch365b
Description: Text document


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