operands.isa revision 2616
1def operand_types {{
2    'sb' : ('signed int', 8),
3    'ub' : ('unsigned int', 8),
4    'sh' : ('signed int', 16),
5    'uh' : ('unsigned int', 16),
6    'sw' : ('signed int', 32),
7    'uw' : ('unsigned int', 32),
8    'sd' : ('signed int', 64),
9    'ud' : ('unsigned int', 64),
10    'sf' : ('float', 32),
11    'df' : ('float', 64),
12    'qf' : ('float', 128)
13}};
14
15def operands {{
16    #General Purpose Integer Reg Operands
17    'Rd': ('IntReg', 'uw', 'RD', 'IsInteger', 1),
18    'Rs': ('IntReg', 'uw', 'RS', 'IsInteger', 2),
19    'Rt': ('IntReg', 'uw', 'RT', 'IsInteger', 3),
20
21    #Operands used for Link or Syscall Insts
22    'R31': ('IntReg', 'uw','31','IsInteger', 4),
23    'R2':  ('IntReg', 'uw','2', 'IsInteger', 5),
24
25    #Special Integer Reg operands
26    'HI':  ('IntReg', 'uw','32', 'IsInteger', 6),
27    'LO':  ('IntReg', 'uw','33', 'IsInteger', 7),
28
29    #Immediate Value operand
30    'IntImm': ('IntReg', 'uw', 'INTIMM', 'IsInteger', 3),
31
32    #Floating Point Reg Operands
33    'Fd': ('FloatReg', 'sf', 'FD', 'IsFloating', 1),
34    'Fs': ('FloatReg', 'sf', 'FS', 'IsFloating', 2),
35    'Ft': ('FloatReg', 'sf', 'FT', 'IsFloating', 3),
36    'Fr': ('FloatReg', 'sf', 'FR', 'IsFloating', 3),
37
38    #Special Floating Point Control Reg Operands
39    'FIR':  ('FloatReg', 'uw', '32', 'IsFloating', 1),
40    'FCCR': ('FloatReg', 'uw', '33', 'IsFloating', 2),
41    'FEXR': ('FloatReg', 'uw', '34', 'IsFloating', 3),
42    'FENR': ('FloatReg', 'uw', '35', 'IsFloating', 3),
43    'FCSR': ('FloatReg', 'uw', '36', 'IsFloating', 3),
44
45     #Operands For Paired Singles FP Operations
46    'Fd1': ('FloatReg', 'sf', 'FD', 'IsFloating', 4),
47    'Fd2': ('FloatReg', 'sf', 'FD+1', 'IsFloating', 4),
48    'Fs1': ('FloatReg', 'sf', 'FS', 'IsFloating', 5),
49    'Fs2': ('FloatReg', 'sf', 'FS+1', 'IsFloating', 5),
50    'Ft1': ('FloatReg', 'sf', 'FT', 'IsFloating', 6),
51    'Ft2': ('FloatReg', 'sf', 'FT+1', 'IsFloating', 6),
52    'Fr1': ('FloatReg', 'sf', 'FR', 'IsFloating', 7),
53    'Fr2': ('FloatReg', 'sf', 'FR+1', 'IsFloating', 7),
54
55    #Memory Operand
56    'Mem': ('Mem', 'uw', None, ('IsMemRef', 'IsLoad', 'IsStore'), 4),
57
58    #Program Counter Operands
59    'NPC': ('NPC', 'uw', None, ( None, None, 'IsControl' ), 4),
60    'NNPC':('NNPC', 'uw', None, ( None, None, 'IsControl' ), 4)
61}};
62