- Remove duplicate definitions of context flags (which are already present in NDK);

- combine them using bitwise or (as in CreateFiberEx and ConvertThreadToFiberEx).

svn path=/trunk/; revision=44920
This commit is contained in:
Dmitry Gorbachev 2010-01-03 20:12:56 +00:00
parent 5e3adf9d47
commit 2f017b2356

View file

@ -9,9 +9,6 @@
#include <ndk/asm.h>
#define CONTEXT_FULL 0x10007
#define CONTEXT_FLOATING_POINT 0xF
.globl _SwitchToFiber@4
.intel_syntax noprefix
@ -29,7 +26,7 @@ _SwitchToFiber@4:
mov [eax+FIBER_CONTEXT_EBP], ebp
/* Check if we're to save FPU State */
cmp dword ptr [eax+FIBER_CONTEXT_FLAGS], CONTEXT_FULL + CONTEXT_FLOATING_POINT
cmp dword ptr [eax+FIBER_CONTEXT_FLAGS], CONTEXT_FULL | CONTEXT_FLOATING_POINT
jnz NoFpuStateSave
/* Save the FPU State (Status and Control)*/
@ -79,7 +76,7 @@ NoFpuStateSave:
mov [edx+TEB_ACTIVATION_CONTEXT_STACK_POINTER], esi
/* Restore FPU State */
cmp dword ptr [eax+FIBER_CONTEXT_FLAGS], CONTEXT_FULL + CONTEXT_FLOATING_POINT
cmp dword ptr [eax+FIBER_CONTEXT_FLAGS], CONTEXT_FULL | CONTEXT_FLOATING_POINT
jnz NoFpuStateRestore
/* Check if the Status Word Changed */