[Wine] An idea on operation Wine on ARM

kumiisater wineforum-user at winehq.org
Tue Jan 11 09:18:48 CST 2011


Hello everybody.
As you know, Microsoft is going to release Windows 8 and MS Office for ARM sometime in 2012. (via microsoft.com (http://www.microsoft.com/Presspass/Features/2011/jan11/01-05SinofskySOC.mspx))


[Image: http://farm6.static.flickr.com/5122/5327810963_600225392b_z.jpg ]


[Image: http://microgeek.ru/upload/blog/conf/168/168484c1099a3b5337af987163ef9489.png ]

ARM edition of Windows 8 will surely be able to launch old x86 programs through emulation layer. But I think sooner or later wine will have its own emulation layer, which will lead to decrease in performance of x86 applications. I'd like to suggest an idea that might speed up x86 application on ARM version of wine. This consists in caching x86 assembly codes converted to ARM assembly codes.
After its installing first wine creates separate wineprefix (to which it will store cached binaries) for every single application. Then wine makes full dublicates for binaries which the application consists of. Once an application started (from its original directory, not dublicated one), wine "listens" to application's calls. If one gives a call directly to processor, wine memorizes the number of string in which this call happened and the name of binary. Wine repeats this procedure for each call to the processor until the application terminates. But, of course, the application at its run-time fully goes through wine's emulation layer for the first time.
After this wine goes to the directory where duplicated binaries are and in every binary finds every line which contains a direct call to processor and replaces it with analogic command for ARM processors and saves modified binary.
For the second time and onwards wine launches application from dublicated directory.
Since at its runtime the application uses not all binary resources, wine should continiously "listen" to an application and repeat actions described for the first time. Thus, the more the number of runs of the application was, the more calls to processors will operate as native.


What is different from the variant in which wine would emulate every single call to the processor:
Firstly, by using binaries with already converted instructions wine gains more performance.
Secondly, the more the number of runs of the application was, the more speed will be obtained by the application.

Regards.







More information about the wine-users mailing list