Skip to content

Commit 5d4be29

Browse files
ItsBruhsgompoc
authored andcommitted
Support call <register> in X86InstructionSet
1 parent 6eaa22d commit 5d4be29

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Cpp2IL.Core/InstructionSets/X86InstructionSet.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,11 @@ static InstructionSetIndependentOperand ConvertVector(string reg, int imm) =>
358358

359359
var target = instruction.NearBranchTarget;
360360

361-
if (context.AppContext.MethodsByAddress.TryGetValue(target, out var possibleMethods))
361+
if (instruction.Op0Kind == OpKind.Register)
362+
{
363+
builder.CallRegister(instruction.IP, ConvertOperand(instruction, 0));
364+
}
365+
else if (context.AppContext.MethodsByAddress.TryGetValue(target, out var possibleMethods))
362366
{
363367
if (possibleMethods.Count == 1)
364368
{

0 commit comments

Comments
 (0)