1 #ifndef __WINE_REGISTERS_H
2 #define __WINE_REGISTERS_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)
16 #define EBP (context->sc_ebp)
18 #define AX (*(WORD*)&context->sc_eax)
19 #define BX (*(WORD*)&context->sc_ebx)
20 #define CX (*(WORD*)&context->sc_ecx)
21 #define DX (*(WORD*)&context->sc_edx)
22 #define SI (*(WORD*)&context->sc_esi)
23 #define DI (*(WORD*)&context->sc_edi)
24 #define BP (*(WORD*)&context->sc_ebp)
26 #define AL (*(BYTE*)&context->sc_eax)
27 #define AH (*(((BYTE*)&context->sc_eax)+1))
28 #define BL (*(BYTE*)&context->sc_ebx)
29 #define BH (*(((BYTE*)&context->sc_ebx)+1))
30 #define CL (*(BYTE*)&context->sc_ecx)
31 #define CH (*(((BYTE*)&context->sc_ecx)+1))
32 #define DL (*(BYTE*)&context->sc_edx)
33 #define DH (*(((BYTE*)&context->sc_edx)+1))
35 #define CS (context->sc_cs)
36 #define DS (context->sc_ds)
37 #define ES (context->sc_es)
38 #define SS (context->sc_ss)
41 #define FS (context->sc_fs)
42 #define GS (context->sc_gs)
43 #else /* FIXME: are fs and gs supported under *BSD? */
49 #define EFL (context->sc_eflags)
50 #define FL (*(WORD*)&context->sc_eflags)
52 #define EFL (context->sc_efl)
53 #define FL (*(WORD*)&context->sc_efl)
56 #define EIP (context->sc_eip)
57 #define ESP (context->sc_esp)
59 #define IP (*(WORD*)&context->sc_eip)
60 #define SP (*(WORD*)&context->sc_esp)
62 #define SetCflag (EFL |= 0x00000001)
63 #define ResetCflag (EFL &= 0xfffffffe)
69 #define SetCflag bx_STC()
70 #define ResetCflag bx_CLC()
73 #endif /* __WINE_REGISTERS_H */