]> granicus.if.org Git - clang/commitdiff
[CPU-Dispatch] Make pentium_iii_no_xmm_regs and pentium_iii alias.
authorErich Keane <erich.keane@intel.com>
Thu, 24 Jan 2019 15:28:57 +0000 (15:28 +0000)
committerErich Keane <erich.keane@intel.com>
Thu, 24 Jan 2019 15:28:57 +0000 (15:28 +0000)
I discovered that in ICC (where this list comes from), that the two
pentium_iii versions were actually identical despite the two different
names (despite them implying a difference). Because of this, they ended
up having identical manglings, which obviously caused problems when used
together.

This patch makes pentium_iii_no_xmm_regs an alias for pentium_iii so
that it can still be used, but has the same meaning as ICC. However, we
still prohibit using the two together which is different (albeit better)
behavior.

Change-Id: I4f3c9a47e48490c81525c8a3d23ed4201921b288

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352054 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/X86Target.def
test/Sema/attr-cpuspecific.c

index 993f8d0977f6d7fe0a55c5290246d8999877ace1..c6719ff2aff0f5950c9b3d8e80b36c8ba8bcc177 100644 (file)
@@ -300,7 +300,7 @@ CPU_SPECIFIC("pentium_pro", 'C', "+cmov")
 CPU_SPECIFIC("pentium_mmx", 'D', "+mmx")
 CPU_SPECIFIC("pentium_ii", 'E', "+cmov,+mmx")
 CPU_SPECIFIC("pentium_iii", 'H', "+cmov,+mmx,+sse")
-CPU_SPECIFIC("pentium_iii_no_xmm_regs", 'H',"+cmov,+sse")
+CPU_SPECIFIC_ALIAS("pentium_iii_no_xmm_regs", "pentium_iii")
 CPU_SPECIFIC("pentium_4", 'J', "+cmov,+mmx,+sse,+sse2")
 CPU_SPECIFIC("pentium_m", 'K', "+cmov,+mmx,+sse,+sse2")
 CPU_SPECIFIC("pentium_4_sse3", 'L', "+cmov,+mmx,+sse,+sse2,+sse3")
index e87ad4de752545beb065ca68dfd141ae9a57e3d8..ae86742ca0810bc19b9a3110b443b86389a18f67 100644 (file)
@@ -112,3 +112,6 @@ int __attribute__((cpu_specific(pentium_4))) called_invalid_value(void){ return
 int use3(void) {
   return called_invalid_value();
 }
+
+// expected-warning@+1 {{CPU list contains duplicate entries; attribute ignored}}
+int __attribute__((cpu_dispatch(pentium_iii, pentium_iii_no_xmm_regs))) dupe_p3(void);