From 68a9e96c98dbed4e4154a13ffec7b9c94876661a Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Mon, 27 Apr 2020 23:14:44 -0400 Subject: Add names for goto labels --- highlevelilinstruction.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'highlevelilinstruction.cpp') diff --git a/highlevelilinstruction.cpp b/highlevelilinstruction.cpp index b5c3e7ed..88f833e0 100644 --- a/highlevelilinstruction.cpp +++ b/highlevelilinstruction.cpp @@ -793,6 +793,13 @@ void HighLevelILInstructionBase::UpdateRawOperand(size_t operandIndex, ExprId va } +void HighLevelILInstructionBase::UpdateRawOperandAsInteger(size_t operandIndex, uint64_t value) +{ + operands[operandIndex] = value; + function->UpdateInstructionOperand(exprIndex, operandIndex, value); +} + + void HighLevelILInstructionBase::UpdateRawOperandAsExprList(size_t operandIndex, const vector& exprs) { vector exprIndexList; @@ -2208,11 +2215,11 @@ uint32_t HighLevelILInstruction::GetIntrinsic() const } -size_t HighLevelILInstruction::GetTarget() const +uint64_t HighLevelILInstruction::GetTarget() const { size_t operandIndex; if (GetOperandIndexForUsage(TargetHighLevelOperandUsage, operandIndex)) - return GetRawOperandAsIndex(operandIndex); + return GetRawOperandAsInteger(operandIndex); throw HighLevelILInstructionAccessException(); } @@ -2410,13 +2417,13 @@ ExprId HighLevelILFunction::NoReturn(const ILSourceLocation& loc) } -ExprId HighLevelILFunction::Goto(size_t target, const ILSourceLocation& loc) +ExprId HighLevelILFunction::Goto(uint64_t target, const ILSourceLocation& loc) { return AddExprWithLocation(HLIL_GOTO, loc, 0, target); } -ExprId HighLevelILFunction::Label(size_t target, const ILSourceLocation& loc) +ExprId HighLevelILFunction::Label(uint64_t target, const ILSourceLocation& loc) { return AddExprWithLocation(HLIL_LABEL, loc, 0, target); } -- cgit v1.3.1