diff options
| author | Rusty Wagner <rusty@vector35.com> | 2018-08-21 15:47:34 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2018-08-21 15:47:34 -0400 |
| commit | 5841af2db8e8dcf4e0da0c438ac040c5fa90038b (patch) | |
| tree | 45512fef65afea712ad5e87bea9a27455f751e5a /mediumlevelilinstruction.cpp | |
| parent | 8e320c4be695cd47ae93673320d525ce513cec90 (diff) | |
Add return hint MLIL instruction (used in intermediate stages, not emitted in final forms)
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..93587c34 100644 --- a/mediumlevelilinstruction.cpp +++ b/mediumlevelilinstruction.cpp @@ -122,6 +122,7 @@ unordered_map<BNMediumLevelILOperation, vector<MediumLevelILOperandUsage>> {MLIL_ADDRESS_OF_FIELD, {SourceVariableMediumLevelOperandUsage, OffsetMediumLevelOperandUsage}}, {MLIL_JUMP, {DestExprMediumLevelOperandUsage}}, {MLIL_JUMP_TO, {DestExprMediumLevelOperandUsage, TargetListMediumLevelOperandUsage}}, + {MLIL_RET_HINT, {DestExprMediumLevelOperandUsage}}, {MLIL_CALL, {OutputVariablesMediumLevelOperandUsage, DestExprMediumLevelOperandUsage, ParameterExprsMediumLevelOperandUsage}}, {MLIL_CALL_UNTYPED, {OutputVariablesSubExprMediumLevelOperandUsage, DestExprMediumLevelOperandUsage, @@ -1322,6 +1323,7 @@ void MediumLevelILInstruction::VisitExprs(const std::function<bool(const MediumL case MLIL_BOOL_TO_INT: case MLIL_JUMP: case MLIL_JUMP_TO: + case MLIL_RET_HINT: case MLIL_IF: case MLIL_UNIMPL_MEM: case MLIL_LOAD: @@ -1591,6 +1593,7 @@ ExprId MediumLevelILInstruction::CopyTo(MediumLevelILFunction* dest, case MLIL_LOW_PART: case MLIL_BOOL_TO_INT: case MLIL_JUMP: + case MLIL_RET_HINT: case MLIL_UNIMPL_MEM: case MLIL_FSQRT: case MLIL_FNEG: @@ -2497,6 +2500,12 @@ ExprId MediumLevelILFunction::JumpTo(ExprId dest, const vector<BNMediumLevelILLa } +ExprId MediumLevelILFunction::ReturnHint(ExprId dest, const ILSourceLocation& loc) +{ + return AddExprWithLocation(MLIL_RET_HINT, loc, 0, dest); +} + + ExprId MediumLevelILFunction::Call(const vector<Variable>& output, ExprId dest, const vector<ExprId>& params, const ILSourceLocation& loc) { |
