PATCH: assembler moves to / from segments

Marcus Meissner meissner at suse.de
Wed Apr 13 04:34:37 CDT 2005


Hi,

The new binutils do not like movl %fs / %gs anymore but want movw %fs / %gs
instead.

Ciao, Marcus

Changelog:
	Use correct movw instead of movl when handling
	segment registers.

--- tools/winebuild/relay.c.xx	2005-04-13 11:23:28.000000000 +0200
+++ tools/winebuild/relay.c	2005-04-13 11:24:20.000000000 +0200
@@ -172,7 +172,7 @@
     else
         fprintf( outfile, "\tmovw " __ASM_NAME("CallTo16_TebSelector") ", %%fs\n" );
 
-    fprintf( outfile, "\t.byte 0x64\n\tmovl (%d),%%gs\n", STRUCTOFFSET(TEB,gs_sel) );
+    fprintf( outfile, "\t.byte 0x64\n\tmovw (%d),%%gs\n", STRUCTOFFSET(TEB,gs_sel) );
 
     /* Get address of wine_ldt_copy array into %ecx */
     if ( UsePIC )
@@ -482,7 +482,7 @@
     fprintf( outfile, "\tpushl %%ebx\n" );
     fprintf( outfile, "\tpushl %%esi\n" );
     fprintf( outfile, "\tpushl %%edi\n" );
-    fprintf( outfile, "\t.byte 0x64\n\tmovl %%gs,(%d)\n", STRUCTOFFSET(TEB,gs_sel) );
+    fprintf( outfile, "\t.byte 0x64\n\tmovw %%gs,(%d)\n", STRUCTOFFSET(TEB,gs_sel) );
 
     /* Setup exception frame */
     fprintf( outfile, "\t.byte 0x64\n\tpushl (%d)\n", STACKOFFSET );
@@ -636,9 +636,9 @@
 #endif
     fprintf( outfile, "\tmovw %%di,%%es\n" );
 
-    fprintf( outfile, "\t.byte 0x2e\n\tmovl " __ASM_NAME("CallTo16_TebSelector") "-" __ASM_NAME("Call16_Ret_Start") ",%%fs\n" );
+    fprintf( outfile, "\t.byte 0x2e\n\tmovw " __ASM_NAME("CallTo16_TebSelector") "-" __ASM_NAME("Call16_Ret_Start") ",%%fs\n" );
 
-    fprintf( outfile, "\t.byte 0x64\n\tmovl (%d),%%gs\n", STRUCTOFFSET(TEB,gs_sel) );
+    fprintf( outfile, "\t.byte 0x64\n\tmovw (%d),%%gs\n", STRUCTOFFSET(TEB,gs_sel) );
 
     /* Restore the 32-bit stack */
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050413/86c80891/attachment.pgp


More information about the wine-patches mailing list