2018-01-15 Sebastian Peryt <sebastian.peryt@intel.com>
gcc/
PR target/83546
* config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
to PTA_SILVERMONT.
2018-01-15 Sebastian Peryt <sebastian.peryt@intel.com>
gcc/testsuite/
PR target/83546
* gcc.target/i386/pr83546.c: New test.
From-SVN: r256777
+2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
+
+ PR target/83546
+ * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
+ to PTA_SILVERMONT.
+
2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
* config.gcc (powerpc*-linux*-*): Add support for 64-bit little
#define PTA_BONNELL \
(PTA_CORE2 | PTA_MOVBE)
#define PTA_SILVERMONT \
- (PTA_WESTMERE | PTA_MOVBE)
+ (PTA_WESTMERE | PTA_MOVBE | PTA_RDRND)
#define PTA_KNM \
(PTA_KNL | PTA_AVX5124VNNIW | PTA_AVX5124FMAPS | PTA_AVX512VPOPCNTDQ)
+2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
+
+ PR target/83546
+ * gcc.target/i386/pr83546.c: New test.
+
2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
* c-c++-common/Warray-bounds-3.c (test_memmove_bounds): Fix mismatch.
--- /dev/null
+/* PR target/83546 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=silvermont" } */
+
+int test (void)
+{
+ unsigned int number = 0;
+ int result0, result1, result2, result3;
+
+ result0 = __builtin_ia32_rdrand32_step (&number);
+ result1 = __builtin_ia32_rdrand32_step (&number);
+ result2 = __builtin_ia32_rdrand32_step (&number);
+ result3 = __builtin_ia32_rdrand32_step (&number);
+
+ return result0 + result1 +result2 + result3;
+}
+
+/* { dg-final { scan-assembler-times "rdrand" 4 } } */