Some fixes for compiling on Sparc.

This commit is contained in:
Warren Baird 2002-05-16 23:08:01 +00:00 committed by Alexandre Julliard
parent a0994a7d42
commit c43b5c8f11
3 changed files with 21 additions and 5 deletions

View File

@ -65,12 +65,12 @@ typedef struct _MSVCRT_EXCEPTION_FRAME
#define TRYLEVEL_END 0xffffffff /* End of trylevel list */
#if defined(__GNUC__) && defined(__i386__)
inline static void call_finally_block( void *code_block, void *base_ptr )
{
__asm__ __volatile__ ("movl %1,%%ebp; call *%%eax" \
: : "a" (code_block), "g" (base_ptr));
}
#endif
static DWORD MSVCRT_nested_handler(PEXCEPTION_RECORD rec,
struct __EXCEPTION_FRAME* frame,
@ -82,7 +82,6 @@ static DWORD MSVCRT_nested_handler(PEXCEPTION_RECORD rec,
*dispatch = frame;
return ExceptionCollidedUnwind;
}
#endif
/*********************************************************************

View File

@ -572,7 +572,12 @@ unsigned int _control87(unsigned int newval, unsigned int mask)
*/
unsigned int _controlfp(unsigned int newval, unsigned int mask)
{
#ifdef __i386__
return _control87( newval, mask & ~_EM_DENORMAL );
#else
FIXME(":Not Implemented!\n");
return 0;
#endif
}
/*********************************************************************
@ -699,7 +704,13 @@ LONGLONG MSVCRT_div(int num, int denom)
*/
MSVCRT_div_t MSVCRT_div(int num, int denom)
{
return div(num,denom);
div_t dt = div(num,denom);
MSVCRT_div_t ret;
ret.quot = dt.quot;
ret.rem = dt.rem;
return ret;
}
#endif /* ifdef __i386__ */
@ -725,7 +736,13 @@ ULONGLONG MSVCRT_ldiv(long num, long denom)
*/
MSVCRT_ldiv_t MSVCRT_ldiv(long num, long denom)
{
return ldiv(num,denom);
ldiv_t result = ldiv(num,denom);
MSVCRT_ldiv_t ret;
ret.quot = result.quot;
ret.rem = result.rem;
return ret;
}
#endif /* ifdef __i386__ */

View File

@ -410,7 +410,7 @@ __ASM_GLOBAL_FUNC( SNOOP_Return,
".long " __ASM_NAME("SNOOP_DoReturn") ",0" );
#else /* !__i386__ */
void SNOOP_RegisterDLL(HMODULE hmod,LPCSTR name,DWORD nrofordinals) {
void SNOOP_RegisterDLL(HMODULE hmod,LPCSTR name,DWORD nrofordinals, DWORD dw) {
if (!TRACE_ON(snoop)) return;
FIXME("snooping works only on i386 for now.\n");
}