-
-static int maxnum_gpreg_args = 3; /* maximum number of int arguments passed in registers; default 3 */
-static int maxnum_fpreg_args = 5; /* maximum number of float arguments passed in registers; default 5 */
-
-/* this is the order of the assigned registers usesd for parameter passing */
-
-const arch_register_t *gpreg_param_reg_std[] = {
- &ia32_gp_regs[REG_EAX],
- &ia32_gp_regs[REG_EDX],
- &ia32_gp_regs[REG_ECX],
- &ia32_gp_regs[REG_EBX],
- &ia32_gp_regs[REG_EDI],
- &ia32_gp_regs[REG_ESI]
-};
-
-const arch_register_t *gpreg_param_reg_this[] = {
- &ia32_gp_regs[REG_ECX],
- &ia32_gp_regs[REG_EAX],
- &ia32_gp_regs[REG_EDX],
- &ia32_gp_regs[REG_EBX],
- &ia32_gp_regs[REG_EDI],
- &ia32_gp_regs[REG_ESI]
-};
-
-const arch_register_t *fpreg_param_reg_std[] = {
- &ia32_fp_regs[REG_XMM0],
- &ia32_fp_regs[REG_XMM1],
- &ia32_fp_regs[REG_XMM2],
- &ia32_fp_regs[REG_XMM3],
- &ia32_fp_regs[REG_XMM4],
- &ia32_fp_regs[REG_XMM5],
- &ia32_fp_regs[REG_XMM6],
- &ia32_fp_regs[REG_XMM7]
-};
-
-const arch_register_t *fpreg_param_reg_this[] = {
- NULL, /* in case of a "this" pointer, the first parameter must not be a float */
- &ia32_fp_regs[REG_XMM0],
- &ia32_fp_regs[REG_XMM1],
- &ia32_fp_regs[REG_XMM2],
- &ia32_fp_regs[REG_XMM3],
- &ia32_fp_regs[REG_XMM4],
- &ia32_fp_regs[REG_XMM5],
- &ia32_fp_regs[REG_XMM6],
- &ia32_fp_regs[REG_XMM7]
-};
-
-
-
-/* Mapping to store registers in firm nodes */
-
-struct ia32_irn_reg_assoc {
- const ir_node *irn;
- const arch_register_t *reg;
-};
-
-int ia32_cmp_irn_reg_assoc(const void *a, const void *b, size_t len) {
- const struct ia32_irn_reg_assoc *x = a;
- const struct ia32_irn_reg_assoc *y = b;
-
- return x->irn != y->irn;
-}
-
-static struct ia32_irn_reg_assoc *get_irn_reg_assoc(const ir_node *irn, set *reg_set) {
- struct ia32_irn_reg_assoc templ;
- unsigned int hash;
-
- templ.irn = irn;
- templ.reg = NULL;
- hash = HASH_PTR(irn);
-
- return set_insert(reg_set, &templ, sizeof(templ), hash);
+#include "bearch_ia32_t.h"
+
+/* this is the order of the assigned registers used for parameter passing */
+
+
+void ia32_build_16bit_reg_map(const char *reg_map[])
+{
+ memset(reg_map, 0, sizeof(reg_map[0]) * N_ia32_gp_REGS);
+ reg_map[REG_GP_EAX] = "ax";
+ reg_map[REG_GP_EBX] = "bx";
+ reg_map[REG_GP_ECX] = "cx";
+ reg_map[REG_GP_EDX] = "dx";
+ reg_map[REG_GP_ESI] = "si";
+ reg_map[REG_GP_EDI] = "di";
+ reg_map[REG_GP_EBP] = "bp";
+ reg_map[REG_GP_ESP] = "sp";