Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cpp2IL.Core/InstructionSets/NewArmV8InstructionSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ void AddCall(MethodAnalysisContext context, object? returnRegister2, ulong addre
case Arm64Mnemonic.ADRP:
//Just handle as a move
Add(address, OpCode.Move, ConvertOperand(instruction, 0), ConvertOperand(instruction, 1));
adrpOffsets[instruction.Op0Reg] = (ulong)instruction.Op1Imm;
var pageAddress = address & ~0xFFFUL;
adrpOffsets[instruction.Op0Reg] = (ulong)((long)pageAddress + instruction.Op1Imm);
break;
case Arm64Mnemonic.LDP when instruction.Op2Kind == Arm64OperandKind.Memory:
//LDP (dest1, dest2, [mem]) - basically just treat as two loads, with the second offset by the length of the first
Expand Down
Loading