Skip to content

Commit

Permalink
BUGFIX: Assign non-zero original offset ranges to phi nodes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Washi1337 committed May 23, 2024
1 parent c38555a commit 1248bf9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Core/Echo.Ast/Construction/LiftedNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ public LiftedNode(ControlFlowNode<TInstruction> original)
public SyntheticVariable DeclareStackInput()
{
var result = new SyntheticVariable(Original.Offset, StackInputs.Count, SyntheticVariableKind.StackIn);
StackInputs.Insert(0, new PhiStatement<TInstruction>(result));
var phiStatement = new PhiStatement<TInstruction>(result)
{
OriginalRange = new AddressRange(Original.Offset, Original.Offset)
};

StackInputs.Insert(0, phiStatement);
return result;
}

Expand Down

0 comments on commit 1248bf9

Please sign in to comment.