2 * Helper functions for ntdll
10 #include "debugtools.h"
11 #include "ntdll_misc.h"
13 DEFAULT_DEBUG_CHANNEL(ntdll);
15 #if defined(__GNUC__) && defined(__i386__)
16 #define DO_FPU(x,y) __asm__ __volatile__( x " %0;fwait" : "=m" (y) : )
17 #define POP_FPU(x) DO_FPU("fstpl",x)
20 void dump_ObjectAttributes (const OBJECT_ATTRIBUTES *oa)
23 TRACE("%p:(name=%s, attr=0x%08lx, hRoot=0x%08x, sd=%p) \n",
24 oa, debugstr_us(oa->ObjectName),
25 oa->Attributes, oa->RootDirectory, oa->SecurityDescriptor);
28 LPCSTR debugstr_us( const UNICODE_STRING *us )
30 if (!us) return "<null>";
31 return debugstr_wn(us->Buffer, us->Length);
34 /*********************************************************************
40 #if defined(__GNUC__) && defined(__i386__)
41 LONG __cdecl NTDLL__ftol(void)
43 /* don't just do DO_FPU("fistp",retval), because the rounding
44 * mode must also be set to "round towards zero"... */
49 #endif /* defined(__GNUC__) && defined(__i386__) */
51 /*********************************************************************
55 * Should be register function
59 #if !defined(__GNUC__) && defined(__i386__)
60 LONG __cdecl NTDLL__ftol(double fl)
62 FIXME("should be register function\n");
65 #endif /* !defined(__GNUC__) && defined(__i386__) */
67 /*********************************************************************
73 LONG __cdecl NTDLL__ftol(double fl)
77 #endif /* !defined(__i386__) */
79 /*********************************************************************
84 #if defined(__GNUC__) && defined(__i386__)
85 double __cdecl NTDLL__CIpow(void)
92 #endif /* defined(__GNUC__) && defined(__i386__) */
95 /*********************************************************************
99 * Should be register function
104 #if !defined(__GNUC__) && defined(__i386__)
105 double __cdecl NTDLL__CIpow(double x,double y)
107 FIXME("should be register function\n");
110 #endif /* !defined(__GNUC__) && defined(__i386__) */
112 /*********************************************************************
118 double __cdecl NTDLL__CIpow(double x,double y)
122 #endif /* !defined(__i386__) */