Hello,
I was able to build WINE with the Intel Compiler for Linux. Intel
allows free usage for non-comercial works so I figured I would check
and see if changing compilers would yield better performance. According
to Intels site it is supposed to give a 15 to 30% speed boost in
applications. I was able to compile WINE with only about a 10 line
patch. Somehow some of of the inline asm is already getting defined by
icc. I am having some problems running graphical applications and maybe
it is related to the code I had to disable. If anyone else wants to
test I figure this might be a good tool to have if you are porting a
Winelib application and want a large performance speed up.
I was able to get all of WINE to build but was not able to run any
graphical applications due to the crash show in the attached crash.log
I was however able to run quite a few console applications including
regresion tests which showed failures quite a few failures.
If anyone is interested in building WINE with the Intel Compiler I will
be happy to test a bit but I dont have a lot of time to put in to it.
Attached is my hack.diff and the log from trying to run regedit.
1. Download ICC and run icsvar.sh
2. apply the following patch
3. Configure wine with ./configure CC=icc
4. recompile WINE.
Thanks
Steven
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
Index: wine/dlls/kernel/thread.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/thread.c,v
retrieving revision 1.17
diff -u -r1.17 thread.c
--- wine/dlls/kernel/thread.c 5 Feb 2004 17:45:31 -0000 1.17
+++ wine/dlls/kernel/thread.c 11 May 2004 20:11:43 -0000
@@ -621,11 +621,11 @@
* SetLastError (KERNEL32.@)
*/
/* void WINAPI SetLastError( DWORD error ); */
-__ASM_GLOBAL_FUNC( SetLastError,
- "movl 4(%esp),%eax\n\t"
- ".byte 0x64\n\t"
- "movl %eax,0x34\n\t"
- "ret $4" );
+//__ASM_GLOBAL_FUNC( SetLastError,
+ // "movl 4(%esp),%eax\n\t"
+ // ".byte 0x64\n\t"
+ // "movl %eax,0x34\n\t"
+ // "ret $4" );
/***********************************************************************
* GetLastError (KERNEL.148)
@@ -646,7 +646,7 @@
* GetCurrentThreadId (KERNEL32.@)
*/
/* DWORD WINAPI GetCurrentThreadId(void) */
-__ASM_GLOBAL_FUNC( GetCurrentThreadId, ".byte 0x64\n\tmovl 0x24,%eax\n\tret" );
+//__ASM_GLOBAL_FUNC( GetCurrentThreadId, ".byte 0x64\n\tmovl 0x24,%eax\n\tret" );
#else /* __i386__ */
Index: wine/dlls/ntdll/thread.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/thread.c,v
retrieving revision 1.17
diff -u -r1.17 thread.c
--- wine/dlls/ntdll/thread.c 15 Apr 2004 05:04:53 -0000 1.17
+++ wine/dlls/ntdll/thread.c 11 May 2004 20:11:46 -0000
@@ -565,7 +565,7 @@
* NtCurrentTeb (NTDLL.@)
*/
#if defined(__i386__) && defined(__GNUC__)
-__ASM_GLOBAL_FUNC( NtCurrentTeb, ".byte 0x64\n\tmovl 0x18,%eax\n\tret" );
+//__ASM_GLOBAL_FUNC( NtCurrentTeb, ".byte 0x64\n\tmovl 0x18,%eax\n\tret" );
#elif defined(__i386__) && defined(_MSC_VER)
/* Nothing needs to be done. MS C "magically" exports the inline version from winnt.h */
#else
Index: wine/libs/wine/ldt.c
===================================================================
RCS file: /home/wine/wine/libs/wine/ldt.c,v
retrieving revision 1.5
diff -u -r1.5 ldt.c
--- wine/libs/wine/ldt.c 13 Dec 2003 01:37:38 -0000 1.5
+++ wine/libs/wine/ldt.c 11 May 2004 20:11:49 -0000
@@ -471,10 +471,10 @@
__ASM_GLOBAL_FUNC( wine_get_cs, "movw %cs,%ax\n\tret" )
__ASM_GLOBAL_FUNC( wine_get_ds, "movw %ds,%ax\n\tret" )
__ASM_GLOBAL_FUNC( wine_get_es, "movw %es,%ax\n\tret" )
-__ASM_GLOBAL_FUNC( wine_get_fs, "movw %fs,%ax\n\tret" )
+//__ASM_GLOBAL_FUNC( wine_get_fs, "movw %fs,%ax\n\tret" )
__ASM_GLOBAL_FUNC( wine_get_gs, "movw %gs,%ax\n\tret" )
__ASM_GLOBAL_FUNC( wine_get_ss, "movw %ss,%ax\n\tret" )
-__ASM_GLOBAL_FUNC( wine_set_fs, "movl 4(%esp),%eax\n\tmovw %ax,%fs\n\tret" )
+//__ASM_GLOBAL_FUNC( wine_set_fs, "movl 4(%esp),%eax\n\tmovw %ax,%fs\n\tret" )
__ASM_GLOBAL_FUNC( wine_set_gs, "movl 4(%esp),%eax\n\tmovw %ax,%gs\n\tret" )
# endif /* defined(_MSC_VER) */
[EMAIL PROTECTED] tests]# wine kernel32_test.exe.so alloc
alloc.c:79: Test failed: HeapCreate allocated more Ram than it should have
alloc: 58 tests executed, 0 marked as todo, 1 failure.
[EMAIL PROTECTED] tests]# regedit
wine: Unhandled exception (thread 0009), starting debugger...
fixme:console:SetConsoleCtrlHandler (0x406b9518,1) - no error checking or testing yet
WineDbg starting on pid 8
Can't find file for ELF 'wine-kthread' ((nil))
Unsupported debug information in ELF 'wine-pthread' ((nil))
Breakpoint 1 at 0x4000d2f0 (_end+0x3fefa620)
Unsupported debug information in ELF '/usr/local/lib/libwine.so.1' (0x40028000)
No debug information in ELF '/lib/tls/libpthread.so.0' (0x40045000)
No debug information in ELF '/lib/tls/libm.so.6' (0x40056000)
No debug information in ELF '/opt/intel_cc_80/lib/libcprts.so.5' (0x40079000)
No debug information in ELF '/opt/intel_cc_80/lib/libcxa.so.5' (0x400f7000)
No debug information in ELF '/opt/intel_cc_80/lib/libunwind.so.5' (0x4011d000)
No debug information in ELF '/lib/tls/libc.so.6' (0x40123000)
No debug information in ELF '/lib/libdl.so.2' (0x4026b000)
Unsupported debug information in ELF '/lib/ld-linux.so.2' (0x40000000)
Loaded debug information from ELF '/usr/local/lib/wine/ntdll.dll.so' (0x4026f000)
Unsupported debug information in ELF '/usr/local/lib/libwine_unicode.so.1' (0x402f6000)
No debug information in ELF '/lib/libnss_files.so.2' (0x40400000)
Loaded debug information from ELF '/usr/local/lib/wine/kernel32.dll.so' (0x40520000)
Unsupported debug information in ELF '/root/.wine/dosdevices/c:/windows/regedit.exe' (0x40682000)
Unsupported debug information in ELF '/usr/local/lib/wine/msvcrt.dll.so' (0x407c0000)
Unsupported debug information in ELF '/usr/local/lib/wine/advapi32.dll.so' (0x4080d000)
Unsupported debug information in ELF '/usr/local/lib/wine/user32.dll.so' (0x40840000)
Unsupported debug information in ELF '/usr/local/lib/wine/gdi32.dll.so' (0x40986000)
No debug information in ELF '/usr/lib/libfreetype.so.6' (0x40a1b000)
No debug information in ELF '/lib/libz.so.1' (0x40a7a000)
No debug information in ELF '/usr/lib/libfontconfig.so.1' (0x40a8b000)
No debug information in ELF '/usr/lib/libexpat.so.0' (0x40ab3000)
Unsupported debug information in ELF '/usr/local/lib/wine/x11drv.dll.so' (0x40ad4000)
No debug information in ELF '/usr/X11R6/lib/libSM.so.6' (0x40b6c000)
No debug information in ELF '/usr/X11R6/lib/libICE.so.6' (0x40b75000)
No debug information in ELF '/usr/X11R6/lib/libXxf86vm.so.1' (0x40b8c000)
No debug information in ELF '/usr/X11R6/lib/libXext.so.6' (0x40b91000)
No debug information in ELF '/usr/X11R6/lib/libX11.so.6' (0x40b9f000)
No debug information in ELF '/usr/lib/tls/libGL.so.1' (0x40c81000)
No debug information in ELF '/usr/lib/tls/libGLcore.so.1' (0x40cde000)
No debug information in ELF '/usr/X11R6/lib/libXcursor.so.1' (0x41243000)
No debug information in ELF '/usr/X11R6/lib/libXrender.so.1' (0x4124c000)
No debug information in ELF '/usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2' (0x41233000)
No debug information in ELF '/usr/X11R6/lib/libXrandr.so' (0x41264000)
No debug information in ELF '/usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2' (0x4323d000)
No debug information in ELF '/usr/lib/gconv/ISO8859-1.so' (0x4325d000)
Unsupported debug information in ELF '/usr/local/lib/wine/imm32.dll.so' (0x4325f000)
No debug information in 32bit DLL 'C:\windows\regedit.exe' (0x40690000)
No debug information in 32bit DLL 'C:\WINDOWS\SYSTEM\NTDLL.DLL' (0x40290000)
No debug information in 32bit DLL 'C:\WINDOWS\SYSTEM\KERNEL32.DLL' (0x40550000)
No debug information in 32bit DLL 'C:\WINDOWS\SYSTEM\MSVCRT.DLL' (0x407e0000)
No debug information in 32bit DLL 'C:\WINDOWS\SYSTEM\ADVAPI32.DLL' (0x40820000)
No debug information in 32bit DLL 'C:\WINDOWS\SYSTEM\GDI32.DLL' (0x409a0000)
No debug information in 32bit DLL 'C:\WINDOWS\SYSTEM\USER32.DLL' (0x40870000)
No debug information in 32bit DLL 'C:\WINDOWS\SYSTEM\X11DRV.DLL' (0x40af0000)
No debug information in 32bit DLL 'C:\WINDOWS\SYSTEM\IMM32.DLL' (0x43270000)
Unhandled exception: privileged instruction in 32-bit code (0x40b5b7d8).
In 32-bit mode.
0x40b5b7d8 (DefResolution [xfont.c] in X11DRV.DLL): addb %al,%fs:0x0(%eax)
Unable to open file xfont.c
Wine-dbg>