ack/mach/proto/mcg/reg.h
David Given f06b51c981 Keep track of register types as well as attributes --- the type being how we
find new registers when evicting values. Input constraints work (they were
being ignored before). Various bug fixing so they actually work.
2016-10-12 22:58:46 +02:00

41 lines
694 B
C

#ifndef REG_H
#define REG_H
#define WITH_ATTR(a) (1<<(a))
struct phicongruence
{
int id;
ARRAYOF(struct vreg) vregs;
ARRAYOF(struct hop) definitions;
uint32_t attrs;
};
struct hreg
{
const char* name;
uint32_t type;
uint32_t attrs;
bool is_stacked;
int offset;
};
struct vreg
{
int id;
struct phicongruence* congruence;
struct hop* defined;
ARRAYOF(struct hop) used;
};
typedef PMAPOF(struct hreg, struct vreg) register_assignment_t;
extern struct vreg* new_vreg(void);
extern struct hreg* new_hreg(const struct burm_register_data* brd);
extern struct hreg* new_stacked_hreg(int offset, uint32_t attrs);
#endif
/* vim: set sw=4 ts=4 expandtab : */