4 * Copyright 1995 Alexandre Julliard
7 #ifndef __WINE_SELECTORS_H
8 #define __WINE_SELECTORS_H
13 extern WORD SELECTOR_AllocBlock( const void *base, DWORD size,
14 enum seg_type type, BOOL32 is32bit,
16 extern WORD SELECTOR_ReallocBlock( WORD sel, const void *base, DWORD size,
17 enum seg_type type, BOOL32 is32bit,
19 extern void SELECTOR_MoveBlock( WORD sel, const void *new_base );
20 extern void SELECTOR_FreeBlock( WORD sel, WORD count );
23 # define __GET_SEG(seg,res) __asm__( "movw %%" seg ",%w0" : "=r" (res) )
24 # define __SET_SEG(seg,val) __asm__( "movw %w0,%%" seg : : "r" (val) )
26 # define __GET_SEG(seg,res) ((res) = 0)
27 # define __SET_SEG(seg,val) /* nothing */
30 #define GET_CS(cs) __GET_SEG("cs",cs)
31 #define GET_DS(ds) __GET_SEG("ds",ds)
32 #define GET_ES(es) __GET_SEG("es",es)
33 #define GET_FS(fs) __GET_SEG("fs",fs)
34 #define GET_GS(gs) __GET_SEG("gs",gs)
35 #define GET_SS(ss) __GET_SEG("ss",ss)
37 #define SET_CS(cs) __SET_SEG("cs",cs)
38 #define SET_DS(ds) __SET_SEG("ds",ds)
39 #define SET_ES(es) __SET_SEG("es",es)
40 #define SET_FS(fs) __SET_SEG("fs",fs)
41 #define SET_GS(gs) __SET_SEG("gs",gs)
42 #define SET_SS(ss) __SET_SEG("ss",ss)
44 #endif /* __WINE_SELECTORS_H */