Skip to content

Commit

Permalink
Support call <register> in X86InstructionSet
Browse files Browse the repository at this point in the history
  • Loading branch information
MrUser127 authored and gompoc committed Dec 17, 2024
1 parent 6eaa22d commit 5d4be29
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Cpp2IL.Core/InstructionSets/X86InstructionSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,11 @@ static InstructionSetIndependentOperand ConvertVector(string reg, int imm) =>

var target = instruction.NearBranchTarget;

if (context.AppContext.MethodsByAddress.TryGetValue(target, out var possibleMethods))
if (instruction.Op0Kind == OpKind.Register)
{
builder.CallRegister(instruction.IP, ConvertOperand(instruction, 0));
}
else if (context.AppContext.MethodsByAddress.TryGetValue(target, out var possibleMethods))
{
if (possibleMethods.Count == 1)
{
Expand Down

0 comments on commit 5d4be29

Please sign in to comment.