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

IR operation types.

Summary

Enum Values
OperationType  ADD  integer addition, signed or unsigned  
OperationType  ADD_SSAT   
OperationType  ADD_USAT   
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] full signed integer division: input=(2N, N), output=(N, N)  
OperationType  DIV2_U  [NO NOT USE] full 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
- note that is_NaN can be emulated with FEQ: is_Nan(x) == !FEQ(x, x)
- note that is_unordered can be emulated with FEQ: is_unordered(x, y) == is_Nan(x) || is_Nan(y) == !FEQ(x, x) || !FEQ(y, y)
 
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)
The details of the conversion are unspecified (examples: how the operator deals with loss of precision; what truncation mode is used). 
OperationType  FP2INT  floating-point to signed integer conversion (supported FP formats: binary32, binary64, intel x87 extended double-precision 80-bit)
The details of the conversion are unspecified (examples: how the operator deals with loss of precision; what truncation mode is used). 
OperationType  FP2UINT  floating-point to unsigned integer conversion (supported FP formats: binary32, binary64)
The details of the conversion are unspecified (examples: how the operator deals with loss of precision; what truncation mode is used). 
OperationType  FSUB  IEEE-754 subtraction  
OperationType  FUN  IEEE-754 is_unordered operation, i.e. 
OperationType  FUNCTION  Custom function, further defined in FunctionOptype  
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)
The details of the conversion are unspecified (examples: how the operator deals with loss of precision; what truncation mode is used). 
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  MUL  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  MUL2_S  non-truncated signed integer multiplication: input=(N, N), output=2N  
OperationType  MUL2_U  non-truncated unsigned integer multiplication: input=(N, N), output=2N  
OperationType  MUL_U  Equivalent to MUL
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  arithmetic shift right with count modulo-positive bitsize, signed  
OperationType  SHL  logical shift left with count modulo-positive bitsize, always unsigned  
OperationType  SHR  logical shift right with count modulo-positive bitsize, unsigned. 
OperationType  SUB  integer subtraction, signed or unsigned  
OperationType  SUB_SSAT   
OperationType  SUB_USAT   
OperationType  UINT2FP  unsigned integer to floating-point conversion (supported FP formats: binary32, binary64)
The details of the conversion are unspecified (examples: how the operator deals with loss of precision; what truncation mode is used). 
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 isShift()
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 ADD_SSAT

public static final OperationType ADD_USAT

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] full signed integer division: input=(2N, N), output=(N, N)

public static final OperationType DIV2_U

[NO NOT USE] full 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
- note that is_NaN can be emulated with FEQ: is_Nan(x) == !FEQ(x, x)
- note that is_unordered can be emulated with FEQ: is_unordered(x, y) == is_Nan(x) || is_Nan(y) == !FEQ(x, x) || !FEQ(y, y)

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)
The details of the conversion are unspecified (examples: how the operator deals with loss of precision; what truncation mode is used).

public static final OperationType FP2INT

floating-point to signed integer conversion (supported FP formats: binary32, binary64, intel x87 extended double-precision 80-bit)
The details of the conversion are unspecified (examples: how the operator deals with loss of precision; what truncation mode is used).

public static final OperationType FP2UINT

floating-point to unsigned integer conversion (supported FP formats: binary32, binary64)
The details of the conversion are unspecified (examples: how the operator deals with loss of precision; what truncation mode is used).

public static final OperationType FSUB

IEEE-754 subtraction

public static final OperationType FUN

IEEE-754 is_unordered operation, i.e. determine if either operand is NaN
note that this operator can be can be used to determine whether a value is NaN since: is_NaN(x) == is_unordered(x, x)

public static final OperationType FUNCTION

Custom function, further defined in FunctionOptype

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)
The details of the conversion are unspecified (examples: how the operator deals with loss of precision; what truncation mode is used).

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 MUL

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 MUL2_S

non-truncated signed integer multiplication: input=(N, N), output=2N

public static final OperationType MUL2_U

non-truncated unsigned integer multiplication: input=(N, N), output=2N

public static final OperationType MUL_U

Equivalent to MUL. Should not be used from JEB 4.12 onward.

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

arithmetic shift right with count modulo-positive bitsize, signed

public static final OperationType SHL

logical shift left with count modulo-positive bitsize, always unsigned

public static final OperationType SHR

logical shift right with count modulo-positive 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 SUB_SSAT

public static final OperationType SUB_USAT

public static final OperationType UINT2FP

unsigned integer to floating-point conversion (supported FP formats: binary32, binary64)
The details of the conversion are unspecified (examples: how the operator deals with loss of precision; what truncation mode is used).

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 isShift ()

public boolean isValid (int nbParameters)

public boolean shouldNotUse ()

public String toString ()

public static OperationType valueOf (String name)

public static final OperationType[] values ()