Release 950620
[wine/multimedia.git] / include / registers.h
blobed323f99213ace5fe425c811b6dac2be79866eb1
1 #ifndef __WINE_REGISTERS_H
2 #define __WINE_REGISTERS_H
4 #include <windows.h>
6 #ifndef PROCEMU
8 #include "wine.h"
10 #define EAX (context->sc_eax)
11 #define EBX (context->sc_ebx)
12 #define ECX (context->sc_ecx)
13 #define EDX (context->sc_edx)
14 #define ESI (context->sc_esi)
15 #define EDI (context->sc_edi)
17 #define AX (*(WORD*)&context->sc_eax)
18 #define BX (*(WORD*)&context->sc_ebx)
19 #define CX (*(WORD*)&context->sc_ecx)
20 #define DX (*(WORD*)&context->sc_edx)
21 #define SI (*(WORD*)&context->sc_esi)
22 #define DI (*(WORD*)&context->sc_edi)
24 #define AL (*(BYTE*)&context->sc_eax)
25 #define AH (*(((BYTE*)&context->sc_eax)+1))
26 #define BL (*(BYTE*)&context->sc_ebx)
27 #define BH (*(((BYTE*)&context->sc_ebx)+1))
28 #define CL (*(BYTE*)&context->sc_ecx)
29 #define CH (*(((BYTE*)&context->sc_ecx)+1))
30 #define DL (*(BYTE*)&context->sc_edx)
31 #define DH (*(((BYTE*)&context->sc_edx)+1))
33 #define CS (context->sc_cs)
34 #define DS (context->sc_ds)
35 #define ES (context->sc_es)
36 #define SS (context->sc_ss)
38 #ifndef __FreeBSD__
39 #define EFL (context->sc_eflags)
40 #else
41 #define EFL (context->sc_efl)
42 #endif
44 #define EIP (context->sc_eip)
45 #define ESP (context->sc_esp)
47 #define IP (*(WORD*)&context->sc_eip)
48 #define SP (*(WORD*)&context->sc_esp)
50 #define SetCflag (EFL |= 0x00000001)
51 #define ResetCflag (EFL &= 0xfffffffe)
53 #else
55 #include "bx_bochs.h"
57 #define SetCflag bx_STC()
58 #define ResetCflag bx_CLC()
60 #endif /* PROCEMU */
61 #endif /* __WINE_REGISTERS_H */