Commit b8bb5772 by Uros Bizjak

re PR target/81639 (ICE in rtl_verify_bb_insns, at cfgrtl.c:2669 with a naked function)

	PR target/81639
	* config/i386/i386.c (ix86_funciton_naked): New prototype.
	(ix86_function_ok_for_sibcall): Return false for naked functions.

testsuite/ChangeLog:

	PR target/81639
	* gcc.target/i386/pr81639.c: New test.

From-SVN: r250768
parent 34e5c511
2017-08-01 Uros Bizjak <ubizjak@gmail.com>
PR target/81639
* config/i386/i386.c (ix86_funciton_naked): New prototype.
(ix86_function_ok_for_sibcall): Return false for naked functions.
2017-08-01 Richard Biener <rguenther@suse.de>
* tree-ssa-pre.c (print_pre_expr): Handle NULL expr.
......@@ -187,14 +193,16 @@
vector double vec_xl_be (signed long long, double *);
vector float vec_xl_be (signed long long, float *);
* config/rs6000/altivec.h (vec_xl_be): Add #define.
* config/rs6000/rs6000-builtin.def (XL_BE_V16QI, XL_BE_V8HI, XL_BE_V4SI,
XL_BE_V2DI, XL_BE_V4SF, XL_BE_V2DF, XL_BE): Add definitions for the builtins.
* config/rs6000/rs6000-builtin.def (XL_BE_V16QI, XL_BE_V8HI, XL_BE_V4SI)
XL_BE_V2DI, XL_BE_V4SF, XL_BE_V2DF, XL_BE): Add definitions
for the builtins.
* config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Add function.
(altivec_expand_builtin): Add switch statement to call altivec_expand_xl_be
for each builtin.
(altivec_expand_builtin): Add switch statement to call
altivec_expand_xl_be for each builtin.
(altivec_init_builtins): Add def_builtin for _builtin_vsx_le_be_v8hi,
__builtin_vsx_le_be_v4si, __builtin_vsx_le_be_v2di, __builtin_vsx_le_be_v4sf,
__builtin_vsx_le_be_v2df, __builtin_vsx_le_be_v16qi.
__builtin_vsx_le_be_v4si, __builtin_vsx_le_be_v2di,
__builtin_vsx_le_be_v4sf, __builtin_vsx_le_be_v2df,
__builtin_vsx_le_be_v16qi.
* doc/extend.texi: Update the built-in documentation file for the
new built-in functions.
......
......@@ -94,6 +94,7 @@ static rtx legitimize_pe_coff_extern_decl (rtx, bool);
static rtx legitimize_pe_coff_symbol (rtx, bool);
static void ix86_print_operand_address_as (FILE *, rtx, addr_space_t, bool);
static bool ix86_save_reg (unsigned int, bool, bool);
static bool ix86_function_naked (const_tree);
#ifndef CHECK_STACK_LIMIT
#define CHECK_STACK_LIMIT (-1)
......@@ -7929,6 +7930,9 @@ ix86_function_ok_for_sibcall (tree decl, tree exp)
rtx a, b;
bool bind_global = decl && !targetm.binds_local_p (decl);
if (ix86_function_naked (current_function_decl))
return false;
/* Sibling call isn't OK if there are no caller-saved registers
since all registers must be preserved before return. */
if (cfun->machine->no_caller_saved_registers)
2017-08-01 Uros Bizjak <ubizjak@gmail.com>
PR target/81639
* gcc.target/i386/pr81639.c: New test.
2017-08-01 Richard Biener <rguenther@suse.de>
* gcc.dg/tree-ssa/ssa-dce-3.c: Adjust.
......
/* PR target/81639 */
/* { dg-do compile } */
/* { dg-options "-O2" } */
void b (void);
void
__attribute__ ((naked))
a (void)
{
b ();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment