# HG changeset patch # User Nobuyasu Oshiro # Date 1323884233 -32400 # Node ID 12b3180c7d0707ed54e2aea8b76611eb0e2d0e77 # Parent 32380d8cb035210901447e226bb669fe9ebfb617 modify calls.c. diff -r 32380d8cb035 -r 12b3180c7d07 gcc/c-parser.c --- a/gcc/c-parser.c Sun Nov 13 16:24:42 2011 +0900 +++ b/gcc/c-parser.c Thu Dec 15 02:37:13 2011 +0900 @@ -6741,7 +6741,10 @@ tree decl_cond = build_decl (location, VAR_DECL, get_identifier ("retval"), TREE_TYPE (TREE_TYPE (current_function_decl))); + /* use thread-local */ + // DECL_TLS_MODEL (decl_cond) = decl_default_tls_model (decl_cond); TREE_STATIC (decl_cond) = 1; + DECL_ARTIFICIAL (decl_cond) = 1; pushdecl (decl_cond); diff -r 32380d8cb035 -r 12b3180c7d07 gcc/calls.c --- a/gcc/calls.c Sun Nov 13 16:24:42 2011 +0900 +++ b/gcc/calls.c Thu Dec 15 02:37:13 2011 +0900 @@ -2335,12 +2335,7 @@ #endif /* Check whether the target is able to optimize the call into a sibcall. */ -#ifndef noCbC - || (!targetm.function_ok_for_sibcall (fndecl, exp) - && (!fndecl || !CbC_IS_CODE_SEGMENT (TREE_TYPE (fndecl)))) -#else || !targetm.function_ok_for_sibcall (fndecl, exp) -#endif /* Functions that do not return exactly once may not be sibcall optimized. */ || (flags & (ECF_RETURNS_TWICE | ECF_NORETURN)) @@ -2353,14 +2348,8 @@ function, we cannot change it into a sibling call. crtl->args.pretend_args_size is not part of the stack allocated by our caller. */ -#ifndef noCbC - || (args_size.constant > (crtl->args.size - - crtl->args.pretend_args_size) - && (!fndecl || !CbC_IS_CODE_SEGMENT (TREE_TYPE (fndecl)))) -#else || args_size.constant > (crtl->args.size - crtl->args.pretend_args_size) -#endif /* If the callee pops its own arguments, then it must pop exactly the same number of arguments as the current function. */ || (targetm.calls.return_pops_args (fndecl, funtype, args_size.constant) diff -r 32380d8cb035 -r 12b3180c7d07 gcc/calls.c~ --- a/gcc/calls.c~ Sun Nov 13 16:24:42 2011 +0900 +++ b/gcc/calls.c~ Thu Dec 15 02:37:13 2011 +0900 @@ -2353,8 +2353,14 @@ function, we cannot change it into a sibling call. crtl->args.pretend_args_size is not part of the stack allocated by our caller. */ +#ifndef noCbC + || (args_size.constant > (crtl->args.size + - crtl->args.pretend_args_size) + && (!fndecl || !CbC_IS_CODE_SEGMENT (TREE_TYPE (fndecl)))) +#else || args_size.constant > (crtl->args.size - crtl->args.pretend_args_size) +#endif /* If the callee pops its own arguments, then it must pop exactly the same number of arguments as the current function. */ || (targetm.calls.return_pops_args (fndecl, funtype, args_size.constant)