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
, BOOL is32bit
,
16 extern WORD
SELECTOR_ReallocBlock( WORD sel
, const void *base
, DWORD size
);
17 extern void SELECTOR_MoveBlock( WORD sel
, const void *new_base
);
18 extern void SELECTOR_FreeBlock( WORD sel
, WORD count
);
21 # define __GET_SEG(seg,res) __asm__( "movw %%" seg ",%w0" : "=r" (res) )
22 # define __SET_SEG(seg,val) __asm__( "movw %w0,%%" seg : : "r" (val) )
24 # define __GET_SEG(seg,res) ((res) = 0)
25 # define __SET_SEG(seg,val) /* nothing */
28 #define GET_CS(cs) __GET_SEG("cs",cs)
29 #define GET_DS(ds) __GET_SEG("ds",ds)
30 #define GET_ES(es) __GET_SEG("es",es)
31 #define GET_FS(fs) __GET_SEG("fs",fs)
32 #define GET_GS(gs) __GET_SEG("gs",gs)
33 #define GET_SS(ss) __GET_SEG("ss",ss)
35 #define SET_CS(cs) __SET_SEG("cs",cs)
36 #define SET_DS(ds) __SET_SEG("ds",ds)
37 #define SET_ES(es) __SET_SEG("es",es)
38 #define SET_FS(fs) __SET_SEG("fs",fs)
39 #define SET_GS(gs) __SET_SEG("gs",gs)
40 #define SET_SS(ss) __SET_SEG("ss",ss)
42 #endif /* __WINE_SELECTORS_H */