Initial revision
[libfirm] / ir / ir / irop.h
1 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
2 ** All rights reserved.
3 **
4 ** Authors: Christian Schaefer
5 **
6 */
7
8 # ifndef _IROP_H_
9 # define _IROP_H_
10
11 # include "ident.h"
12 # include "type.h"
13
14 typedef enum {
15   iro_Block,
16   iro_Start, iro_End, iro_Jmp, iro_Cond, iro_Return, iro_Raise,
17   iro_Const, iro_SymConst,
18   iro_Sel,
19   iro_Call, iro_Add, iro_Sub, iro_Minus, iro_Mul, iro_Quot, iro_DivMod,
20   iro_Div, iro_Mod, iro_Abs, iro_And, iro_Or, iro_Eor, iro_Not,
21   iro_Cmp, iro_Shl, iro_Shr, iro_Shrs, iro_Rot, iro_Conv,
22   iro_Phi,
23   iro_Load, iro_Store, iro_Alloc, iro_Free, iro_Sync,
24   iro_Proj, iro_Tuple, iro_Id, iro_Bad
25 } opcode;
26
27 typedef struct {
28   opcode code;
29   ident *name;
30   size_t attr_size;
31   int labeled;
32 } ir_op;
33
34 extern ir_op *op_Block;
35
36 extern ir_op *op_Start;
37 extern ir_op *op_End;
38 extern ir_op *op_Jmp;
39 extern ir_op *op_Cond;
40 extern ir_op *op_Return;
41 extern ir_op *op_Raise;
42
43 extern ir_op *op_Sel;
44
45 extern ir_op *op_Const;
46 extern ir_op *op_SymConst;
47
48 extern ir_op *op_Call;
49 extern ir_op *op_Add;
50 extern ir_op *op_Sub;
51 extern ir_op *op_Minus;
52 extern ir_op *op_Mul;
53 extern ir_op *op_Quot;
54 extern ir_op *op_DivMod;
55 extern ir_op *op_Div;
56 extern ir_op *op_Mod;
57 extern ir_op *op_Abs;
58 extern ir_op *op_And;
59 extern ir_op *op_Or;
60 extern ir_op *op_Eor;
61 extern ir_op *op_Not;
62 extern ir_op *op_Cmp;
63 extern ir_op *op_Shl;
64 extern ir_op *op_Shr;
65 extern ir_op *op_Shrs;
66 extern ir_op *op_Rot;
67 extern ir_op *op_Conv;
68
69 extern ir_op *op_Phi;
70
71 extern ir_op *op_Load;
72 extern ir_op *op_Store;
73 extern ir_op *op_Alloc;
74 extern ir_op *op_Free;
75
76 extern ir_op *op_Sync;
77
78 extern ir_op *op_Tuple;
79 extern ir_op *op_Proj;
80 extern ir_op *op_Id;
81 extern ir_op *op_Bad;
82
83 /* create a new ir operation */
84 ir_op * new_ir_op (opcode code, ident *name, size_t attr_size, int labeled);
85 void init_op (void);
86
87 # endif /* _IROP_H_ */