mediaop.isa (7620:3d8a23caa1ef) mediaop.isa (7626:bdd926760470)
1/// Copyright (c) 2009 The Regents of The University of Michigan
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met: redistributions of source code must retain the above copyright
7// notice, this list of conditions and the following disclaimer;
8// redistributions in binary form must reproduce the above copyright

--- 35 unchanged lines hidden (view full) ---

44 }
45 return fault;
46 }
47}};
48
49def template MediaOpRegDeclare {{
50 class %(class_name)s : public %(base_class)s
51 {
1/// Copyright (c) 2009 The Regents of The University of Michigan
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met: redistributions of source code must retain the above copyright
7// notice, this list of conditions and the following disclaimer;
8// redistributions in binary form must reproduce the above copyright

--- 35 unchanged lines hidden (view full) ---

44 }
45 return fault;
46 }
47}};
48
49def template MediaOpRegDeclare {{
50 class %(class_name)s : public %(base_class)s
51 {
52 protected:
53 void buildMe();
54
55 public:
56 %(class_name)s(ExtMachInst _machInst,
57 const char * instMnem, uint64_t setFlags,
58 InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
59 uint8_t _srcSize, uint8_t _destSize, uint16_t _ext);
60
52 public:
53 %(class_name)s(ExtMachInst _machInst,
54 const char * instMnem, uint64_t setFlags,
55 InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
56 uint8_t _srcSize, uint8_t _destSize, uint16_t _ext);
57
61 %(class_name)s(ExtMachInst _machInst,
62 const char * instMnem,
63 InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
64 uint8_t _srcSize, uint8_t _destSize, uint16_t _ext);
65
66 %(BasicExecDeclare)s
67 };
68}};
69
70def template MediaOpImmDeclare {{
71
72 class %(class_name)s : public %(base_class)s
73 {
58 %(BasicExecDeclare)s
59 };
60}};
61
62def template MediaOpImmDeclare {{
63
64 class %(class_name)s : public %(base_class)s
65 {
74 protected:
75 void buildMe();
76
77 public:
78 %(class_name)s(ExtMachInst _machInst,
79 const char * instMnem, uint64_t setFlags,
80 InstRegIndex _src1, uint16_t _imm8, InstRegIndex _dest,
81 uint8_t _srcSize, uint8_t _destSize, uint16_t _ext);
82
66 public:
67 %(class_name)s(ExtMachInst _machInst,
68 const char * instMnem, uint64_t setFlags,
69 InstRegIndex _src1, uint16_t _imm8, InstRegIndex _dest,
70 uint8_t _srcSize, uint8_t _destSize, uint16_t _ext);
71
83 %(class_name)s(ExtMachInst _machInst,
84 const char * instMnem,
85 InstRegIndex _src1, uint16_t _imm8, InstRegIndex _dest,
86 uint8_t _srcSize, uint8_t _destSize, uint16_t _ext);
87
88 %(BasicExecDeclare)s
89 };
90}};
91
92def template MediaOpRegConstructor {{
72 %(BasicExecDeclare)s
73 };
74}};
75
76def template MediaOpRegConstructor {{
93
94 inline void %(class_name)s::buildMe()
95 {
96 %(constructor)s;
97 }
98
99 inline %(class_name)s::%(class_name)s(
77 inline %(class_name)s::%(class_name)s(
100 ExtMachInst machInst, const char * instMnem,
101 InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
102 uint8_t _srcSize, uint8_t _destSize, uint16_t _ext) :
103 %(base_class)s(machInst, "%(mnemonic)s", instMnem, 0,
104 _src1, _src2, _dest, _srcSize, _destSize, _ext,
105 %(op_class)s)
106 {
107 buildMe();
108 }
109
110 inline %(class_name)s::%(class_name)s(
111 ExtMachInst machInst, const char * instMnem, uint64_t setFlags,
112 InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
113 uint8_t _srcSize, uint8_t _destSize, uint16_t _ext) :
114 %(base_class)s(machInst, "%(mnemonic)s", instMnem, setFlags,
115 _src1, _src2, _dest, _srcSize, _destSize, _ext,
116 %(op_class)s)
117 {
78 ExtMachInst machInst, const char * instMnem, uint64_t setFlags,
79 InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
80 uint8_t _srcSize, uint8_t _destSize, uint16_t _ext) :
81 %(base_class)s(machInst, "%(mnemonic)s", instMnem, setFlags,
82 _src1, _src2, _dest, _srcSize, _destSize, _ext,
83 %(op_class)s)
84 {
118 buildMe();
85 %(constructor)s;
119 }
120}};
121
122def template MediaOpImmConstructor {{
86 }
87}};
88
89def template MediaOpImmConstructor {{
123
124 inline void %(class_name)s::buildMe()
125 {
126 %(constructor)s;
127 }
128
129 inline %(class_name)s::%(class_name)s(
90 inline %(class_name)s::%(class_name)s(
130 ExtMachInst machInst, const char * instMnem,
131 InstRegIndex _src1, uint16_t _imm8, InstRegIndex _dest,
132 uint8_t _srcSize, uint8_t _destSize, uint16_t _ext) :
133 %(base_class)s(machInst, "%(mnemonic)s", instMnem, 0,
134 _src1, _imm8, _dest, _srcSize, _destSize, _ext,
135 %(op_class)s)
136 {
137 buildMe();
138 }
139
140 inline %(class_name)s::%(class_name)s(
141 ExtMachInst machInst, const char * instMnem, uint64_t setFlags,
142 InstRegIndex _src1, uint16_t _imm8, InstRegIndex _dest,
143 uint8_t _srcSize, uint8_t _destSize, uint16_t _ext) :
144 %(base_class)s(machInst, "%(mnemonic)s", instMnem, setFlags,
145 _src1, _imm8, _dest, _srcSize, _destSize, _ext,
146 %(op_class)s)
147 {
91 ExtMachInst machInst, const char * instMnem, uint64_t setFlags,
92 InstRegIndex _src1, uint16_t _imm8, InstRegIndex _dest,
93 uint8_t _srcSize, uint8_t _destSize, uint16_t _ext) :
94 %(base_class)s(machInst, "%(mnemonic)s", instMnem, setFlags,
95 _src1, _imm8, _dest, _srcSize, _destSize, _ext,
96 %(op_class)s)
97 {
148 buildMe();
98 %(constructor)s;
149 }
150}};
151
152let {{
153 # Make these empty strings so that concatenating onto
154 # them will always work.
155 header_output = ""
156 decoder_output = ""

--- 1396 unchanged lines hidden ---
99 }
100}};
101
102let {{
103 # Make these empty strings so that concatenating onto
104 # them will always work.
105 header_output = ""
106 decoder_output = ""

--- 1396 unchanged lines hidden ---