1 #ifndef _IA32_MAP_REGS_H_
2 #define _IA32_MAP_REGS_H_
8 #include "ia32_nodes_attr.h"
11 * Convenience macro to check if register <code>out<\code>
12 * and register <code>in<\code> are equal.
14 #define REGS_ARE_EQUAL(out, in) \
15 ((arch_register_get_class(out) == arch_register_get_class(in)) && \
16 (arch_register_get_index(out) == arch_register_get_index(in)))
19 * Set compare function
21 int ia32_cmp_irn_reg_assoc(const void *a, const void *b, size_t len);
24 * Assigns a register to a firm node.
26 void ia32_set_firm_reg(ir_node *irn, const arch_register_t *reg, set *reg_set);
29 * Gets the register assigned to a firm node.
31 const arch_register_t *ia32_get_firm_reg(const ir_node *irn, set *reg_set);
34 * Enters for each general purpose register the corresponding 16bit
37 void ia32_build_16bit_reg_map(pmap *reg_map);
40 * Enters for each general purpose register the corresponding 8bit
43 void ia32_build_8bit_reg_map(pmap *reg_map);
46 * Returns the corresponding mapped name for a register.
48 char *ia32_get_mapped_reg_name(pmap *reg_map, const arch_register_t *reg);
51 * Check all parameters and determine the maximum number of parameters
52 * to pass in gp regs resp. in fp regs.
54 * @param n The number of parameters
55 * @param modes The list of the parameter modes
56 * @param n_int Holds the number of int parameters to be passed in regs after the call
57 * @param n_float Holds the number of float parameters to be passed in regs after the call
58 * @return The number of the last parameter to be passed in register
60 int ia32_get_n_regparam_class(int n, ir_mode **modes, int *n_int, int *n_float);
63 * Returns the register for parameter nr.
65 * @param n The number of parameters
66 * @param modes The list of the parameter modes
67 * @param nr The number of the parameter to return the requirements for
68 * @param cc The calling convention
69 * @return The register
71 const arch_register_t *ia32_get_RegParam_reg(int n, ir_mode **modes, long nr, unsigned cc);
74 * Translates the projnum into a "real" argument position for register
75 * requirements dependent on the predecessor.
77 long ia32_translate_proj_pos(const ir_node *proj);
79 #endif /* _IA32_MAP_REGS_H_ */