Commit 02fcbeb5 authored by André Zwing's avatar André Zwing Committed by Alexandre Julliard

wow64: Ignore Thumb flag when parsing ARM syscall number.

parent fc7e2041
......@@ -639,6 +639,7 @@ NTSTATUS WINAPI wow64_NtWow64IsProcessorFeaturePresent( UINT *args )
*/
static DWORD get_syscall_num( const BYTE *syscall )
{
WORD *arm_syscall = (WORD *)((ULONG_PTR)syscall & ~1);
DWORD id = ~0u;
if (!syscall) return id;
......@@ -650,9 +651,9 @@ static DWORD get_syscall_num( const BYTE *syscall )
break;
case IMAGE_FILE_MACHINE_ARMNT:
if (*(WORD *)syscall == 0xb40f)
if (*arm_syscall == 0xb40f)
{
DWORD inst = *(DWORD *)((WORD *)syscall + 1);
DWORD inst = *(DWORD *)(arm_syscall + 1);
id = ((inst << 1) & 0x0800) + ((inst << 12) & 0xf000) +
((inst >> 20) & 0x0700) + ((inst >> 16) & 0x00ff);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment