/*
- * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
#include "ia32_map_regs.h"
#include "ia32_new_nodes.h"
+#include "ia32_architecture.h"
#include "gen_ia32_regalloc_if.h"
#include "bearch_ia32_t.h"
-#include "../benodesets.h"
#define MAXNUM_GPREG_ARGS 3
#define MAXNUM_SSE_ARGS 5
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;
+ (void) len;
return x->irn != y->irn;
}
templ.irn = irn;
templ.reg = NULL;
- hash = nodeset_hash(irn);
+ hash = hash_irn(irn);
return set_insert(reg_set, &templ, sizeof(templ), hash);
}
/**
* Returns the register for parameter nr.
*/
-const arch_register_t *ia32_get_RegParam_reg(ia32_code_gen_t *cg, unsigned cc,
- size_t nr, const ir_mode *mode)
+const arch_register_t *ia32_get_RegParam_reg(unsigned cc, size_t nr,
+ const ir_mode *mode)
{
if(! (cc & cc_reg_param))
return NULL;
if(mode_is_float(mode)) {
- if(!USE_SSE2(cg))
+ if(!ia32_cg_config.use_sse2)
return NULL;
if(nr >= MAXNUM_SSE_ARGS)
return NULL;
}
return fpreg_sse_param_reg_std[nr];
} else if(mode_is_int(mode) || mode_is_reference(mode)) {
+ if(get_mode_size_bits(mode) > 32)
+ return NULL;
+
if(nr >= MAXNUM_GPREG_ARGS)
return NULL;