+2019-05-23 Uroš Bizjak <ubizjak@gmail.com>
+
+ Backported from mainline
+ 2019-05-21 Uroš Bizjak <ubizjak@gmail.com>
+
+ * config/i386/cpuid.h (__cpuid): For 32bit targets, zero
+ %ebx and %ecx bafore calling cpuid with leaf 1 or
+ non-constant leaf argument.
+
+ 2019-05-21 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/90547
+ * config/i386/i386.md (anddi_1 to andsi_1_zext splitter):
+ Avoid calling gen_lowpart with CONST operand.
+
2019-05-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
Backport from mainline.
#define signature_VORTEX_ecx 0x436f5320
#define signature_VORTEX_edx 0x36387865
+#ifndef __x86_64__
+/* At least one cpu (Winchip 2) does not set %ebx and %ecx
+ for cpuid leaf 1. Forcibly zero the two registers before
+ calling cpuid as a precaution. */
+#define __cpuid(level, a, b, c, d) \
+ do { \
+ if (__builtin_constant_p (level) && (level) != 1) \
+ __asm__ ("cpuid\n\t" \
+ : "=a" (a), "=b" (b), "=c" (c), "=d" (d) \
+ : "0" (level)); \
+ else \
+ __asm__ ("cpuid\n\t" \
+ : "=a" (a), "=b" (b), "=c" (c), "=d" (d) \
+ : "0" (level), "1" (0), "2" (0)); \
+ } while (0)
+#else
#define __cpuid(level, a, b, c, d) \
__asm__ ("cpuid\n\t" \
: "=a" (a), "=b" (b), "=c" (c), "=d" (d) \
: "0" (level))
+#endif
#define __cpuid_count(level, count, a, b, c, d) \
__asm__ ("cpuid\n\t" \
operands[2] = shallow_copy_rtx (operands[2]);
PUT_MODE (operands[2], SImode);
}
+ else if (GET_CODE (operands[2]) == CONST)
+ {
+ /* (const:DI (plus:DI (symbol_ref:DI ("...")) (const_int N))) */
+ operands[2] = copy_rtx (operands[2]);
+ PUT_MODE (operands[2], SImode);
+ PUT_MODE (XEXP (operands[2], 0), SImode);
+ PUT_MODE (XEXP (XEXP (operands[2], 0), 0), SImode);
+ }
else
operands[2] = gen_lowpart (SImode, operands[2]);
})
+2019-05-23 Uroš Bizjak <ubizjak@gmail.com>
+
+ Backported from mainline
+ 2019-05-21 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/90547
+ * gcc.target/i386/pr90547.c: New test.
+
2019-05-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
Backport from mainline.
--- /dev/null
+/* PR target/90547 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+void
+foo ()
+{
+ void *g[] = {&&a, &&b};
+
+ for (unsigned c = 0x1F;; c >>= 1)
+ {
+ unsigned d = (long)("a"+1);
+ long e = 8;
+
+ while (e)
+ {
+ a: goto *g[c&d];
+ b: e--;
+ }
+ }
+}