NTDLL doesn't compile under Clang

Marcus Meissner marcus at jet.franken.de
Sun May 29 13:58:21 CDT 2011


On Sun, May 29, 2011 at 12:43:35PM -0600, Charles Davis wrote:
> On 5/29/11 12:41 PM, C.W. Betts wrote:
> > When compiling the NTDLL component of Wine, I get the following error:
> > ../../../wine-git/./dlls/ntdll/large_int.c:267:13: error: unknown use of
> >       instruction mnemonic without a size suffix
> >     __asm__("div %4,%%eax"
> >             ^
> > <inline asm>:1:2: note: instantiated into assembly here
> >         div 12(%esp),%eax
> >         ^
> > I'm using Clang 2.0 from Xcode 4.0
> That's a Clang bug that's already been fixed. Sadly, it didn't make it
> into Xcode 4.0.

Try this patch?

Ciao, Marcus

Subject: [PATCH] ntdll: specify div to be divl

Hi,

avoids a clang build issue.

Ciao, Marcus
---
 dlls/ntdll/large_int.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/ntdll/large_int.c b/dlls/ntdll/large_int.c
index cb98bae..54ce6b0 100644
--- a/dlls/ntdll/large_int.c
+++ b/dlls/ntdll/large_int.c
@@ -264,7 +264,7 @@ UINT WINAPI RtlEnlargedUnsignedDivide( ULONGLONG a, UINT b, UINT *remptr )
     p1 = a >> 32;
     p2 = a &  0xffffffffLL;
 
-    __asm__("div %4,%%eax"
+    __asm__("divl %4,%%eax"
             : "=a" (ret), "=d" (rem)
             : "0" (p2), "1" (p1), "g" (b) );
     if (remptr) *remptr = rem;
-- 
1.7.3.4




More information about the wine-devel mailing list