public final enum

OperationType

extends Enum<E extends Enum<E>>
java.lang.Object
   ↳ java.lang.Enum<E extends java.lang.Enum<E>>
     ↳ com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.OperationType

Class Overview

Operation types.

Summary

Enum Values
OperationType  ADD  integer addition, signed or unsigned  
OperationType  AND  binary-AND (careful not to confuse with LOG_AND  
OperationType  CARRY  Resulting carry from the addition of two operands with no carry-in bit. 
OperationType  CAST  unsigned truncation (unsigned cast), used for upsizing, downsizing, or regular type casts: the EOperation carries the resulting bitsize (and optional etype)  
OperationType  CAST_S  signed extension (signed cast), used for upsizing: the EOperation carries the resulting bitsize (and optional etype)  
OperationType  DIV2_S  [NO NOT USE] signed integer division: input=(2N, N), output=(N, N)  
OperationType  DIV2_U  [NO NOT USE] unsigned integer division: input=(2N, N), output=(N, N)  
OperationType  DIV_S  signed integer division, simple: input=(N, N), output=N (remainder discarded)  
OperationType  DIV_U  unsigned integer division, simple: input=(N, N), output=N (remainder discarded)  
OperationType  FADD  IEEE-754 addition  
OperationType  FDIV  IEEE-754 division  
OperationType  FEQ  IEEE-754 ordered and equal comparison operation 
OperationType  FGE  IEEE-754 ordered and greater-or-equal-than operation  
OperationType  FGT  IEEE-754 ordered and greater-than operation  
OperationType  FLE  IEEE-754 ordered and less-or-equal-than operation  
OperationType  FLT  IEEE-754 ordered and less-than operation  
OperationType  FMUL  IEEE-754 multiplication  
OperationType  FNE  IEEE-754 unordered or unequal comparison operation  
OperationType  FP2FP  floating-point to floating-point upgrade or downgrade (supported FP formats: binary32, binary64, intel x87 extended double-precision 80-bit)  
OperationType  FP2INT  floating-point to signed integer conversion (supported FP formats: binary32, binary64, intel x87 extended double-precision 80-bit)  
OperationType  FSUB  IEEE-754 subtraction  
OperationType  GE_S  signed greater or equal  
OperationType  GE_U  unsigned greater or equal  
OperationType  GT_S  signed greater (strict)  
OperationType  GT_U  unsigned greater (strict)  
OperationType  INT2FP  signed-integer to floating-point conversion (supported FP formats: binary32, binary64, intel x87 extended double-precision 80-bit)  
OperationType  LE_S  signed less or equal  
OperationType  LE_U  unsigned less or equal  
OperationType  LOG_AND  logical-AND (careful not to confuse with binary-AND  
OperationType  LOG_EQ  logical equality  
OperationType  LOG_NEQ  logical inequality  
OperationType  LOG_NOT  logical-NOT (careful not to confuse with binary-NOT
OperationType  LOG_OR  logical-OR (careful not to confuse with binary-OR  
OperationType  LT_S  signed less (strict)  
OperationType  LT_U  unsigned less (strict) - can be used to compute the carry resulting from a subtraction  
OperationType  MUL2_S  [NO NOT USE] signed integer multiplication: input=(N, N), output=2N  
OperationType  MUL2_U  [NO NOT USE] unsigned integer multiplication: input=(N, N), output=2N  
OperationType  MUL_S  Truncated integer multiplication (signed or unsigned): input=(N, N), output=N
It is bitwise-equivalent to an unsigned truncated multiply (operator MUL_U) Use preferably for signed operations, as it will help with type propagation. 
OperationType  MUL_U  Truncated integer multiplication (signed or unsigned): input=(N, N), output=N
It is bitwise-equivalent to a signed truncated multiply (operator MUL_S) Use preferably for unsigned operations, as it will help with type propagation. 
OperationType  NOT  binary-NOT (careful not to confuse with LOG_NOT
OperationType  OR  binary-OR (careful not to confuse with LOG_OR  
OperationType  PAR  Standard parity operator: single operand, single-bit result; result is 1 if number of bits (in operand) set to 1 is even. 
OperationType  POW  Power (exponentiation) operator  
OperationType  REM_S  signed integer modulo, simple: input=(N, N), output=N (quotient discarded)  
OperationType  REM_U  unsigned integer modulo, simple: input=(N, N), output=N (quotient discarded)  
OperationType  ROL  Rotate left, always unsigned  
OperationType  ROR  Rotate right, always unsigned  
OperationType  SAR  shift right with count modulo bitsize, signed (arithmetic)  
OperationType  SHL  shift left with count modulo bitsize, always unsigned  
OperationType  SHR  shift right with count modulo bitsize, unsigned. 
OperationType  SUB  integer subtraction, signed or unsigned  
OperationType  XOR  binary-XOR  
Public Methods
static OperationType fromName(String name)
int getOperandCount()
boolean isAnyOf(OperationType... operationTypes)
boolean isConversion()
boolean isFloatComparison()
boolean isFloatConversion()
boolean isFloatOperation()
boolean isIntegerConversion()
boolean isLogical()
boolean isValid(int nbParameters)
boolean shouldNotUse()
String toString()
static OperationType valueOf(String name)
final static OperationType[] values()
[Expand]
Inherited Methods
From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum Values

public static final OperationType ADD

integer addition, signed or unsigned

public static final OperationType AND

binary-AND (careful not to confuse with LOG_AND

public static final OperationType CARRY

Resulting carry from the addition of two operands with no carry-in bit.
It is recommended to avoid using this operator: Replace CARRY(OP1, OP2) by LT_U(RESULT, OP1) (or LT_U(RESULT, OP2))

public static final OperationType CAST

unsigned truncation (unsigned cast), used for upsizing, downsizing, or regular type casts: the EOperation carries the resulting bitsize (and optional etype)

public static final OperationType CAST_S

signed extension (signed cast), used for upsizing: the EOperation carries the resulting bitsize (and optional etype)

public static final OperationType DIV2_S

[NO NOT USE] signed integer division: input=(2N, N), output=(N, N)

public static final OperationType DIV2_U

[NO NOT USE] unsigned integer division: input=(2N, N), output=(N, N)

public static final OperationType DIV_S

signed integer division, simple: input=(N, N), output=N (remainder discarded)

public static final OperationType DIV_U

unsigned integer division, simple: input=(N, N), output=N (remainder discarded)

public static final OperationType FADD

IEEE-754 addition

public static final OperationType FDIV

IEEE-754 division

public static final OperationType FEQ

IEEE-754 ordered and equal comparison operation

public static final OperationType FGE

IEEE-754 ordered and greater-or-equal-than operation

public static final OperationType FGT

IEEE-754 ordered and greater-than operation

public static final OperationType FLE

IEEE-754 ordered and less-or-equal-than operation

public static final OperationType FLT

IEEE-754 ordered and less-than operation

public static final OperationType FMUL

IEEE-754 multiplication

public static final OperationType FNE

IEEE-754 unordered or unequal comparison operation

public static final OperationType FP2FP

floating-point to floating-point upgrade or downgrade (supported FP formats: binary32, binary64, intel x87 extended double-precision 80-bit)

public static final OperationType FP2INT

floating-point to signed integer conversion (supported FP formats: binary32, binary64, intel x87 extended double-precision 80-bit)

public static final OperationType FSUB

IEEE-754 subtraction

public static final OperationType GE_S

signed greater or equal

public static final OperationType GE_U

unsigned greater or equal

public static final OperationType GT_S

signed greater (strict)

public static final OperationType GT_U

unsigned greater (strict)

public static final OperationType INT2FP

signed-integer to floating-point conversion (supported FP formats: binary32, binary64, intel x87 extended double-precision 80-bit)

public static final OperationType LE_S

signed less or equal

public static final OperationType LE_U

unsigned less or equal

public static final OperationType LOG_AND

logical-AND (careful not to confuse with binary-AND

public static final OperationType LOG_EQ

logical equality

public static final OperationType LOG_NEQ

logical inequality

public static final OperationType LOG_NOT

logical-NOT (careful not to confuse with binary-NOT. In practice in C, same as binary-NOT.

public static final OperationType LOG_OR

logical-OR (careful not to confuse with binary-OR

public static final OperationType LT_S

signed less (strict)

public static final OperationType LT_U

unsigned less (strict) - can be used to compute the carry resulting from a subtraction

public static final OperationType MUL2_S

[NO NOT USE] signed integer multiplication: input=(N, N), output=2N

public static final OperationType MUL2_U

[NO NOT USE] unsigned integer multiplication: input=(N, N), output=2N

public static final OperationType MUL_S

Truncated integer multiplication (signed or unsigned): input=(N, N), output=N
It is bitwise-equivalent to an unsigned truncated multiply (operator MUL_U) Use preferably for signed operations, as it will help with type propagation.

public static final OperationType MUL_U

Truncated integer multiplication (signed or unsigned): input=(N, N), output=N
It is bitwise-equivalent to a signed truncated multiply (operator MUL_S) Use preferably for unsigned operations, as it will help with type propagation.

public static final OperationType NOT

binary-NOT (careful not to confuse with LOG_NOT.

public static final OperationType OR

binary-OR (careful not to confuse with LOG_OR

public static final OperationType PAR

Standard parity operator: single operand, single-bit result; result is 1 if number of bits (in operand) set to 1 is even.
Cannot be translated to a simple operator, for convenience only. It will need ad-hoc translators in C.

public static final OperationType POW

Power (exponentiation) operator

public static final OperationType REM_S

signed integer modulo, simple: input=(N, N), output=N (quotient discarded)

public static final OperationType REM_U

unsigned integer modulo, simple: input=(N, N), output=N (quotient discarded)

public static final OperationType ROL

Rotate left, always unsigned

public static final OperationType ROR

Rotate right, always unsigned

public static final OperationType SAR

shift right with count modulo bitsize, signed (arithmetic)

public static final OperationType SHL

shift left with count modulo bitsize, always unsigned

public static final OperationType SHR

shift right with count modulo bitsize, unsigned. Note: in C, also represented '>>'; unsigned or signed shift depends on the type of the variable to be shifted.

public static final OperationType SUB

integer subtraction, signed or unsigned

public static final OperationType XOR

binary-XOR

Public Methods

public static OperationType fromName (String name)

public int getOperandCount ()

public boolean isAnyOf (OperationType... operationTypes)

public boolean isConversion ()

public boolean isFloatComparison ()

public boolean isFloatConversion ()

public boolean isFloatOperation ()

public boolean isIntegerConversion ()

public boolean isLogical ()

public boolean isValid (int nbParameters)

public boolean shouldNotUse ()

public String toString ()

public static OperationType valueOf (String name)

public static final OperationType[] values ()