Fixed some Solaris specific assembler problems.

oldstable
Patrik Stridvall 2000-02-27 16:39:48 +00:00 committed by Alexandre Julliard
parent ba9294111e
commit ea4f831d99
2 changed files with 9 additions and 9 deletions

View File

@ -23,7 +23,7 @@ extern void SELECTOR_FreeBlock( WORD sel, WORD count );
extern inline unsigned short __get_##seg(void) \
{ unsigned short res; __asm__("movw %%" #seg ",%w0" : "=r"(res)); return res; }
# define __DEFINE_SET_SEG(seg) \
extern inline void __set_##seg(int val) { __asm__("movl %0,%%" #seg : : "r" (val)); }
extern inline void __set_##seg(int val) { __asm__("movw %w0,%%" #seg : : "r" (val)); }
# else /* __GNUC__ */
# define __DEFINE_GET_SEG(seg) extern unsigned short __get_##seg(void);
# define __DEFINE_SET_SEG(seg) extern void __set_##seg(unsigned int);

View File

@ -820,12 +820,12 @@ SEGPTR WINAPI UTLinearToSelectorOffset16(LPVOID lptr)
}
#ifdef __i386__
__ASM_GLOBAL_FUNC( __get_cs, "movl %cs,%eax\n\tret" );
__ASM_GLOBAL_FUNC( __get_ds, "movl %ds,%eax\n\tret" );
__ASM_GLOBAL_FUNC( __get_es, "movl %es,%eax\n\tret" );
__ASM_GLOBAL_FUNC( __get_fs, "movl %fs,%eax\n\tret" );
__ASM_GLOBAL_FUNC( __get_gs, "movl %gs,%eax\n\tret" );
__ASM_GLOBAL_FUNC( __get_ss, "movl %ss,%eax\n\tret" );
__ASM_GLOBAL_FUNC( __set_fs, "movl 4(%esp),%eax\n\tmovl %eax,%fs\n\tret" );
__ASM_GLOBAL_FUNC( __set_gs, "movl 4(%esp),%eax\n\tmovl %eax,%gs\n\tret" );
__ASM_GLOBAL_FUNC( __get_cs, "movw %cs,%ax\n\tret" )
__ASM_GLOBAL_FUNC( __get_ds, "movw %ds,%ax\n\tret" )
__ASM_GLOBAL_FUNC( __get_es, "movw %es,%ax\n\tret" )
__ASM_GLOBAL_FUNC( __get_fs, "movw %fs,%ax\n\tret" )
__ASM_GLOBAL_FUNC( __get_gs, "movw %gs,%ax\n\tret" )
__ASM_GLOBAL_FUNC( __get_ss, "movw %ss,%ax\n\tret" )
__ASM_GLOBAL_FUNC( __set_fs, "movl 4(%esp),%eax\n\tmovw %ax,%fs\n\tret" )
__ASM_GLOBAL_FUNC( __set_gs, "movl 4(%esp),%eax\n\tmovw %ax,%gs\n\tret" )
#endif