Commit 1a309182 authored by Michael Beck's avatar Michael Beck
Browse files

add the new get_param() function

parent 26011059
......@@ -1353,6 +1353,29 @@ static int ia32_get_reg_class_alignment(const void *self, const arch_register_cl
return bytes;
}
/**
* Returns the libFirm configuration parameter for this backend.
*/
static const backend_params *ia32_get_libfirm_params(void) {
static const arch_dep_params_t ad = {
1, /* also use subs */
4, /* maximum shifts */
31, /* maximum shift amount */
1, /* allow Mulhs */
1, /* allow Mulus */
32 /* Mulh allowed up to 32 bit */
};
static backend_params p = {
NULL, /* no additional opcodes */
NULL, /* will be set later */
1, /* need dword lowering */
ia32_create_intrinsic_fkt,
};
p.dep_param = &ad;
return &p;
}
#ifdef WITH_LIBCORE
/* instruction set architectures. */
......@@ -1455,6 +1478,7 @@ const arch_isa_if_t ia32_isa_if = {
ia32_get_code_generator_if,
ia32_get_list_sched_selector,
ia32_get_reg_class_alignment,
ia32_get_libfirm_params,
#ifdef WITH_LIBCORE
ia32_register_options
#endif
......
......@@ -150,4 +150,24 @@ ir_node *ia32_new_NoReg_gp(ia32_code_gen_t *cg);
*/
ir_node *ia32_new_NoReg_fp(ia32_code_gen_t *cg);
/**
* Maps all intrinsic calls that the backend support
* and map all instructions the backend did not support
* to runtime calls.
*/
void ia32_handle_intrinsics(void);
/**
* Ia32 implementation.
*
* @param method the method type of the emulation function entity
* @param op the emulated ir_op
* @param imode the input mode of the emulated opcode
* @param omode the output mode of the emulated opcode
* @param context the context parameter
*/
entity *ia32_create_intrinsic_fkt(ir_type *method, const ir_op *op,
const ir_mode *imode, const ir_mode *omode,
void *context);
#endif /* _BEARCH_IA32_T_H_ */
......@@ -2,6 +2,7 @@
#include "config.h"
#endif
#include "irgmod.h"
#include "irop.h"
#include "irnode_t.h"
#include "ircons.h"
......@@ -17,7 +18,7 @@ static i_record *intrinsics;
/** An array to cache all entities */
static entity *i_ents[iro_MaxOpcode];
/**
/*
* Maps all intrinsic calls that the backend support
* and map all instructions the backend did not support
* to runtime calls.
......@@ -92,15 +93,7 @@ static int map_Sub(ir_node *call, void *ctx) {
return 1;
}
/**
* Ia32 implementation.
*
* @param method the method type of the emulation function entity
* @param op the emulated ir_op
* @param imode the input mode of the emulated opcode
* @param omode the output mode of the emulated opcode
* @param context the context parameter
*/
/* Ia32 implementation. */
entity *ia32_create_intrinsic_fkt(ir_type *method, const ir_op *op,
const ir_mode *imode, const ir_mode *omode,
void *context)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment