asmjit::Expression Struct Reference

Expression node that can reference constants, labels, and another expressions.

Public Members

Classes

Public Types

Member Functions

Member Enumeration Documentation

Expression::OpType : uint8_tenum

Operation type.

ConstantDescription
kOpAdd 

Addition.

kOpSub 

Subtraction.

kOpMul 

Multiplication.

kOpSll 

Logical left shift.

kOpSrl 

Logical right shift.

kOpSra 

Arithmetic right shift.

Expression::ValueType : uint8_tenum

Type of Value.

ConstantDescription
kValueNone 

No value or invalid.

kValueConstant 

Value is 64-bit unsigned integer (constant).

kValueLabel 

Value is LabelEntry, which references a Label.

kValueExpression 

Value is Expression.

Member Function Documentation

void Expression::reset()noexcept

Resets the whole expression.

Changes both values to kValueNone.

void Expression::setValueAsConstant(size_t index, uint64_t constant)noexcept

Sets the value type at index to kValueConstant and its content to constant.

void Expression::setValueAsLabel(size_t index, LabelEntry* labelEntry)noexcept

Sets the value type at index to kValueLabel and its content to labelEntry.

void Expression::setValueAsExpression(size_t index, Expression* expression)noexcept

Sets the value type at index to kValueExpression and its content to expression.

Member Data Documentation

uint8_t Expression::opType

Operation type.

uint8_t Expression::valueType[2]

Value types of value.

uint8_t Expression::reserved[5]

Reserved for future use, should be initialized to zero.

Value Expression::value[2]

Expression left and right values.