7 #define OPCODE(OP,NG,SW,SG,TF,N,FL) OP_##OP,
8 #define OPCODE_RANGE(OP,S,E) OP_##OP = OP_##S, OP_##OP##_END = OP_##E,
12 OP_LAST
, /* keep this one last! */
15 extern const struct opcode_table
{
24 #define OPF_TARGET (1 << 0)
25 #define OPF_COMMU (1 << 1)
26 #define OPF_ASSOC (1 << 2)
27 #define OPF_UNOP (1 << 3)
28 #define OPF_BINOP (1 << 4)
29 #define OPF_COMPARE (1 << 5)
30 #define OPF_SIGNED (1 << 6)
31 #define OPF_UNSIGNED (1 << 7)
35 static inline int opcode_negate(int opcode
)
37 return opcode_table
[opcode
].negate
;
40 static inline int opcode_swap(int opcode
)
42 return opcode_table
[opcode
].swap
;
45 static inline int opcode_float(int opcode
, struct symbol
*type
)
47 if (!type
|| !is_float_type(type
))
49 return opcode_table
[opcode
].to_float
;