f = ggc_cleared_alloc<machine_function> ();
f->call_abi = ix86_abi;
f->stack_frame_required = true;
+ f->silent_p = true;
return f;
}
struct cgraph_node *local_info_node = NULL;
struct cgraph_node *target = NULL;
+ /* Set silent_p to false to raise an error for invalid calls when
+ expanding function body. */
+ cfun->machine->silent_p = false;
+
memset (cum, 0, sizeof (*cum));
if (fndecl)
some less clueful developer tries to use floating-point anyway. */
if (needed_sseregs && !TARGET_SSE)
{
+ /* Return early if we shouldn't raise an error for invalid
+ calls. */
+ if (cfun->machine->silent_p)
+ return NULL;
if (in_return)
{
if (!issued_sse_ret_error)
|| regclass[i] == X86_64_X87UP_CLASS
|| regclass[i] == X86_64_COMPLEX_X87_CLASS)
{
+ /* Return early if we shouldn't raise an error for invalid
+ calls. */
+ if (cfun->machine->silent_p)
+ return NULL;
if (!issued_x87_ret_error)
{
error ("x87 register return with x87 disabled");
function. */
BOOL_BITFIELD has_explicit_vzeroupper : 1;
+ /* True if we should act silently, rather than raise an error for
+ invalid calls. */
+ BOOL_BITFIELD silent_p : 1;
+
/* The largest alignment, in bytes, of stack slot actually used. */
unsigned int max_used_stack_alignment;
--- /dev/null
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-mgeneral-regs-only" } */
+
+inline double
+foo (void)
+{
+ return 1.0;
+}
--- /dev/null
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-mno-80387" } */
+
+inline double
+foo (void)
+{
+ return 1.0;
+}
/* { dg-options "-mavx -mvzeroupper -mno-fp-ret-in-387" } */
long double
-foo (long double x)
-{ /* { dg-error "x87 register return with x87 disabled" "" { target { ! ia32 } } } */
+foo (long double x) /* { dg-error "x87 register return with x87 disabled" "" { target { ! ia32 } } } */
+{
return __builtin_ilogbl (x);
}
extern __v4si x;
__v4si
-foo (void)
-{ /* { dg-error "SSE register return with SSE disabled" } */
+foo (void) /* { dg-error "SSE register return with SSE disabled" } */
+{
return x;
}
typedef int int32x2_t __attribute__ ((__vector_size__ ((8))));
-int32x2_t test (int32x2_t a, int32x2_t b)
-{ /* { dg-error "SSE register return with SSE disabled" } */
+int32x2_t test (int32x2_t a, int32x2_t b) /* { dg-error "SSE register return with SSE disabled" } */
+{
return a + b;
}
typedef int int32x2_t __attribute__ ((__vector_size__ ((8))));
__attribute__((__target__("general-regs-only")))
-int32x2_t test (int32x2_t a, int32x2_t b)
-{ /* { dg-error "SSE register return with SSE disabled" } */
+int32x2_t test (int32x2_t a, int32x2_t b) /* { dg-error "SSE register return with SSE disabled" } */
+{
return a + b;
}