- added comment support the postfix transform2() expression
[imager.git] / lib / Imager / Regops.pm
CommitLineData
84324192
AMH
1# AUTOMATICALLY GENERATED BY regops.perl
2package Imager::Regops;
3use strict;
4require Exporter;
5use vars qw(@ISA @EXPORT @EXPORT_OK %Attr $MaxOperands $PackCode);
6@ISA = qw(Exporter);
7@EXPORT_OK = qw(%Attr $MaxOperands $PackCode);
8
9use constant RBC_ADD => 0;
10use constant RBC_SUBTRACT => 1;
11use constant RBC_MULT => 2;
12use constant RBC_DIV => 3;
13use constant RBC_MOD => 4;
14use constant RBC_POW => 5;
15use constant RBC_UMINUS => 6;
16use constant RBC_MULTP => 7;
17use constant RBC_ADDP => 8;
18use constant RBC_SUBTRACTP => 9;
19use constant RBC_SIN => 10;
20use constant RBC_COS => 11;
21use constant RBC_ATAN2 => 12;
22use constant RBC_SQRT => 13;
23use constant RBC_DISTANCE => 14;
24use constant RBC_GETP1 => 15;
25use constant RBC_GETP2 => 16;
26use constant RBC_GETP3 => 17;
27use constant RBC_VALUE => 18;
28use constant RBC_HUE => 19;
29use constant RBC_SAT => 20;
30use constant RBC_HSV => 21;
31use constant RBC_RED => 22;
32use constant RBC_GREEN => 23;
33use constant RBC_BLUE => 24;
34use constant RBC_RGB => 25;
35use constant RBC_INT => 26;
36use constant RBC_IF => 27;
37use constant RBC_IFP => 28;
38use constant RBC_LE => 29;
39use constant RBC_LT => 30;
40use constant RBC_GE => 31;
41use constant RBC_GT => 32;
42use constant RBC_EQ => 33;
43use constant RBC_NE => 34;
44use constant RBC_AND => 35;
45use constant RBC_OR => 36;
46use constant RBC_NOT => 37;
47use constant RBC_ABS => 38;
48use constant RBC_RET => 39;
49use constant RBC_JUMP => 40;
50use constant RBC_JUMPZ => 41;
51use constant RBC_JUMPNZ => 42;
52use constant RBC_SET => 43;
53use constant RBC_SETP => 44;
54use constant RBC_PRINT => 45;
e5744e01
TC
55use constant RBC_RGBA => 46;
56use constant RBC_HSVA => 47;
57use constant RBC_ALPHA => 48;
58use constant RBC_OP_COUNT => 49;
84324192 59
e5744e01 60@EXPORT = qw(RBC_ADD RBC_SUBTRACT RBC_MULT RBC_DIV RBC_MOD RBC_POW RBC_UMINUS RBC_MULTP RBC_ADDP RBC_SUBTRACTP RBC_SIN RBC_COS RBC_ATAN2 RBC_SQRT RBC_DISTANCE RBC_GETP1 RBC_GETP2 RBC_GETP3 RBC_VALUE RBC_HUE RBC_SAT RBC_HSV RBC_RED RBC_GREEN RBC_BLUE RBC_RGB RBC_INT RBC_IF RBC_IFP RBC_LE RBC_LT RBC_GE RBC_GT RBC_EQ RBC_NE RBC_AND RBC_OR RBC_NOT RBC_ABS RBC_RET RBC_JUMP RBC_JUMPZ RBC_JUMPNZ RBC_SET RBC_SETP RBC_PRINT RBC_RGBA RBC_HSVA RBC_ALPHA RBC_OP_COUNT);
84324192
AMH
61
62%Attr = (
e5744e01
TC
63 'setp' => {
64 'result' => 'p',
b4e32feb 65 'parms' => 1,
e5744e01
TC
66 'opcode' => 44,
67 'func' => 0,
68 'types' => 'p'
b4e32feb 69 },
e5744e01
TC
70 'green' => {
71 'result' => 'r',
72 'parms' => 1,
73 'opcode' => 23,
74 'func' => 1,
75 'types' => 'p'
76 },
77 'abs' => {
78 'result' => 'r',
b4e32feb 79 'parms' => 1,
e5744e01 80 'opcode' => 38,
b4e32feb 81 'func' => 1,
e5744e01 82 'types' => 'r'
b4e32feb
AMH
83 },
84 'le' => {
e5744e01 85 'result' => 'r',
b4e32feb 86 'parms' => 2,
e5744e01
TC
87 'opcode' => 29,
88 'func' => 0,
89 'types' => 'rr'
b4e32feb 90 },
e5744e01
TC
91 'cos' => {
92 'result' => 'r',
93 'parms' => 1,
94 'opcode' => 11,
95 'func' => 1,
96 'types' => 'r'
97 },
98 'not' => {
99 'result' => 'r',
100 'parms' => 1,
101 'opcode' => 37,
102 'func' => 0,
103 'types' => 'r'
104 },
b4e32feb 105 'ne' => {
e5744e01
TC
106 'result' => 'r',
107 'parms' => 2,
b4e32feb 108 'opcode' => 34,
e5744e01
TC
109 'func' => 0,
110 'types' => 'rr'
111 },
112 'blue' => {
113 'result' => 'r',
114 'parms' => 1,
115 'opcode' => 24,
116 'func' => 1,
117 'types' => 'p'
118 },
119 'and' => {
120 'result' => 'r',
121 'parms' => 2,
122 'opcode' => 35,
123 'func' => 0,
124 'types' => 'rr'
125 },
126 'mult' => {
127 'result' => 'r',
128 'parms' => 2,
129 'opcode' => 2,
130 'func' => 0,
131 'types' => 'rr'
132 },
133 'rgba' => {
134 'result' => 'p',
135 'parms' => 4,
136 'opcode' => 46,
137 'func' => 1,
138 'types' => 'rrrr'
139 },
140 'pow' => {
141 'result' => 'r',
142 'parms' => 2,
143 'opcode' => 5,
144 'func' => 0,
145 'types' => 'rr'
146 },
147 'lt' => {
148 'result' => 'r',
b4e32feb 149 'parms' => 2,
e5744e01
TC
150 'opcode' => 30,
151 'func' => 0,
152 'types' => 'rr'
b4e32feb 153 },
e5744e01
TC
154 'mod' => {
155 'result' => 'r',
156 'parms' => 2,
157 'opcode' => 4,
158 'func' => 0,
159 'types' => 'rr'
160 },
161 'getp1' => {
162 'result' => 'p',
163 'parms' => 2,
164 'opcode' => 15,
165 'func' => 1,
166 'types' => 'rr'
b4e32feb
AMH
167 },
168 'atan2' => {
e5744e01
TC
169 'result' => 'r',
170 'parms' => 2,
b4e32feb 171 'opcode' => 12,
e5744e01
TC
172 'func' => 1,
173 'types' => 'rr'
174 },
175 'getp2' => {
176 'result' => 'p',
177 'parms' => 2,
178 'opcode' => 16,
179 'func' => 1,
180 'types' => 'rr'
181 },
182 'getp3' => {
183 'result' => 'p',
b4e32feb 184 'parms' => 2,
e5744e01
TC
185 'opcode' => 17,
186 'func' => 1,
187 'types' => 'rr'
188 },
189 'value' => {
190 'result' => 'r',
191 'parms' => 1,
192 'opcode' => 18,
84324192 193 'func' => 1,
e5744e01 194 'types' => 'p'
84324192
AMH
195 },
196 'subtractp' => {
e5744e01 197 'result' => 'p',
b4e32feb 198 'parms' => 2,
e5744e01
TC
199 'opcode' => 9,
200 'func' => 0,
201 'types' => 'pp'
84324192 202 },
e5744e01
TC
203 'ge' => {
204 'result' => 'r',
205 'parms' => 2,
206 'opcode' => 31,
207 'func' => 0,
208 'types' => 'rr'
209 },
210 'sat' => {
211 'result' => 'r',
84324192 212 'parms' => 1,
e5744e01 213 'opcode' => 20,
84324192 214 'func' => 1,
e5744e01 215 'types' => 'p'
84324192
AMH
216 },
217 'jump' => {
e5744e01
TC
218 'result' => undef,
219 'parms' => 0,
84324192 220 'opcode' => 40,
e5744e01
TC
221 'func' => 0,
222 'types' => ''
84324192 223 },
e5744e01
TC
224 'if' => {
225 'result' => 'r',
226 'parms' => 3,
227 'opcode' => 27,
228 'func' => 1,
229 'types' => 'rrr'
84324192
AMH
230 },
231 'div' => {
e5744e01 232 'result' => 'r',
b4e32feb 233 'parms' => 2,
e5744e01
TC
234 'opcode' => 3,
235 'func' => 0,
236 'types' => 'rr'
84324192 237 },
e5744e01
TC
238 'ifp' => {
239 'result' => 'p',
240 'parms' => 3,
241 'opcode' => 28,
84324192 242 'func' => 1,
e5744e01 243 'types' => 'rpp'
84324192 244 },
e5744e01
TC
245 'set' => {
246 'result' => 'r',
84324192 247 'parms' => 1,
e5744e01
TC
248 'opcode' => 43,
249 'func' => 0,
250 'types' => 'r'
84324192 251 },
e5744e01
TC
252 'eq' => {
253 'result' => 'r',
254 'parms' => 2,
255 'opcode' => 33,
256 'func' => 0,
257 'types' => 'rr'
258 },
259 'multp' => {
260 'result' => 'p',
261 'parms' => 2,
262 'opcode' => 7,
263 'func' => 0,
264 'types' => 'pr'
265 },
84324192 266 'sin' => {
e5744e01 267 'result' => 'r',
b4e32feb 268 'parms' => 1,
e5744e01 269 'opcode' => 10,
84324192 270 'func' => 1,
e5744e01 271 'types' => 'r'
84324192
AMH
272 },
273 'sqrt' => {
e5744e01 274 'result' => 'r',
b4e32feb 275 'parms' => 1,
e5744e01 276 'opcode' => 13,
84324192 277 'func' => 1,
e5744e01 278 'types' => 'r'
84324192 279 },
e5744e01
TC
280 'alpha' => {
281 'result' => 'r',
282 'parms' => 1,
283 'opcode' => 48,
284 'func' => 1,
285 'types' => 'p'
286 },
84324192 287 'distance' => {
e5744e01 288 'result' => 'r',
b4e32feb 289 'parms' => 4,
e5744e01 290 'opcode' => 14,
84324192 291 'func' => 1,
e5744e01 292 'types' => 'rrrr'
84324192 293 },
e5744e01
TC
294 'gt' => {
295 'result' => 'r',
84324192 296 'parms' => 2,
e5744e01
TC
297 'opcode' => 32,
298 'func' => 0,
299 'types' => 'rr'
b4e32feb 300 },
e5744e01
TC
301 'red' => {
302 'result' => 'r',
84324192 303 'parms' => 1,
e5744e01
TC
304 'opcode' => 22,
305 'func' => 1,
306 'types' => 'p'
84324192 307 },
e5744e01
TC
308 'rgb' => {
309 'result' => 'p',
84324192 310 'parms' => 3,
e5744e01 311 'opcode' => 25,
84324192 312 'func' => 1,
e5744e01 313 'types' => 'rrr'
84324192 314 },
e5744e01
TC
315 'hue' => {
316 'result' => 'r',
317 'parms' => 1,
318 'opcode' => 19,
319 'func' => 1,
320 'types' => 'p'
321 },
322 'hsva' => {
323 'result' => 'p',
324 'parms' => 4,
325 'opcode' => 47,
326 'func' => 1,
327 'types' => 'rrrr'
328 },
329 'print' => {
330 'result' => undef,
84324192 331 'parms' => 1,
e5744e01
TC
332 'opcode' => 45,
333 'func' => 0,
334 'types' => 'r'
84324192 335 },
e5744e01
TC
336 'jumpnz' => {
337 'result' => undef,
338 'parms' => 1,
339 'opcode' => 42,
340 'func' => 0,
341 'types' => 'r'
342 },
343 'addp' => {
344 'result' => 'p',
345 'parms' => 2,
346 'opcode' => 8,
347 'func' => 0,
348 'types' => 'pp'
349 },
350 'int' => {
351 'result' => 'r',
84324192 352 'parms' => 1,
e5744e01 353 'opcode' => 26,
84324192 354 'func' => 1,
e5744e01 355 'types' => 'r'
84324192 356 },
e5744e01
TC
357 'op_count' => {
358 'result' => undef,
359 'parms' => 0,
360 'opcode' => 49,
361 'func' => 0,
362 'types' => ''
363 },
364 'or' => {
365 'result' => 'r',
84324192 366 'parms' => 2,
e5744e01
TC
367 'opcode' => 36,
368 'func' => 0,
369 'types' => 'rr'
84324192 370 },
e5744e01
TC
371 'jumpz' => {
372 'result' => undef,
373 'parms' => 1,
374 'opcode' => 41,
375 'func' => 0,
376 'types' => 'r'
377 },
378 'add' => {
379 'result' => 'r',
84324192 380 'parms' => 2,
e5744e01
TC
381 'opcode' => 0,
382 'func' => 0,
383 'types' => 'rr'
84324192 384 },
e5744e01
TC
385 'subtract' => {
386 'result' => 'r',
387 'parms' => 2,
388 'opcode' => 1,
389 'func' => 0,
390 'types' => 'rr'
391 },
392 'ret' => {
393 'result' => undef,
394 'parms' => 1,
395 'opcode' => 39,
396 'func' => 0,
397 'types' => 'p'
398 },
399 'hsv' => {
400 'result' => 'p',
84324192 401 'parms' => 3,
e5744e01 402 'opcode' => 21,
84324192 403 'func' => 1,
e5744e01
TC
404 'types' => 'rrr'
405 },
406 'uminus' => {
407 'result' => 'r',
408 'parms' => 1,
409 'opcode' => 6,
410 'func' => 0,
411 'types' => 'r'
412 }
84324192
AMH
413 );
414$MaxOperands = 4;
415$PackCode = "i";
4161;
417
418__END__
419
420=head1 NAME
421
422Imager::Regops - generated information about the register based VM
423
424=head1 SYNOPSIS
425
426 use Imager::Regops;
427 $Imager::Regops::Attr{$opname}->{opcode} # opcode for given operator
428 $Imager::Regops::Attr{$opname}->{parms} # number of parameters
429 $Imager::Regops::Attr{$opname}->{types} # types of parameters
430 $Imager::Regops::Attr{$opname}->{func} # operator is a function
431 $Imager::Regops::Attr{$opname}->{result} # r for numeric, p for pixel result
432 $Imager::Regops::MaxOperands; # maximum number of operands
433
434=head1 DESCRIPTION
435
436This module is generated automatically from regmach.h so we don't need to
437maintain the same information in at least one extra place.
438
439At least that's the idea.
440
441=head1 AUTHOR
442
443Tony Cook, tony@develop-help.com
444
445=head1 SEE ALSO
446
447perl(1), Imager(3), http://www.eecs.umich.edu/~addi/perl/Imager/
448
449=cut
450