diff options
| author | Peter LaFosse <peter@vector35.com> | 2018-08-16 22:30:15 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2018-08-16 22:30:15 -0400 |
| commit | 00fc6c96d415bd31ee5ecbec70a8e4de141674cd (patch) | |
| tree | 0a6ed958eb313fa54727fb8bc0d3afdcef4d83cd /mediumlevelilinstruction.cpp | |
| parent | 1ce780cd6a66a289b0422298871d61392ad3ec2a (diff) | |
Adding EXTERN_PTR type
Diffstat (limited to 'mediumlevelilinstruction.cpp')
| -rw-r--r-- | mediumlevelilinstruction.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mediumlevelilinstruction.cpp b/mediumlevelilinstruction.cpp index 9cf82b08..17ef88e7 100644 --- a/mediumlevelilinstruction.cpp +++ b/mediumlevelilinstruction.cpp @@ -168,6 +168,7 @@ unordered_map<BNMediumLevelILOperation, vector<MediumLevelILOperandUsage>> {MLIL_MEM_PHI, {DestMemoryVersionMediumLevelOperandUsage, SourceMemoryVersionsMediumLevelOperandUsage}}, {MLIL_CONST, {ConstantMediumLevelOperandUsage}}, {MLIL_CONST_PTR, {ConstantMediumLevelOperandUsage}}, + {MLIL_EXTERN_PTR, {ConstantMediumLevelOperandUsage}}, {MLIL_FLOAT_CONST, {ConstantMediumLevelOperandUsage}}, {MLIL_IMPORT, {ConstantMediumLevelOperandUsage}}, {MLIL_ADD, {LeftExprMediumLevelOperandUsage, RightExprMediumLevelOperandUsage}}, @@ -1686,6 +1687,8 @@ ExprId MediumLevelILInstruction::CopyTo(MediumLevelILFunction* dest, return dest->Const(size, GetConstant<MLIL_CONST>(), *this); case MLIL_CONST_PTR: return dest->ConstPointer(size, GetConstant<MLIL_CONST_PTR>(), *this); + case MLIL_EXTERN_PTR: + return dest->ExternPointer(size, GetConstant<MLIL_EXTERN_PTR>(), GetOffset<MLIL_EXTERN_PTR>(), *this); case MLIL_FLOAT_CONST: return dest->FloatConstRaw(size, GetConstant<MLIL_FLOAT_CONST>(), *this); case MLIL_IMPORT: @@ -2248,6 +2251,12 @@ ExprId MediumLevelILFunction::ConstPointer(size_t size, uint64_t val, const ILSo } +ExprId MediumLevelILFunction::ExternPointer(size_t size, uint64_t val, uint64_t offset, const ILSourceLocation& loc) +{ + return AddExprWithLocation(MLIL_EXTERN_PTR, loc, size, val, offset); +} + + ExprId MediumLevelILFunction::FloatConstRaw(size_t size, uint64_t val, const ILSourceLocation& loc) { return AddExprWithLocation(MLIL_FLOAT_CONST, loc, size, val); |
