# Interface: com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm

A terminal IR representing an immediate value. This IR object is holding a sequence of bits whose interpretation can be:
 \- a 2\-complement arithmetic integer of any length
 \- a single\-precision 32\-bit IEEE\-754 floating\-point value
 \- a double\-precision 64\-bit IEEE\-754 floating\-point value

## Method: _add
- parameter: `val`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Perform an addition.
parameter: val: 
return: 

## Method: _and
- parameter: `val`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Perform a binary\-and operation.
parameter: val: 
return: 

## Method: _bitlength
- return type: `int`

Description: Retrieve the effective length in bits, i.e. the minimal number of bits required to store this immediate.
return: 

## Method: _clearbit
- parameter: `pos`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Reset a given bit to 0.
parameter: pos: 
return: 

## Method: _cmp
- parameter: `val`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`
- return type: `int`

Description: Perform a signed operand comparison.
parameter: val: 
return: 0, 1, or \-1

## Method: _cmpU
- parameter: `val`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`
- return type: `int`

Description: Perform an unsigned operand comparison.
parameter: val: 
return: 0, 1, or \-1

## Method: _div
- parameter: `val`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Perform a signed division.
parameter: val: 
return: 

## Method: _divU
- parameter: `val`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Perform an unsigned division.
parameter: val: 
return: 

## Method: _fadd
- parameter: `val`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Add this IEEE\-754 float to another float immediate and return the result.
parameter: val: 
return: 

## Method: _fcmp
- parameter: `val`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`
- return type: `java.lang.Integer`

Description: Compare this IEEE\-754 float with another float immediate and return 0, \+1, \-1 depending on the result of the comparison. Comparisons are ordered. If any of the operands are unordered, null is returned.
parameter: val: 
return: 

## Method: _fdiv
- parameter: `val`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Divide this IEEE\-754 float by another float immediate and return the result.
parameter: val: 
return: 

## Method: _fmul
- parameter: `val`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Multiply this IEEE\-754 float to another float immediate and return the result.
parameter: val: 
return: 

## Method: _fsub
- parameter: `val`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Subtract the IEEE\-754 float parameter from this float immediate and return the result.
parameter: val: 
return: 

## Method: _isPowerOf2
- return type: `boolean`

Description: Determine whether this immediate \(treated as an unsigned integer\) is a power of 2.
return: 

## Method: _log2
- return type: `java.lang.Integer`

Description: Perform an exact log2 on this immediate treated as an unsigned integer. If the immediate is not a power of 2, a null value is returned.
return: a non\-null log2 of this immediate

## Method: _mul
- parameter: `val`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Perform a \(truncated\) multiplication.
parameter: val: 
return: 

## Method: _neg
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Perform a negation.
return: 

## Method: _not
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Perform a binary\-not operation.
return: 

## Method: _or
- parameter: `val`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Perform a binary\-or operation.
parameter: val: 
return: 

## Method: _pow
- parameter: `exponent`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Perform an exponentiation.
parameter: exponent: must be positive or zero
return: 

## Method: _rem
- parameter: `val`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Perform a signed remainder \(modulo\) operation.
parameter: val: 
return: 

## Method: _remU
- parameter: `val`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Perform an unsigned remainder \(modulo\) operation.
parameter: val: 
return: 

## Method: _rol
- parameter: `cnt`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Perform a left\-rotate operation.
parameter: cnt: 
return: 

## Method: _ror
- parameter: `cnt`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Perform a right\-rotate operation.
parameter: cnt: 
return: 

## Method: _sar
- parameter: `cnt`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Perform an arithmetic right\-shift operation \(sign bit is maintained\). The effective count is computed modulo\-positive [#getBitsize()](#getBitsize()).
parameter: cnt: 
return: 

## Method: _setbit
- parameter: `pos`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Set a given bit to 1.
parameter: pos: 
return: 

## Method: _shl
- parameter: `cnt`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Perform a left\-shift operation. The effective count is computed modulo\-positive [#getBitsize()](#getBitsize()).
parameter: cnt: 
return: 

## Method: _shr
- parameter: `cnt`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Perform a regular right\-shift operation. The effective count is computed modulo\-positive [#getBitsize()](#getBitsize()).
parameter: cnt: 
return: 

## Method: _signum
- return type: `int`

Description: Retrieve the sign number of this immediate: 0 if 0, \-1 if negative, \+1 if positive.
return: 

## Method: _sub
- parameter: `val`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Perform a subtraction.
parameter: val: 
return: 

## Method: _testbit
- parameter: `pos`, type: `int`
- return type: `boolean`

Description: Test if a given bit is set.
parameter: pos: 
return: true if set, false if unset

## Method: _xor
- parameter: `val`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Perform a binary\-xor operation.
parameter: val: 
return: 

## Method: canReadAsAddress
- return type: `boolean`

Description: 
return: 

## Method: canReadAsDoubleFloat
- return type: `boolean`


## Method: canReadAsLong
- return type: `boolean`

Description: Determine if this value can fit on a 64\-bit long primitive.
return: 

## Method: canReadAsSingleFloat
- return type: `boolean`


## Method: canReadAsUnsignedLong
- return type: `boolean`

Description: Determine if this value can fit as an unsigned long on a 64\-bit long primitive \(ie, with the MSB is set to 0\).
return: 

## Method: duplicate
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: The resulting copy may not be mutable. It will be mutable IFF this object is mutable itself. To ensure that the copy is mutable, use [#duplicateWithType(IWildcardType)](#duplicateWithType(IWildcardType)) or [#duplicateToMutable()](#duplicateToMutable()).

## Method: duplicateToMutable
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Create a mutable copy of this immediate. Those immediates can be assigned [types](IWildcardType) and custom AST elements.
return: a non\-factory controlled, mutable immediate

## Method: duplicateWithType
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IWildcardType`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Create a mutable copy of this immediate and assign it a type. Those immediates can be assigned [types](IWildcardType) and custom AST elements..
parameter: type: the initial type, may be null
return: a non\-factory controlled, mutable immediate

## Method: expand
- parameter: `bits`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Expand \(zero\-extension\) this immediate. If bits if less than the bitsize of this immediate, this method is the same as truncate. If bits is greater than the bitsize of this immediate, then the resulting value is **zero\-extended**.
parameter: bits: 
return: 

## Method: getCustomAST
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICElement`

Description: Retrieve the custom AST element that will be used when generating C code, if one was set.
return: an AST element, possibly null

## Method: getGroup
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IWildcardType.Group`

Description: Determine the current group for the immediate: integer or float. Do not confuse with [#getType()](#getType()), although the group can be used to infer an appropriate type.
return: 

## Method: getStringLiteral
- return type: `java.lang.String`

Description: 
return: 

## Method: getUnsignedValue
- return type: `java.math.BigInteger`

Description: Get this immediate as an unsigned big integer value.
return: 

## Method: getValue
- return type: `java.math.BigInteger`

Description: Get this immediate as a big integer value \(signed\).
return: 

## Method: getValueAsAddress
- return type: `long`

Description: Get the immediate value as a primitive long, preferably unsigned. Will raise if the value does not fit on 64\-bits.
return: 

## Method: getValueAsDoubleFloat
- return type: `double`


## Method: getValueAsLong
- return type: `long`

Description: Get the immediate value as a **signed** primitive long. Will raise if the value does not fit in \[LONG\_MIN, LONG\_MAX\] range \(64 bits\).
return: 

## Method: getValueAsSingleFloat
- return type: `float`


## Method: getValueAsUnsignedLong
- return type: `long`

Description: Get the immediate value as an **unsigned, zero\-extended** primitive long. Will raise if the value does not fit within \[0, LONG\_MAX\] range \(63 bits\). 

 [#getValueAsLong()](#getValueAsLong()) is a safer method.
return: 

## Method: isMutable
- return type: `boolean`

Description: Determine if this immediate is mutable. By default, they are not. Use [#duplicateWithType(IWildcardType)](#duplicateWithType(IWildcardType)) to create a mutable immediate to which a type and custom AST element can be assigned.
return: 

## Method: isOnes
- return type: `boolean`

Description: Determine whether this immediate has all its bits set to 1.
return: 

## Method: isStringLiteral
- return type: `boolean`

Description: 
return: 

## Method: isZero
- return type: `boolean`

Description: Determine whether this immediate has all its bits set to 0. 

 Note: do not mix this up with a zero\-value equality check. That works if the underlying value is to be interpreted as an 2\-complement integer, but may not work if the imm is to be understood as an ieee754 float value.
return: 

## Method: normalize
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Normalize this immediate bvy generating an immediate whose internal representation better matches the type. If this immediate is not typed, it cannot be normalized. If the immediate is already normalized or cannot be normalized, this method returns null.
return: a new \(normalized\) immediate, or null if the imm is already normalized or cannot be         normalized

## Method: setCustomAST
- parameter: `customAST`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICElement`
- return type: `boolean`

Description: Set a custom AST element to be used when generating C code. Reserved for [mutable](IEImm#isMutable()) elements.
parameter: customAST: 
return: 

## Method: signExtend
- parameter: `newBitsize`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`


## Method: toHexString
- return type: `java.lang.String`

Description: Format this immediate as an unsigned hexadecimal string.
return: 

## Method: truncate
- parameter: `bits`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`

Description: Truncate this immediate or sign\-extend it. If bits if less than the bitsize of this immediate, it is truncated. If bits is greater than the bitsize of this immediate, then the resulting value is **sign\-extended**.
parameter: bits: 
return: 

## Method: zeroExtend
- parameter: `newBitsize`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEImm`


