diff options
| author | Brian Potchik <brian@vector35.com> | 2022-11-20 21:35:06 -0500 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2022-11-20 21:35:06 -0500 |
| commit | 0763a5064d53a6ec58b7bd40e8c47679d55a81d0 (patch) | |
| tree | bedd36cb2c0c857ab438389c2ac3e0bdb97b7012 /highlevelilinstruction.cpp | |
| parent | ae69370eb054e2d1679aff0247ad3e217df62a62 (diff) | |
Initial constant expression builtin outliner.
Diffstat (limited to 'highlevelilinstruction.cpp')
| -rw-r--r-- | highlevelilinstruction.cpp | 13 |
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); |
