+2015-07-22 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/66954
+ * config/i386/i386.c (get_builtin_code_for_version): Add P_AES
+ to enum feature_priority and feature_list.
+ (fold_builtin_cpu): Add F_AES to enum processor_features
+ and isa_names_table.
+
2015-07-22 Ilya Enkovich <enkovich.gnu@gmail.com>
PR driver/66737
P_SSE4_2,
P_PROC_SSE4_2,
P_POPCNT,
+ P_AES,
P_AVX,
P_PROC_AVX,
P_BMI,
P_PROC_AVX512F
};
- enum feature_priority priority = P_ZERO;
+ enum feature_priority priority = P_ZERO;
/* These are the target attribute strings for which a dispatcher is
available, from fold_builtin_cpu. */
{"sse4.1", P_SSE4_1},
{"sse4.2", P_SSE4_2},
{"popcnt", P_POPCNT},
+ {"aes", P_AES},
{"avx", P_AVX},
{"bmi", P_BMI},
{"fma4", P_FMA4},
F_AVX512F,
F_BMI,
F_BMI2,
+ F_AES,
F_MAX
};
{"avx2", F_AVX2},
{"avx512f",F_AVX512F},
{"bmi", F_BMI},
- {"bmi2", F_BMI2}
+ {"bmi2", F_BMI2},
+ {"aes", F_AES}
};
tree __processor_model_type = build_processor_model_struct ();
+2015-07-22 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/66954
+ * g++.dg/ext/mv24.C: New test.
+
2015-07-22 Marek Polacek <polacek@redhat.com>
* gcc.dg/vmx/unpack.c: Use dg-additional-options rather than
--- /dev/null
+// Test case to check if Multiversioning works for AES
+
+// { dg-do run { target i?86-*-* x86_64-*-* } }
+// { dg-require-ifunc "" }
+// { dg-options "-O2" }
+
+#include <assert.h>
+
+// Check if AES feature selection works
+int foo () __attribute__((target("default")));
+int foo () __attribute__((target("aes")));
+
+int main ()
+{
+ int val = foo ();
+
+ if (__builtin_cpu_supports ("aes"))
+ assert (val == 1);
+ else
+ assert (val == 0);
+
+ return 0;
+}
+
+int __attribute__ ((target("default")))
+foo ()
+{
+ return 0;
+}
+
+int __attribute__ ((target("aes")))
+foo ()
+{
+ return 1;
+}
+2015-07-22 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/66954
+ * config/i386/cpuinfo.c (enum processor_features): Add FEATURE_AES.
+ (get_available_features): Handle FEATURE_AES.
+
2015-07-22 Chung-Lin Tang <cltang@codesourcery.com>
* config/nios2/linux-atomic.c (<asm/unistd.h>): Remove #include.
FEATURE_FMA,
FEATURE_AVX512F,
FEATURE_BMI,
- FEATURE_BMI2
+ FEATURE_BMI2,
+ FEATURE_AES
};
struct __processor_model
features |= (1 << FEATURE_SSE2);
if (ecx & bit_POPCNT)
features |= (1 << FEATURE_POPCNT);
+ if (ecx & bit_AES)
+ features |= (1 << FEATURE_AES);
if (ecx & bit_SSE3)
features |= (1 << FEATURE_SSE3);
if (ecx & bit_SSSE3)