Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Core/Libraries/Source/WWVegas/WWMath/wwmath.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,10 @@ WWINLINE long WWMath::Float_To_Long(double f)
{
#if defined(_MSC_VER) && defined(_M_IX86)
long retval;
__asm fld qword ptr [f]
__asm fistp dword ptr [retval]
__asm {
fld qword ptr [f]
fistp dword ptr [retval]
}
return retval;
#else
return (long) f;
Expand Down
20 changes: 12 additions & 8 deletions Core/Libraries/Source/profile/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,24 @@ class ProfileFastCS
#define ts_lock _emit 0xF0
DASSERT(((unsigned)&nFlag % 4) == 0);

__asm mov ebx, [nFlag]
__asm ts_lock
__asm bts dword ptr [ebx], 0
__asm jc The_Bit_Was_Previously_Set_So_Try_Again
__asm {
mov ebx, [nFlag]
ts_lock
bts dword ptr [ebx], 0
jc The_Bit_Was_Previously_Set_So_Try_Again
}
return;

The_Bit_Was_Previously_Set_So_Try_Again:
// can't use SwitchToThread() here because Win9X doesn't have it!
if (testEvent)
::WaitForSingleObject(testEvent,1);
__asm mov ebx, [nFlag]
__asm ts_lock
__asm bts dword ptr [ebx], 0
__asm jc The_Bit_Was_Previously_Set_So_Try_Again
__asm {
mov ebx, [nFlag]
ts_lock
bts dword ptr [ebx], 0
jc The_Bit_Was_Previously_Set_So_Try_Again
}
}

void ThreadSafeClearFlag()
Expand Down
Loading