53 lines
446 B
C
53 lines
446 B
C
|
|
#ifndef STRUCT_EXPR
|
|
#define STRUCT_EXPR
|
|
|
|
#include <stdint.h>
|
|
|
|
enum ekind
|
|
{
|
|
ek_unreachable,
|
|
|
|
ek_0,
|
|
ek_1,
|
|
ek_W,
|
|
ek_X,
|
|
ek_Y,
|
|
ek_Z,
|
|
|
|
ek_not,
|
|
ek_or,
|
|
ek_and,
|
|
|
|
ek_orn,
|
|
ek_nor,
|
|
|
|
ek_andn,
|
|
ek_nand,
|
|
|
|
ek_xor,
|
|
ek_nxor,
|
|
|
|
ek_lt,
|
|
ek_lte,
|
|
ek_gt,
|
|
ek_gte,
|
|
|
|
ek_ternary,
|
|
};
|
|
|
|
struct expr
|
|
{
|
|
enum ekind kind;
|
|
|
|
uint16_t cond, left, right;
|
|
|
|
int cost;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|