+2017-03-01 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.c (print_reg): Warn for values of
+ unsupported size in integer register.
+
2017-03-01 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/79439
switch (msize)
{
+ case 16:
+ case 12:
case 8:
+ if (GENERAL_REGNO_P (regno) && msize > GET_MODE_SIZE (word_mode))
+ warning (0, "unsupported size for integer register");
+ /* FALLTHRU */
case 4:
if (LEGACY_INT_REGNO_P (regno))
- putc (msize == 8 && TARGET_64BIT ? 'r' : 'e', file);
+ putc (msize > 4 && TARGET_64BIT ? 'r' : 'e', file);
/* FALLTHRU */
- case 16:
- case 12:
case 2:
normal:
reg = hi_reg_name[regno];
if (regno >= ARRAY_SIZE (qi_reg_name))
goto normal;
if (!ANY_QI_REGNO_P (regno))
- error ("unsupported size for integer register in 32-bit mode");
+ error ("unsupported size for integer register");
reg = qi_reg_name[regno];
break;
case 0:
+2017-03-01 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/invsize-2.c: New test.
+ * gcc.target/i386/invsize-3.c: Ditto.
+ * gcc.target/i386/invsize-4.c: Ditto.
+ * gcc.target/i386/pr66274.c: Expect "unsuported size" warning.
+ * gcc.target/i386/stackalign/asm-1.c: Ditto.
+
2017-03-01 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/79439
/* { dg-do compile { target ia32 } } */
+/* { dg-options "" } */
void foo (char x)
{
--- /dev/null
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "" } */
+
+void foo (long long x)
+{
+ __asm__ volatile ("# %0" : : "r" (x));
+} /* { dg-warning "unsupported size" } */
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+void foo (long double x)
+{
+ __asm__ volatile ("# %0" : : "r" (x));
+} /* { dg-warning "unsupported size" } */
--- /dev/null
+/* { dg-do compile { target int128 } } */
+/* { dg-options "" } */
+
+void foo (__int128 x)
+{
+ __asm__ volatile ("# %0" : : "r" (x));
+} /* { dg-warning "unsupported size" } */
void f()
{
- asm ("push %0" : : "r" ((unsigned long long) 456));
-}
+ asm ("push %0" : : "r" ((unsigned long long) 456 >> 32));
+} /* { dg-warning "unsupported size" } */
-/* { dg-final { scan-assembler-not "push %r" } } */
+/* { dg-final { scan-assembler-not "push\[ \t]+%r" } } */
/* This case is to detect a compile time regression introduced in stack
branch development. */
-void f(){asm("%0"::"r"(1.5F));}void g(){asm("%0"::"r"(1.5));}
+void f(){asm("%0"::"r"(1.5F));}void g(){asm("%0"::"r"(1.5));} /* { dg-warning "unsupported size" } */