ack/mach/proto/mcg/mcgg_generated_header.h
David Given 91e277e046 Predicates work; we now have prefers and requires clauses. Predicates must be
functions. Not convinced that semantic types are actually working --- there are
still problems with earlier statements leaving things in the wrong registers.
2016-10-01 13:56:52 +02:00

32 lines
541 B
C

#include "mcg.h"
#include "mcgg.h"
#define PANIC printf
static int OP_LABEL(struct ir* ir)
{
if (ir->is_root && ir->is_generated)
{
return ir_to_esn(IR_REG, ir->size);
}
return ir_to_esn(ir->opcode, ir->size);
}
#define LEFT_CHILD(p) ((p)->left)
#define RIGHT_CHILD(p) ((p)->right)
#define burm_assert(b, s) assert(b)
extern void burm_panic_cannot_match(struct ir* ir);
static bool burm_predicate_int(struct ir* ir)
{
return ir->goal_no == 3;
}
static bool burm_predicate_float(struct ir* ir)
{
return ir->goal_no == 5;
}