From ca78ecf41b07749728154abb7ec5fcd4bc3185d8 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Wed, 7 Nov 2012 20:35:25 +0100 Subject: [PATCH] re PR target/55224 (FAIL: gcc.target/i386/tailcall-1.c scan-assembler jmp) PR target/55224 * config/i386/i386.c (ix86_function_ok_for_sibcall): Put back exception to make a sibcall if one of the functions has void return type. From-SVN: r193306 --- gcc/config/i386/i386.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 2386017..ec33622 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -65,22 +65,6 @@ along with GCC; see the file COPYING3. If not see #include "tree-pass.h" #include "tree-flow.h" -/* Check if a 256bit AVX register is referenced in stores. */ - -static void -check_avx256_stores (rtx dest, const_rtx set, void *data) -{ - if (((REG_P (dest) || MEM_P (dest)) - && VALID_AVX256_REG_OR_OI_MODE (GET_MODE (dest))) - || (GET_CODE (set) == SET - && (REG_P (SET_SRC (set)) || MEM_P (SET_SRC (set))) - && VALID_AVX256_REG_OR_OI_MODE (GET_MODE (SET_SRC (set))))) - { - bool *used = (bool *) data; - *used = true; - } -} - static rtx legitimize_dllimport_symbol (rtx, bool); #ifndef CHECK_STACK_LIMIT @@ -4638,6 +4622,8 @@ ix86_function_ok_for_sibcall (tree decl, tree exp) if (!rtx_equal_p (a, b)) return false; } + else if (VOID_TYPE_P (TREE_TYPE (DECL_RESULT (cfun->decl)))) + ; else if (!rtx_equal_p (a, b)) return false; @@ -14954,6 +14940,22 @@ output_387_binary_op (rtx insn, rtx *operands) return buf; } +/* Check if a 256bit AVX register is referenced in stores. */ + +static void +check_avx256_stores (rtx dest, const_rtx set, void *data) +{ + if (((REG_P (dest) || MEM_P (dest)) + && VALID_AVX256_REG_OR_OI_MODE (GET_MODE (dest))) + || (GET_CODE (set) == SET + && (REG_P (SET_SRC (set)) || MEM_P (SET_SRC (set))) + && VALID_AVX256_REG_OR_OI_MODE (GET_MODE (SET_SRC (set))))) + { + bool *used = (bool *) data; + *used = true; + } +} + /* Return needed mode for entity in optimize_mode_switching pass. */ static int -- 2.7.4