ilovetech Posted June 24, 2009 Share Posted June 24, 2009 guys i have a question regarding the 32bit applications running in 64bit windows. i want to know whether the processor (capable of EM64T) switches from 64bit mode to 32bit mode when it have to run a 32bit application in 64bit OS or whether windows implement a compatibility layer that translates the 32bit code to 64bit. and what role WOW64 plays??? Link to comment Share on other sites More sharing options...
Eric Veteran Posted June 24, 2009 Veteran Share Posted June 24, 2009 It has a "thunking" layer that constrains the 32-bit apps to what they're capable of handling. It doesn't make the processor switch modes. WoW64 is the layer that translates the 32-bit app's calls to the 64-bit libraries in Windows. Link to comment Share on other sites More sharing options...
ilovetech Posted June 24, 2009 Author Share Posted June 24, 2009 It has a "thunking" layer that constrains the 32-bit apps to what they're capable of handling. It doesn't make the processor switch modes. WoW64 is the layer that translates the 32-bit app's calls to the 64-bit libraries in Windows. thanks for your information but i'm still a bit confused after reading a article in wikipedia for WOW64. it says it has Wow64cpu.dll that switches processor modes as well Wow64.dll Wow64win.dll that translates the code. if that is true than what is need to "switch" if translation is done OR why to translate when we can "switch". Link to comment Share on other sites More sharing options...
null_ Posted June 24, 2009 Share Posted June 24, 2009 Despite its outwardly similar appearance on all versions of 64-bit Windows, WOW64's implementation varies depending on the target processor architecture. For example, the version of 64-bit Windows developed for the Intel Itanium 2 processor (known at Microsoft as IA-64 architecture) uses Wow64win.dll to set up the emulation of x86 instructions within the Itanium 2's unique instruction set. This emulation is a more computationally expensive task than the Wow64win.dll's functions on the x86-64 (x64) architecture, which switches the processor hardware from its 64-bit mode to compatibility mode when it's time to execute a 32-bit thread, and then handles the switch back to 64-bit mode. No emulation is required for WOW64 on x86-64 (x64). Link to comment Share on other sites More sharing options...
hdood Posted June 24, 2009 Share Posted June 24, 2009 (edited) thanks for your information but i'm still a bit confused after reading a article in wikipedia for WOW64. it says it has Wow64cpu.dll that switches processor modes as well Wow64.dll Wow64win.dll that translates the code. if that is true than what is need to "switch" if translation is done OR why to translate when we can "switch". Wow64CPU.dll switches the CPU into compatibility mode where it runs 32-bit code, and then back again to run 64-bit. This is basically free on x64 (AMD64) processors and has no real performance impact. On IA64 (Itanium) processors which can't run x86 code directly, it also implements emulation. Wow64.dll essentially provides an emulated 32-bit kernel, so that when a 32-bit process calls a function in the kernel, the emulator translates all the variables back and forth between 32-bit and 64-bit before passing it to the real 64-bit kernel. Wow64Win.dll does the same kind of translations, except for some non-kernel Windows APIs (although they do run in kernel mode). This is actually only a small subset of all the APIs, mostly dealing with windowing and graphics. For other things, WOW64 includes a full set of 32-bit DLLs that implement all the other APIs. Edited June 24, 2009 by hdood Link to comment Share on other sites More sharing options...
Recommended Posts