5 * @brief Lower Double word operations, ie Mode L -> I
10 #ifndef _FIRM_LOWER_DW_H
11 #define _FIRM_LOWER_DW_H
13 #include "firm_types.h"
16 * A callback type for creating an intrinsic entity for a given opcode.
18 * @param method the method type of the emulation function entity
19 * @param op the emulated ir_op
20 * @param imode the input mode of the emulated opcode
21 * @param omode the output mode of the emulated opcode
22 * @param context the context parameter
24 typedef entity *(create_intrinsic_fkt)(ir_type *method, const ir_op *op,
25 const ir_mode *imode, const ir_mode *omode,
29 * The lowering parameter description.
31 typedef struct _lwrdw_param_t {
32 int enable; /**< if true lowering is enabled */
33 int little_endian; /**< if true should be lowered for little endian, else big endian */
34 ir_mode *high_signed; /**< the double word signed mode to be lowered, typically Ls */
35 ir_mode *high_unsigned; /**< the double word unsigned mode to be lowered, typically Lu */
36 ir_mode *low_signed; /**< the word signed mode to be used, typically Is */
37 ir_mode *low_unsigned; /**< the word unsigned mode to be used, typically Iu */
39 /** callback that creates the intrinsic entity */
40 create_intrinsic_fkt *create_intrinsic;
41 void *ctx; /**< context parameter for the creator function */
45 * Lower all double word operations.
47 void lower_dw_ops(const lwrdw_param_t *param);
50 * Default implementation. Context is unused.
52 entity *def_create_intrinsic_fkt(ir_type *method, const ir_op *op,
53 const ir_mode *imode, const ir_mode *omode,
56 #endif /* _FIRM_LOWER_DW_H */