Commit ea4f831d authored by Patrik Stridvall's avatar Patrik Stridvall Committed by Alexandre Julliard

Fixed some Solaris specific assembler problems.

parent ba929411
......@@ -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);
......
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment