# AUTOMATICALLY GENERATED BY regops.perl
package Imager::Regops;
use strict;
require Exporter;
use vars qw(@ISA @EXPORT @EXPORT_OK %Attr $MaxOperands $PackCode);
@ISA = qw(Exporter);
@EXPORT_OK = qw(%Attr $MaxOperands $PackCode);

use constant RBC_ADD => 0;
use constant RBC_SUBTRACT => 1;
use constant RBC_MULT => 2;
use constant RBC_DIV => 3;
use constant RBC_MOD => 4;
use constant RBC_POW => 5;
use constant RBC_UMINUS => 6;
use constant RBC_MULTP => 7;
use constant RBC_ADDP => 8;
use constant RBC_SUBTRACTP => 9;
use constant RBC_SIN => 10;
use constant RBC_COS => 11;
use constant RBC_ATAN2 => 12;
use constant RBC_SQRT => 13;
use constant RBC_DISTANCE => 14;
use constant RBC_GETP1 => 15;
use constant RBC_GETP2 => 16;
use constant RBC_GETP3 => 17;
use constant RBC_VALUE => 18;
use constant RBC_HUE => 19;
use constant RBC_SAT => 20;
use constant RBC_HSV => 21;
use constant RBC_RED => 22;
use constant RBC_GREEN => 23;
use constant RBC_BLUE => 24;
use constant RBC_RGB => 25;
use constant RBC_INT => 26;
use constant RBC_IF => 27;
use constant RBC_IFP => 28;
use constant RBC_LE => 29;
use constant RBC_LT => 30;
use constant RBC_GE => 31;
use constant RBC_GT => 32;
use constant RBC_EQ => 33;
use constant RBC_NE => 34;
use constant RBC_AND => 35;
use constant RBC_OR => 36;
use constant RBC_NOT => 37;
use constant RBC_ABS => 38;
use constant RBC_RET => 39;
use constant RBC_JUMP => 40;
use constant RBC_JUMPZ => 41;
use constant RBC_JUMPNZ => 42;
use constant RBC_SET => 43;
use constant RBC_SETP => 44;
use constant RBC_PRINT => 45;
use constant RBC_OP_COUNT => 46;

@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_OP_COUNT);

%Attr = (
          'setp' => {
                      'result' => 'p',
                      'parms' => 1,
                      'opcode' => 44,
                      'func' => 0,
                      'types' => 'p'
                    },
          'green' => {
                       'result' => 'r',
                       'parms' => 1,
                       'opcode' => 23,
                       'func' => 1,
                       'types' => 'p'
                     },
          'abs' => {
                     'result' => 'r',
                     'parms' => 1,
                     'opcode' => 38,
                     'func' => 1,
                     'types' => 'r'
                   },
          'le' => {
                    'result' => 'r',
                    'parms' => 2,
                    'opcode' => 29,
                    'func' => 0,
                    'types' => 'rr'
                  },
          'cos' => {
                     'result' => 'r',
                     'parms' => 1,
                     'opcode' => 11,
                     'func' => 1,
                     'types' => 'r'
                   },
          'not' => {
                     'result' => 'r',
                     'parms' => 1,
                     'opcode' => 37,
                     'func' => 0,
                     'types' => 'r'
                   },
          'ne' => {
                    'result' => 'r',
                    'parms' => 2,
                    'opcode' => 34,
                    'func' => 0,
                    'types' => 'rr'
                  },
          'blue' => {
                      'result' => 'r',
                      'parms' => 1,
                      'opcode' => 24,
                      'func' => 1,
                      'types' => 'p'
                    },
          'and' => {
                     'result' => 'r',
                     'parms' => 2,
                     'opcode' => 35,
                     'func' => 0,
                     'types' => 'rr'
                   },
          'mult' => {
                      'result' => 'r',
                      'parms' => 2,
                      'opcode' => 2,
                      'func' => 0,
                      'types' => 'rr'
                    },
          'pow' => {
                     'result' => 'r',
                     'parms' => 2,
                     'opcode' => 5,
                     'func' => 0,
                     'types' => 'rr'
                   },
          'lt' => {
                    'result' => 'r',
                    'parms' => 2,
                    'opcode' => 30,
                    'func' => 0,
                    'types' => 'rr'
                  },
          'mod' => {
                     'result' => 'r',
                     'parms' => 2,
                     'opcode' => 4,
                     'func' => 0,
                     'types' => 'rr'
                   },
          'getp1' => {
                       'result' => 'p',
                       'parms' => 2,
                       'opcode' => 15,
                       'func' => 1,
                       'types' => 'rr'
                     },
          'atan2' => {
                       'result' => 'r',
                       'parms' => 2,
                       'opcode' => 12,
                       'func' => 1,
                       'types' => 'rr'
                     },
          'getp2' => {
                       'result' => 'p',
                       'parms' => 2,
                       'opcode' => 16,
                       'func' => 1,
                       'types' => 'rr'
                     },
          'getp3' => {
                       'result' => 'p',
                       'parms' => 2,
                       'opcode' => 17,
                       'func' => 1,
                       'types' => 'rr'
                     },
          'value' => {
                       'result' => 'r',
                       'parms' => 1,
                       'opcode' => 18,
                       'func' => 1,
                       'types' => 'p'
                     },
          'subtractp' => {
                           'result' => 'p',
                           'parms' => 2,
                           'opcode' => 9,
                           'func' => 0,
                           'types' => 'pp'
                         },
          'ge' => {
                    'result' => 'r',
                    'parms' => 2,
                    'opcode' => 31,
                    'func' => 0,
                    'types' => 'rr'
                  },
          'sat' => {
                     'result' => 'r',
                     'parms' => 1,
                     'opcode' => 20,
                     'func' => 1,
                     'types' => 'p'
                   },
          'jump' => {
                      'result' => undef,
                      'parms' => 0,
                      'opcode' => 40,
                      'func' => 0,
                      'types' => ''
                    },
          'if' => {
                    'result' => 'r',
                    'parms' => 3,
                    'opcode' => 27,
                    'func' => 1,
                    'types' => 'rrr'
                  },
          'div' => {
                     'result' => 'r',
                     'parms' => 2,
                     'opcode' => 3,
                     'func' => 0,
                     'types' => 'rr'
                   },
          'ifp' => {
                     'result' => 'p',
                     'parms' => 3,
                     'opcode' => 28,
                     'func' => 1,
                     'types' => 'rpp'
                   },
          'set' => {
                     'result' => 'r',
                     'parms' => 1,
                     'opcode' => 43,
                     'func' => 0,
                     'types' => 'r'
                   },
          'eq' => {
                    'result' => 'r',
                    'parms' => 2,
                    'opcode' => 33,
                    'func' => 0,
                    'types' => 'rr'
                  },
          'multp' => {
                       'result' => 'p',
                       'parms' => 2,
                       'opcode' => 7,
                       'func' => 0,
                       'types' => 'pr'
                     },
          'sin' => {
                     'result' => 'r',
                     'parms' => 1,
                     'opcode' => 10,
                     'func' => 1,
                     'types' => 'r'
                   },
          'sqrt' => {
                      'result' => 'r',
                      'parms' => 1,
                      'opcode' => 13,
                      'func' => 1,
                      'types' => 'r'
                    },
          'distance' => {
                          'result' => 'r',
                          'parms' => 4,
                          'opcode' => 14,
                          'func' => 1,
                          'types' => 'rrrr'
                        },
          'gt' => {
                    'result' => 'r',
                    'parms' => 2,
                    'opcode' => 32,
                    'func' => 0,
                    'types' => 'rr'
                  },
          'red' => {
                     'result' => 'r',
                     'parms' => 1,
                     'opcode' => 22,
                     'func' => 1,
                     'types' => 'p'
                   },
          'rgb' => {
                     'result' => 'p',
                     'parms' => 3,
                     'opcode' => 25,
                     'func' => 1,
                     'types' => 'rrr'
                   },
          'hue' => {
                     'result' => 'r',
                     'parms' => 1,
                     'opcode' => 19,
                     'func' => 1,
                     'types' => 'p'
                   },
          'print' => {
                       'result' => undef,
                       'parms' => 1,
                       'opcode' => 45,
                       'func' => 0,
                       'types' => 'r'
                     },
          'jumpnz' => {
                        'result' => undef,
                        'parms' => 1,
                        'opcode' => 42,
                        'func' => 0,
                        'types' => 'r'
                      },
          'addp' => {
                      'result' => 'p',
                      'parms' => 2,
                      'opcode' => 8,
                      'func' => 0,
                      'types' => 'pp'
                    },
          'int' => {
                     'result' => 'r',
                     'parms' => 1,
                     'opcode' => 26,
                     'func' => 1,
                     'types' => 'r'
                   },
          'op_count' => {
                          'result' => undef,
                          'parms' => 0,
                          'opcode' => 46,
                          'func' => 0,
                          'types' => ''
                        },
          'or' => {
                    'result' => 'r',
                    'parms' => 2,
                    'opcode' => 36,
                    'func' => 0,
                    'types' => 'rr'
                  },
          'jumpz' => {
                       'result' => undef,
                       'parms' => 1,
                       'opcode' => 41,
                       'func' => 0,
                       'types' => 'r'
                     },
          'add' => {
                     'result' => 'r',
                     'parms' => 2,
                     'opcode' => 0,
                     'func' => 0,
                     'types' => 'rr'
                   },
          'subtract' => {
                          'result' => 'r',
                          'parms' => 2,
                          'opcode' => 1,
                          'func' => 0,
                          'types' => 'rr'
                        },
          'ret' => {
                     'result' => undef,
                     'parms' => 1,
                     'opcode' => 39,
                     'func' => 0,
                     'types' => 'p'
                   },
          'hsv' => {
                     'result' => 'p',
                     'parms' => 3,
                     'opcode' => 21,
                     'func' => 1,
                     'types' => 'rrr'
                   },
          'uminus' => {
                        'result' => 'r',
                        'parms' => 1,
                        'opcode' => 6,
                        'func' => 0,
                        'types' => 'r'
                      }
        );
$MaxOperands = 4;
$PackCode = "i";
1;

__END__

=head1 NAME

Imager::Regops - generated information about the register based VM

=head1 SYNOPSIS

  use Imager::Regops;
  $Imager::Regops::Attr{$opname}->{opcode} # opcode for given operator
  $Imager::Regops::Attr{$opname}->{parms} # number of parameters
  $Imager::Regops::Attr{$opname}->{types} # types of parameters
  $Imager::Regops::Attr{$opname}->{func} # operator is a function
  $Imager::Regops::Attr{$opname}->{result} # r for numeric, p for pixel result
  $Imager::Regops::MaxOperands; # maximum number of operands

=head1 DESCRIPTION

This module is generated automatically from regmach.h so we don't need to 
maintain the same information in at least one extra place.

At least that's the idea.

=head1 AUTHOR

Tony Cook, tony@develop-help.com

=head1 SEE ALSO

perl(1), Imager(3), http://www.eecs.umich.edu/~addi/perl/Imager/

=cut

