当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 2 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : Wine patch for Intel ICC
帖子发表于 : 2008-08-28 21:44 

注册: 2008-06-29 12:02
帖子: 34
送出感谢: 0 次
接收感谢: 0 次
1.1.3适用,搜索来的,分享下,发不了附件,改名为.patch即可。
:)
引用:
From 50802f1871ea1571ad12176428f2f0233a9b6ae3 Mon Sep 17 00:00:00 2001
From: Steven Edwards <winehacker@gmail.com>
Date: Wed, 9 Apr 2008 18:40:06 -0400
Subject: [PATCH] icc hacks

---
dlls/kernel32/sync.c | 2 ++
dlls/kernel32/thread.c | 2 ++
dlls/mountmgr.sys/mountmgr.c | 4 ++--
dlls/ntdll/signal_i386.c | 5 +++--
dlls/ntdll/thread.c | 2 +-
dlls/ntoskrnl.exe/ntoskrnl.c | 2 +-
dlls/oleaut32/variant.c | 4 ++++
include/ddk/wdm.h | 4 ++++
libs/wine/ldt.c | 4 ++++
programs/winefile/winefile.c | 2 +-
10 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/dlls/kernel32/sync.c b/dlls/kernel32/sync.c
index 06efdec..0c2f03b 100644
--- a/dlls/kernel32/sync.c
+++ b/dlls/kernel32/sync.c
@@ -2005,12 +2005,14 @@ BOOL WINAPI AssignProcessToJobObject( HANDLE hJob, HANDLE hProcess )
* InterlockedCompareExchange (KERNEL32.@)
*/
/* LONG WINAPI InterlockedCompareExchange( PLONG dest, LONG xchg, LONG compare ); */
+#ifndef __INTEL_COMPILER
__ASM_GLOBAL_FUNC(InterlockedCompareExchange,
"movl 12(%esp),%eax\n\t"
"movl 8(%esp),%ecx\n\t"
"movl 4(%esp),%edx\n\t"
"lock; cmpxchgl %ecx,(%edx)\n\t"
"ret $12")
+#endif

/***********************************************************************
* InterlockedExchange (KERNEL32.@)
diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c
index b280693..057ef9e 100644
--- a/dlls/kernel32/thread.c
+++ b/dlls/kernel32/thread.c
@@ -586,11 +586,13 @@ HANDLE WINAPI GetCurrentThread(void)
* SetLastError (KERNEL32.@)
*/
/* void WINAPI SetLastError( DWORD error ); */
+#ifndef __INTEL_COMPILER
__ASM_GLOBAL_FUNC( SetLastError,
"movl 4(%esp),%eax\n\t"
".byte 0x64\n\t"
"movl %eax,0x34\n\t"
"ret $4" )
+#endif

/***********************************************************************
* GetLastError (KERNEL.148)
diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c
index ee819a5..e48ae03 100644
--- a/dlls/mountmgr.sys/mountmgr.c
+++ b/dlls/mountmgr.sys/mountmgr.c
@@ -330,7 +330,7 @@ static NTSTATUS query_mount_points( const void *in_buff, SIZE_T insize,
/* handler for ioctls on the mount manager device */
static NTSTATUS WINAPI mountmgr_ioctl( DEVICE_OBJECT *device, IRP *irp )
{
- IO_STACK_LOCATION *irpsp = irp->Tail.Overlay.s.u.CurrentStackLocation;
+ IO_STACK_LOCATION *irpsp = irp->Tail.Overlay.s.CurrentStackLocation;

TRACE( "ioctl %x insize %u outsize %u\n",
irpsp->Parameters.DeviceIoControl.IoControlCode,
@@ -359,7 +359,7 @@ static NTSTATUS WINAPI mountmgr_ioctl( DEVICE_OBJECT *device, IRP *irp )
/* handler for ioctls on the harddisk device */
static NTSTATUS WINAPI harddisk_ioctl( DEVICE_OBJECT *device, IRP *irp )
{
- IO_STACK_LOCATION *irpsp = irp->Tail.Overlay.s.u.CurrentStackLocation;
+ IO_STACK_LOCATION *irpsp = irp->Tail.Overlay.s.CurrentStackLocation;
struct disk_device_info *disk_info = device->DeviceExtension;

TRACE( "ioctl %x insize %u outsize %u\n",
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index d9c6aba..b5de07b 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -994,8 +994,8 @@ static BOOL check_atl_thunk( EXCEPTION_RECORD *rec, CONTEXT *context )
{
*((DWORD *)context->Esp + 1) = thunk->this;
context->Eip = (DWORD_PTR)(&thunk->func + 1) + thunk->func;
- TRACE( "emulating ATL thunk at %p, func=%08x arg=%08x\n",
- thunk, context->Eip, *((DWORD *)context->Esp + 1) );
+// TRACE( "emulating ATL thunk at %p, func=%08x arg=%08x\n",
+// thunk, context->Eip, *((DWORD *)context->Esp + 1) );
ret = TRUE;
}
}
@@ -1004,6 +1004,7 @@ static BOOL check_atl_thunk( EXCEPTION_RECORD *rec, CONTEXT *context )
return FALSE;
}
__ENDTRY
+
return ret;
}

diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 4298e95..f836578 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -1436,7 +1436,7 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
/**********************************************************************
* NtCurrentTeb (NTDLL.@)
*/
-#if defined(__i386__) && defined(__GNUC__)
+#if defined(__i386__) && defined(__GNUC__) && !defined(__INTEL_COMPILER)

__ASM_GLOBAL_FUNC( NtCurrentTeb, ".byte 0x64\n\tmovl 0x18,%eax\n\tret" )

diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index cf1603a..1dc8e3a 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -143,7 +143,7 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff,
irp.AssociatedIrp.SystemBuffer = in_buff;
irp.UserBuffer = out_buff;
irp.MdlAddress = &mdl;
- irp.Tail.Overlay.s.u.CurrentStackLocation = &irpsp;
+ irp.Tail.Overlay.s.CurrentStackLocation = &irpsp;

irpsp.MajorFunction = IRP_MJ_DEVICE_CONTROL;
irpsp.Parameters.DeviceIoControl.OutputBufferLength = *out_size;
diff --git a/dlls/oleaut32/variant.c b/dlls/oleaut32/variant.c
index abfcfcc..051a718 100644
--- a/dlls/oleaut32/variant.c
+++ b/dlls/oleaut32/variant.c
@@ -85,9 +85,12 @@ static inline HRESULT VARIANT_Coerce(VARIANTARG* pd, LCID lcid, USHORT wFlags,
VARTYPE vtFrom = V_TYPE(ps);
DWORD dwFlags = 0;

+#ifndef __INTEL_COMPILER
+
TRACE("(%p->(%s%s),0x%08x,0x%04x,%p->(%s%s),%s%s)\n", pd, debugstr_VT(pd),
debugstr_VF(pd), lcid, wFlags, ps, debugstr_VT(ps), debugstr_VF(ps),
debugstr_vt(vt), debugstr_vf(vt));
+#endif

if (vt == VT_BSTR || vtFrom == VT_BSTR)
{
@@ -5932,3 +5935,4 @@ VarImp_Exit:

return hres;
}
+
diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h
index 931a130..a5ec440 100644
--- a/include/ddk/wdm.h
+++ b/include/ddk/wdm.h
@@ -276,7 +276,11 @@ typedef struct _IRP {
union {
struct _IO_STACK_LOCATION *CurrentStackLocation;
ULONG PacketType;
+#ifndef __INTEL_COMPILER
} DUMMYUNIONNAME;
+#else
+ };
+#endif
} DUMMYSTRUCTNAME;
struct _FILE_OBJECT *OriginalFileObject;
} Overlay;
diff --git a/libs/wine/ldt.c b/libs/wine/ldt.c
index c46ff6f..41e4734 100644
--- a/libs/wine/ldt.c
+++ b/libs/wine/ldt.c
@@ -482,10 +482,14 @@ void wine_ldt_free_fs( unsigned short sel )
__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" )
+#ifndef __INTEL_COMPILER
__ASM_GLOBAL_FUNC( wine_get_fs, "movw %fs,%ax\n\tret" )
+#endif
__ASM_GLOBAL_FUNC( wine_get_gs, "movw %gs,%ax\n\tret" )
__ASM_GLOBAL_FUNC( wine_get_ss, "movw %ss,%ax\n\tret" )
+#ifndef __INTEL_COMPILER
__ASM_GLOBAL_FUNC( wine_set_fs, "movl 4(%esp),%eax\n\tmovw %ax,%fs\n\tret" )
+#endif
__ASM_GLOBAL_FUNC( wine_set_gs, "movl 4(%esp),%eax\n\tmovw %ax,%gs\n\tret" )
# endif /* defined(_MSC_VER) */

diff --git a/programs/winefile/winefile.c b/programs/winefile/winefile.c
index d21f595..682866b 100644
--- a/programs/winefile/winefile.c
+++ b/programs/winefile/winefile.c
@@ -321,7 +321,7 @@ static int msvcrt_swprintf(WCHAR* buffer, const WCHAR* fmt, ...)

if (!pvswprintf) {
HMODULE hModMsvcrt = LoadLibraryA("msvcrt");
- pvswprintf = (int(__cdecl*)(WCHAR*,const WCHAR*,va_list)) GetProcAddress(hModMsvcrt, "vswprintf");
+ pvswprintf = GetProcAddress(hModMsvcrt, "vswprintf");
}

va_start(ap, fmt);
--
1.5.3.7




页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2008-09-17 23:59 

注册: 2008-01-28 12:48
帖子: 88
送出感谢: 0 次
接收感谢: 0 次
没有过,先下了再说。


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 2 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 3 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译