2016-10-05 19:00:28 +00:00
|
|
|
#ifndef REG_H
|
|
|
|
#define REG_H
|
|
|
|
|
|
|
|
#define WITH_ATTR(a) (1<<(a))
|
|
|
|
|
2016-10-09 20:04:20 +00:00
|
|
|
struct phicongruence
|
|
|
|
{
|
|
|
|
int id;
|
|
|
|
ARRAYOF(struct vreg) vregs;
|
|
|
|
ARRAYOF(struct hop) definitions;
|
|
|
|
uint32_t attrs;
|
|
|
|
};
|
|
|
|
|
2016-10-05 19:00:28 +00:00
|
|
|
struct hreg
|
|
|
|
{
|
|
|
|
const char* name;
|
2016-10-12 20:58:46 +00:00
|
|
|
uint32_t type;
|
2016-10-05 19:00:28 +00:00
|
|
|
uint32_t attrs;
|
|
|
|
bool is_stacked;
|
|
|
|
int offset;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct vreg
|
|
|
|
{
|
|
|
|
int id;
|
2016-10-09 20:04:20 +00:00
|
|
|
struct phicongruence* congruence;
|
2016-10-07 22:21:23 +00:00
|
|
|
struct hop* defined;
|
|
|
|
ARRAYOF(struct hop) used;
|
2016-10-05 19:00:28 +00:00
|
|
|
};
|
|
|
|
|
2016-10-08 21:32:54 +00:00
|
|
|
typedef PMAPOF(struct hreg, struct vreg) register_assignment_t;
|
|
|
|
|
2016-10-05 19:00:28 +00:00
|
|
|
extern struct vreg* new_vreg(void);
|
|
|
|
|
2016-10-08 21:32:54 +00:00
|
|
|
extern struct hreg* new_hreg(const struct burm_register_data* brd);
|
2016-10-05 19:00:28 +00:00
|
|
|
extern struct hreg* new_stacked_hreg(int offset, uint32_t attrs);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* vim: set sw=4 ts=4 expandtab : */
|