summaryrefslogtreecommitdiff
path: root/highlevelilinstruction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'highlevelilinstruction.cpp')
-rw-r--r--highlevelilinstruction.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/highlevelilinstruction.cpp b/highlevelilinstruction.cpp
index 98c85ea2..0b106d8b 100644
--- a/highlevelilinstruction.cpp
+++ b/highlevelilinstruction.cpp
@@ -120,7 +120,9 @@ unordered_map<BNHighLevelILOperation, vector<HighLevelILOperandUsage>>
SourceMemoryVersionHighLevelOperandUsage}},
{HLIL_INTRINSIC_SSA, {IntrinsicHighLevelOperandUsage, ParameterExprsHighLevelOperandUsage,
DestMemoryVersionHighLevelOperandUsage, SourceMemoryVersionHighLevelOperandUsage}},
- {HLIL_TRAP, {VectorHighLevelOperandUsage}}, {HLIL_CONST, {ConstantHighLevelOperandUsage}},
+ {HLIL_TRAP, {VectorHighLevelOperandUsage}},
+ {HLIL_CONST, {ConstantHighLevelOperandUsage}},
+ {HLIL_CONST_DATA, {ConstantHighLevelOperandUsage}},
{HLIL_CONST_PTR, {ConstantHighLevelOperandUsage}},
{HLIL_EXTERN_PTR, {ConstantHighLevelOperandUsage, OffsetHighLevelOperandUsage}},
{HLIL_FLOAT_CONST, {ConstantHighLevelOperandUsage}}, {HLIL_IMPORT, {ConstantHighLevelOperandUsage}},
@@ -1448,6 +1450,8 @@ ExprId HighLevelILInstruction::CopyTo(
subExprHandler(AsTwoOperandWithCarry().GetCarryExpr()));
case HLIL_CONST:
return dest->Const(size, GetConstant<HLIL_CONST>(), *this);
+ case HLIL_CONST_DATA:
+ return dest->ConstData(size, GetConstant<HLIL_CONST_DATA>(), *this);
case HLIL_CONST_PTR:
return dest->ConstPointer(size, GetConstant<HLIL_CONST_PTR>(), *this);
case HLIL_EXTERN_PTR:
@@ -1924,6 +1928,7 @@ bool HighLevelILInstruction::operator<(const HighLevelILInstruction& other) cons
return false;
return AsTwoOperandWithCarry().GetCarryExpr() < other.AsTwoOperandWithCarry().GetCarryExpr();
case HLIL_CONST:
+ case HLIL_CONST_DATA:
case HLIL_CONST_PTR:
case HLIL_FLOAT_CONST:
case HLIL_IMPORT:
@@ -2606,6 +2611,12 @@ ExprId HighLevelILFunction::Const(size_t size, uint64_t val, const ILSourceLocat
}
+ExprId HighLevelILFunction::ConstData(size_t size, uint64_t addr, const ILSourceLocation& loc)
+{
+ return AddExprWithLocation(HLIL_CONST_DATA, loc, size, addr);
+}
+
+
ExprId HighLevelILFunction::ConstPointer(size_t size, uint64_t val, const ILSourceLocation& loc)
{
return AddExprWithLocation(HLIL_CONST_PTR, loc, size, val);