From cb7d9c5f3f77ee4ad4d47e46407532ba8615831f Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Mon, 15 May 2006 12:04:06 +0000 Subject: [PATCH] added context parameter for create_intrinsic_fkt --- ir/be/TEMPLATE/bearch_TEMPLATE.c | 25 +++++++++++++++++++++++++ ir/be/arm/bearch_arm.c | 1 + ir/be/firm/bearch_firm.c | 1 + ir/be/mips/bearch_mips.c | 1 + ir/be/ppc32/bearch_ppc32.c | 1 + 5 files changed, 29 insertions(+) diff --git a/ir/be/TEMPLATE/bearch_TEMPLATE.c b/ir/be/TEMPLATE/bearch_TEMPLATE.c index 83136e0c9..c75080fcf 100644 --- a/ir/be/TEMPLATE/bearch_TEMPLATE.c +++ b/ir/be/TEMPLATE/bearch_TEMPLATE.c @@ -547,6 +547,30 @@ static int TEMPLATE_get_reg_class_alignment(const void *self, const arch_registe return get_mode_size_bytes(mode); } +/** + * Returns the libFirm configuration parameter for this backend. + */ +static const backend_params *TEMPLATE_get_libfirm_params(void) { + static arch_dep_params_t ad = { + 1, /* allow subs */ + 0, /* Muls are fast enough on Firm */ + 31, /* shift would be ok */ + 0, /* no Mulhs */ + 0, /* no Mulhu */ + 0, /* no Mulh */ + }; + static backend_params p = { + NULL, /* no additional opcodes */ + NULL, /* will be set later */ + 0, /* no dword lowering */ + NULL, /* no creator function */ + NULL, /* context for create_intrinsic_fkt */ + }; + + p.dep_param = &ad; + return &p; +} + #ifdef WITH_LIBCORE static void TEMPLATE_register_options(lc_opt_entry_t *ent) { @@ -564,6 +588,7 @@ const arch_isa_if_t TEMPLATE_isa_if = { TEMPLATE_get_code_generator_if, TEMPLATE_get_list_sched_selector, TEMPLATE_get_reg_class_alignment, + TEMPLETE_get_libfirm_params, #ifdef WITH_LIBCORE TEMPLATE_register_options #endif diff --git a/ir/be/arm/bearch_arm.c b/ir/be/arm/bearch_arm.c index c825bbfae..3914f4a8e 100644 --- a/ir/be/arm/bearch_arm.c +++ b/ir/be/arm/bearch_arm.c @@ -1077,6 +1077,7 @@ static const backend_params *arm_get_libfirm_params(void) { NULL, /* will be set later */ 1, /* need dword lowering */ NULL, /* but yet no creator function */ + NULL, /* context for create_intrinsic_fkt */ }; p.dep_param = &ad; diff --git a/ir/be/firm/bearch_firm.c b/ir/be/firm/bearch_firm.c index a61efbfc1..42af2934e 100644 --- a/ir/be/firm/bearch_firm.c +++ b/ir/be/firm/bearch_firm.c @@ -618,6 +618,7 @@ static const backend_params *firm_get_libfirm_params(void) { NULL, /* will be set later */ 0, /* no dword lowering */ NULL, /* no creator function */ + NULL, /* context for create_intrinsic_fkt */ }; p.dep_param = &ad; diff --git a/ir/be/mips/bearch_mips.c b/ir/be/mips/bearch_mips.c index a40fa9924..b41aa3190 100644 --- a/ir/be/mips/bearch_mips.c +++ b/ir/be/mips/bearch_mips.c @@ -935,6 +935,7 @@ static const backend_params *mips_get_libfirm_params(void) { NULL, /* will be set later */ 1, /* need dword lowering */ NULL, /* but yet no creator function */ + NULL, /* context for create_intrinsic_fkt */ }; p.dep_param = &ad; diff --git a/ir/be/ppc32/bearch_ppc32.c b/ir/be/ppc32/bearch_ppc32.c index ec5319ce9..09b527635 100644 --- a/ir/be/ppc32/bearch_ppc32.c +++ b/ir/be/ppc32/bearch_ppc32.c @@ -866,6 +866,7 @@ static const backend_params *ppc32_get_libfirm_params(void) { NULL, /* will be set later */ 1, /* need dword lowering */ NULL, /* but yet no creator function */ + NULL, /* context for create_intrinsic_fkt */ }; p.dep_param = &ad; -- 2.20.1