From b1b2bef4c9c41fb88a3dc5c0346c837dfb23960b Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Mon, 18 Jun 2007 19:20:06 +0000 Subject: [PATCH] use the new mtp_property_private flag to switch calling conventions [r14634] --- ir/be/ia32/bearch_ia32.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ir/be/ia32/bearch_ia32.c b/ir/be/ia32/bearch_ia32.c index d5f773de3..45009e803 100644 --- a/ir/be/ia32/bearch_ia32.c +++ b/ir/be/ia32/bearch_ia32.c @@ -1590,9 +1590,8 @@ static void ia32_get_call_abi(const void *self, ir_type *method_type, be_abi_cal const ia32_isa_t *isa = self; ir_type *tp; ir_mode *mode; - unsigned cc = get_method_calling_convention(method_type); - int n = get_method_n_params(method_type); - int i, regnum; + unsigned cc; + int n, i, regnum; be_abi_call_flags_t call_flags = be_abi_call_get_flags(abi); unsigned use_push = !IS_P6_ARCH(isa->opt_arch); @@ -1607,6 +1606,12 @@ static void ia32_get_call_abi(const void *self, ir_type *method_type, be_abi_cal /* set parameter passing style */ be_abi_call_set_flags(abi, call_flags, &ia32_abi_callbacks); + cc = get_method_calling_convention(method_type); + if (get_method_additional_properties(method_type) & mtp_property_private) { + /* set the calling conventions to register parameter */ + cc = (cc & ~cc_bits) | cc_reg_param; + } + n = get_method_n_params(method_type); for (i = regnum = 0; i < n; i++) { const ir_mode *mode; const arch_register_t *reg = NULL; -- 2.20.1