de.cau.cs.kieler.krep.evalbench.program.klp
Enum Opcode

java.lang.Object
  extended by java.lang.Enum<Opcode>
      extended by de.cau.cs.kieler.krep.evalbench.program.klp.Opcode
All Implemented Interfaces:
Serializable, Comparable<Opcode>

public enum Opcode
extends Enum<Opcode>

Defines the opcode for each KLP instructions.

Rating yellow
(2010-02-05) review by cmot, msp

Enum Constant Summary
ADD
          addition.
AND
          boolean and.
BOOL
          move valued register to clock.
CCMOV
          move clock register to clock register.
DIV
          divide.
DONE
          Stop computation for this tick.
EQ
          equal.
GE
          greater or equal than.
GT
          greater than.
IADD
          immediate addition.
IAND
          boolean immediate and.
ICMOV
          move constant to clock register.
IDIV
          divide immediate.
IEQ
          equal.
IGE
          greater or equal than.
IGT
          greater than.
ILE
          less or equal than.
ILT
          less than.
IMUL
          Multiply immediate.
INEQ
          not equal.
INPUT
          declare input.
INT
          move clock to valued register.
IOR
          boolean immediate or.
ISUB
          subtract immediate.
IVMOV
          move constant to valued register.
IXOR
          boolean immediate xor.
JF
          jump when false.
JMP
          Unconditional jump.
JNZ
          jump when not zero.
JT
          jump when true.
JZ
          jump when zero.
LE
          less or equal than.
LT
          less than.
MUL
          Multiply.
NEQ
          not equal.
OR
          boolean or.
OUTPUT
          declare output.
PRIO
          set priority for a register.
SETCLK
          initialize valued register.
SETPC
          initialize clock register.
SUB
          subtract.
VVMOV
          move value register to valued register.
XOR
          boolean xor.
 
Method Summary
 int getCode()
           
static Opcode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Opcode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SETCLK

public static final Opcode SETCLK
initialize valued register.


SETPC

public static final Opcode SETPC
initialize clock register.


DONE

public static final Opcode DONE
Stop computation for this tick.


INPUT

public static final Opcode INPUT
declare input.


OUTPUT

public static final Opcode OUTPUT
declare output.


PRIO

public static final Opcode PRIO
set priority for a register.


ADD

public static final Opcode ADD
addition.


IADD

public static final Opcode IADD
immediate addition.


SUB

public static final Opcode SUB
subtract.


ISUB

public static final Opcode ISUB
subtract immediate.


MUL

public static final Opcode MUL
Multiply.


IMUL

public static final Opcode IMUL
Multiply immediate.


DIV

public static final Opcode DIV
divide.


IDIV

public static final Opcode IDIV
divide immediate.


AND

public static final Opcode AND
boolean and.


IAND

public static final Opcode IAND
boolean immediate and.


OR

public static final Opcode OR
boolean or.


IOR

public static final Opcode IOR
boolean immediate or.


XOR

public static final Opcode XOR
boolean xor.


IXOR

public static final Opcode IXOR
boolean immediate xor.


LT

public static final Opcode LT
less than.


LE

public static final Opcode LE
less or equal than.


EQ

public static final Opcode EQ
equal.


GE

public static final Opcode GE
greater or equal than.


GT

public static final Opcode GT
greater than.


NEQ

public static final Opcode NEQ
not equal.


ILT

public static final Opcode ILT
less than.


ILE

public static final Opcode ILE
less or equal than.


IEQ

public static final Opcode IEQ
equal.


IGE

public static final Opcode IGE
greater or equal than.


IGT

public static final Opcode IGT
greater than.


INEQ

public static final Opcode INEQ
not equal.


JMP

public static final Opcode JMP
Unconditional jump.


JT

public static final Opcode JT
jump when true.


JF

public static final Opcode JF
jump when false.


JZ

public static final Opcode JZ
jump when zero.


JNZ

public static final Opcode JNZ
jump when not zero.


INT

public static final Opcode INT
move clock to valued register.


BOOL

public static final Opcode BOOL
move valued register to clock.


VVMOV

public static final Opcode VVMOV
move value register to valued register.


IVMOV

public static final Opcode IVMOV
move constant to valued register.


CCMOV

public static final Opcode CCMOV
move clock register to clock register.


ICMOV

public static final Opcode ICMOV
move constant to clock register.

Method Detail

values

public static Opcode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Opcode c : Opcode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Opcode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getCode

public int getCode()
Returns:
object code for the instruction.