Mercurial > hg > CbC > CbC_gcc
diff gcc/cbc-goto.h @ 25:2476ed92181e
modified machine description of i386 for support indirect sibcall attributed fastcall.
author | kent <kent@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 27 Oct 2009 16:04:06 +0900 |
parents | 959d4c8c8abc |
children | 3aaf117db171 |
line wrap: on
line diff
--- a/gcc/cbc-goto.h Thu Oct 15 18:47:39 2009 +0900 +++ b/gcc/cbc-goto.h Tue Oct 27 16:04:06 2009 +0900 @@ -218,11 +218,10 @@ once we have started filling any specific hard regs. */ precompute_register_parameters (num_actuals, args, ®_parm_seen); - /* operand[2] is environment. */ - if (TREE_OPERAND (exp, 2)) - static_chain_value = expand_normal (TREE_OPERAND (exp, 2)); + if (CALL_EXPR_STATIC_CHAIN (exp)) + static_chain_value = expand_normal (CALL_EXPR_STATIC_CHAIN (exp)); else - static_chain_value = 0; + static_chain_value = 0; /* parallel assignment */ @@ -315,6 +314,20 @@ emit_indirect_jump (funexp); } #endif + if (GET_CODE (funexp) != SYMBOL_REF) + { + push_temp_slots(); + preserve_temp_slots(funexp); + /* Generate the actual call instruction. */ + emit_call_1 (funexp, exp, fndecl, funtype, unadjusted_args_size, + adjusted_args_size.constant, struct_value_size, + //next_arg_reg, valreg, old_inhibit_defer_pop, call_fusage, + next_arg_reg, valreg, 0, call_fusage, + flags, & args_so_far); + pop_temp_slots(); + } + else + { /* Generate the actual call instruction. */ emit_call_1 (funexp, exp, fndecl, funtype, unadjusted_args_size, @@ -322,6 +335,7 @@ //next_arg_reg, valreg, old_inhibit_defer_pop, call_fusage, next_arg_reg, valreg, 0, call_fusage, flags, & args_so_far); + } /* If a non-BLKmode value is returned at the most significant end of a register, shift the register right by the appropriate amount