wow64: Forward NtWow64IsProcessorFeaturePresent() to the CPU backend.

This commit is contained in:
Alexandre Julliard 2023-03-15 11:50:46 +01:00
parent 5a1d431b4b
commit 911cdcda04
3 changed files with 14 additions and 1 deletions

View file

@ -102,6 +102,7 @@ static WOW64INFO *wow64info;
/* cpu backend dll functions */
static void * (WINAPI *pBTCpuGetBopCode)(void);
static NTSTATUS (WINAPI *pBTCpuGetContext)(HANDLE,HANDLE,void *,void *);
static BOOLEAN (WINAPI *pBTCpuIsProcessorFeaturePresent)(UINT);
static void (WINAPI *pBTCpuProcessInit)(void);
static NTSTATUS (WINAPI *pBTCpuSetContext)(HANDLE,HANDLE,void *,void *);
static void (WINAPI *pBTCpuThreadInit)(void);
@ -629,7 +630,7 @@ NTSTATUS WINAPI wow64_NtWow64IsProcessorFeaturePresent( UINT *args )
{
UINT feature = get_ulong( &args );
return RtlIsProcessorFeaturePresent( feature );
return pBTCpuIsProcessorFeaturePresent && pBTCpuIsProcessorFeaturePresent( feature );
}
@ -835,6 +836,7 @@ static DWORD WINAPI process_init( RTL_RUN_ONCE *once, void *param, void **contex
module = load_64bit_module( get_cpu_dll_name() );
GET_PTR( BTCpuGetBopCode );
GET_PTR( BTCpuGetContext );
GET_PTR( BTCpuIsProcessorFeaturePresent );
GET_PTR( BTCpuProcessInit );
GET_PTR( BTCpuThreadInit );
GET_PTR( BTCpuResetToConsistentState );

View file

@ -352,6 +352,16 @@ void * WINAPI __wine_get_unix_opcode(void)
}
/**********************************************************************
* BTCpuIsProcessorFeaturePresent (wow64cpu.@)
*/
BOOLEAN WINAPI BTCpuIsProcessorFeaturePresent( UINT feature )
{
/* assume CPU features are the same for 32- and 64-bit */
return RtlIsProcessorFeaturePresent( feature );
}
/**********************************************************************
* BTCpuGetContext (wow64cpu.@)
*/

View file

@ -1,5 +1,6 @@
@ stdcall BTCpuGetBopCode()
@ stdcall BTCpuGetContext(long long ptr ptr)
@ stdcall BTCpuIsProcessorFeaturePresent(long)
@ stdcall BTCpuProcessInit()
@ stdcall BTCpuResetToConsistentState(ptr)
@ stdcall BTCpuSetContext(long long ptr ptr)