Header menu logo B2R2

Stmt Type

Represents a LowUIR statement. You must create Expr/Stmt through the AST module. NEVER directly construct Expr nor Stmt unless you know what you are doing.

Union cases

Union case Description

CJmp(Expr, Expr, Expr, HashConsingInfo)

Full Usage: CJmp(Expr, Expr, Expr, HashConsingInfo)

Parameters:

This statement represents a conditional jump to an LMark. The first argument specifies a jump condition. If the condition is true, jump to the address specified by the second argument. Otherwise, jump to the address specified by the third argument.

Item1 : Expr
Item2 : Expr
Item3 : Expr
Item4 : HashConsingInfo

ExternalCall(Expr, HashConsingInfo)

Full Usage: ExternalCall(Expr, HashConsingInfo)

Parameters:

External function call. This statement represents a uninterpreted function call. The argument expression is in a curried form.

Item1 : Expr
Item2 : HashConsingInfo

IEMark(uint32, HashConsingInfo)

Full Usage: IEMark(uint32, HashConsingInfo)

Parameters:

Metadata representing the end of a machine instruction. It contains the length of the current instruction.

Item1 : uint32
Item2 : HashConsingInfo

ISMark(uint32, HashConsingInfo)

Full Usage: ISMark(uint32, HashConsingInfo)

Parameters:

Metadata representing the start of a machine instruction. More specifically, it contains the length of the instruction. There must be a single IMark per a machine instruction.

Item1 : uint32
Item2 : HashConsingInfo

InterCJmp(Expr, Expr, Expr, HashConsingInfo)

Full Usage: InterCJmp(Expr, Expr, Expr, HashConsingInfo)

Parameters:

This is a conditional jump instruction to another instruction. The first argument specifies a jump condition. If the condition is true, change the program counter to jump to the address specified by the second argument. Otherwise, jump to the address specified by the third argument.

Item1 : Expr
Item2 : Expr
Item3 : Expr
Item4 : HashConsingInfo

InterJmp(Expr, InterJmpKind, HashConsingInfo)

Full Usage: InterJmp(Expr, InterJmpKind, HashConsingInfo)

Parameters:

This is an unconditional jump instruction to another instruction. This is an inter-instruction jump unlike Jmp statement. The first argument is the jump target address.

Item1 : Expr
Item2 : InterJmpKind
Item3 : HashConsingInfo

Jmp(Expr, HashConsingInfo)

Full Usage: Jmp(Expr, HashConsingInfo)

Parameters:

This statement represents a jump (unconditional) to an LMark. The first argument specifies the target address.

Item1 : Expr
Item2 : HashConsingInfo

LMark(Label, HashConsingInfo)

Full Usage: LMark(Label, HashConsingInfo)

Parameters:

Metadata representing a label (as in an assembly language). LMark is only valid within a machine instruction.

Item1 : Label
Item2 : HashConsingInfo

Put(Expr, Expr, HashConsingInfo)

Full Usage: Put(Expr, Expr, HashConsingInfo)

Parameters:

This statement puts a value into a register. The first argument is a destination operand, and the second argument is a source operand. The destination operand should have either a Var or a TempVar. Example: [Put(T_1:I32, Load(LE, T_2:I32))] loads a 32-bit value from the address T2, and store the value to the temporary register T1.

Item1 : Expr
Item2 : Expr
Item3 : HashConsingInfo

SideEffect(SideEffect, HashConsingInfo)

Full Usage: SideEffect(SideEffect, HashConsingInfo)

Parameters:

This represents an instruction with side effects such as a system call.

Item1 : SideEffect
Item2 : HashConsingInfo

Store(Endian, Expr, Expr, HashConsingInfo)

Full Usage: Store(Endian, Expr, Expr, HashConsingInfo)

Parameters:

This statement stores a value into a memory. The first argument represents the endianness, the second argument is a destination operand, and the third argument is a value to store. Example: Store(LE, T_1:I32, T_2:I32) stores a 32-bit value T_2 into the address T_1

Item1 : Endian
Item2 : Expr
Item3 : Expr
Item4 : HashConsingInfo

Instance members

Instance member Description

this.Hash

Full Usage: this.Hash

Returns: int
Modifiers: inline

Precomputed hash value of the statement.

Returns: int

this.ID

Full Usage: this.ID

Returns: uint32
Modifiers: inline

Unique ID of the hash consed statement.

Returns: uint32

this.IsCJmp

Full Usage: this.IsCJmp

Returns: bool
Returns: bool

this.IsExternalCall

Full Usage: this.IsExternalCall

Returns: bool
Returns: bool

this.IsIEMark

Full Usage: this.IsIEMark

Returns: bool
Returns: bool

this.IsISMark

Full Usage: this.IsISMark

Returns: bool
Returns: bool

this.IsInterCJmp

Full Usage: this.IsInterCJmp

Returns: bool
Returns: bool

this.IsInterJmp

Full Usage: this.IsInterJmp

Returns: bool
Returns: bool

this.IsJmp

Full Usage: this.IsJmp

Returns: bool
Returns: bool

this.IsLMark

Full Usage: this.IsLMark

Returns: bool
Returns: bool

this.IsPut

Full Usage: this.IsPut

Returns: bool
Returns: bool

this.IsSideEffect

Full Usage: this.IsSideEffect

Returns: bool
Returns: bool

this.IsStore

Full Usage: this.IsStore

Returns: bool
Returns: bool

Static members

Static member Description

Stmt.AppendToString(stmt, sb)

Full Usage: Stmt.AppendToString(stmt, sb)

Parameters:
stmt : Stmt
sb : StringBuilder

Stmt.HashCJmp(cond, t, f)

Full Usage: Stmt.HashCJmp(cond, t, f)

Parameters:
Returns: int
Modifiers: inline
cond : Expr
t : Expr
f : Expr
Returns: int

Stmt.HashExtCall(e)

Full Usage: Stmt.HashExtCall(e)

Parameters:
Returns: int
Modifiers: inline
e : Expr
Returns: int

Stmt.HashIEMark(len)

Full Usage: Stmt.HashIEMark(len)

Parameters:
    len : uint32

Returns: int
Modifiers: inline
len : uint32
Returns: int

Stmt.HashISMark(len)

Full Usage: Stmt.HashISMark(len)

Parameters:
    len : uint32

Returns: int
Modifiers: inline
len : uint32
Returns: int

Stmt.HashInterCJmp(cond, t, f)

Full Usage: Stmt.HashInterCJmp(cond, t, f)

Parameters:
Returns: int
Modifiers: inline
cond : Expr
t : Expr
f : Expr
Returns: int

Stmt.HashInterJmp(e, k)

Full Usage: Stmt.HashInterJmp(e, k)

Parameters:
Returns: int
Modifiers: inline
e : Expr
k : InterJmpKind
Returns: int

Stmt.HashJmp(e)

Full Usage: Stmt.HashJmp(e)

Parameters:
Returns: int
Modifiers: inline
e : Expr
Returns: int

Stmt.HashLMark(label)

Full Usage: Stmt.HashLMark(label)

Parameters:
Returns: int
Modifiers: inline
label : Label
Returns: int

Stmt.HashPut(dst, src)

Full Usage: Stmt.HashPut(dst, src)

Parameters:
Returns: int
Modifiers: inline
dst : Expr
src : Expr
Returns: int

Stmt.HashSideEffect(e)

Full Usage: Stmt.HashSideEffect(e)

Parameters:
Returns: int
Modifiers: inline
e : SideEffect
Returns: int

Stmt.HashStore(n, addr, e)

Full Usage: Stmt.HashStore(n, addr, e)

Parameters:
Returns: int
Modifiers: inline
n : Endian
addr : Expr
e : Expr
Returns: int

Stmt.ToString(stmt)

Full Usage: Stmt.ToString(stmt)

Parameters:
Returns: string
stmt : Stmt
Returns: string

Type something to start searching.