Sync (31): winbuild relay

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

License: X11

ChangeLog:

  Jon Griffiths <jon_p_griffiths@yahoo.com>

  +tools/winebuild/relay.c 
    Remove redundant multiple calls to fprintf()


=====
"Don't wait for the seas to part, or messiahs to come;
 Don't you sit around and waste this chance..." - Live

jon_p_griffiths@yahoo.com

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
diff -u wine/tools/winebuild/relay.c wine-develop2/tools/winebuild/relay.c
--- wine/tools/winebuild/relay.c	Sat Apr 26 19:33:25 2003
+++ wine-develop2/tools/winebuild/relay.c	Thu May 29 00:52:38 2003
@@ -129,13 +129,13 @@
     else function_header( outfile, "__wine_call_from_16_long" );
 
     /* Create STACK16FRAME (except STACK32FRAME link) */
-    fprintf( outfile, "\tpushw %%gs\n" );
-    fprintf( outfile, "\tpushw %%fs\n" );
-    fprintf( outfile, "\tpushw %%es\n" );
-    fprintf( outfile, "\tpushw %%ds\n" );
-    fprintf( outfile, "\tpushl %%ebp\n" );
-    fprintf( outfile, "\tpushl %%ecx\n" );
-    fprintf( outfile, "\tpushl %%edx\n" );
+    fprintf( outfile, "\tpushw %%gs\n"
+                      "\tpushw %%fs\n"
+                      "\tpushw %%es\n"
+                      "\tpushw %%ds\n"
+                      "\tpushl %%ebp\n"
+                      "\tpushl %%ecx\n"
+                      "\tpushl %%edx\n" );
 
     /* Save original EFlags register */
     fprintf( outfile, "\tpushfl\n" );
@@ -151,8 +151,8 @@
 
     if (UsePIC)
     {
-        fprintf( outfile, "\t.byte 0x2e\n\tmovl " __ASM_NAME("CallTo16_DataSelector@GOT") "(%%ecx), %%edx\n" );
-        fprintf( outfile, "\t.byte 0x2e\n\tmovl (%%edx), %%edx\n" );
+        fprintf( outfile, "\t.byte 0x2e\n\tmovl " __ASM_NAME("CallTo16_DataSelector@GOT") "(%%ecx), %%edx\n"
+                          "\t.byte 0x2e\n\tmovl (%%edx), %%edx\n" );
     }
     else
         fprintf( outfile, "\t.byte 0x2e\n\tmovl " __ASM_NAME("CallTo16_DataSelector") ",%%edx\n" );
@@ -169,8 +169,8 @@
 
     if ( UsePIC )
     {
-        fprintf( outfile, "\tmovl " __ASM_NAME("SYSLEVEL_Win16CurrentTeb@GOT") "(%%ecx), %%edx\n" );
-        fprintf( outfile, "\tmovw (%%edx), %%fs\n" );
+        fprintf( outfile, "\tmovl " __ASM_NAME("SYSLEVEL_Win16CurrentTeb@GOT") "(%%ecx), %%edx\n"
+                          "\tmovw (%%edx), %%fs\n" );
     }
     else
         fprintf( outfile, "\tmovw " __ASM_NAME("SYSLEVEL_Win16CurrentTeb") ", %%fs\n" );
@@ -184,12 +184,12 @@
         fprintf( outfile, "\tmovl $" __ASM_NAME("wine_ldt_copy") ", %%ecx\n" );
 
     /* Translate STACK16FRAME base to flat offset in %edx */
-    fprintf( outfile, "\tmovw %%ss, %%dx\n" );
-    fprintf( outfile, "\tandl $0xfff8, %%edx\n" );
-    fprintf( outfile, "\tshrl $1, %%edx\n" );
-    fprintf( outfile, "\tmovl (%%ecx,%%edx), %%edx\n" );
-    fprintf( outfile, "\tmovzwl %%sp, %%ebp\n" );
-    fprintf( outfile, "\tleal (%%ebp,%%edx), %%edx\n" );
+    fprintf( outfile, "\tmovw %%ss, %%dx\n"
+                      "\tandl $0xfff8, %%edx\n"
+                      "\tshrl $1, %%edx\n"
+                      "\tmovl (%%ecx,%%edx), %%edx\n"
+                      "\tmovzwl %%sp, %%ebp\n"
+                      "\tleal (%%ebp,%%edx), %%edx\n" );
 
     /* Get saved flags into %ecx */
     fprintf( outfile, "\tpopl %%ecx\n" );
@@ -204,9 +204,9 @@
 #endif
     fprintf( outfile, "\t.byte 0x64\n\tmovw %%ss, (%d)\n", STACKOFFSET + 2 );
     fprintf( outfile, "\t.byte 0x64\n\tmovw %%sp, (%d)\n", STACKOFFSET );
-    fprintf( outfile, "\tpushl %%ds\n" );
-    fprintf( outfile, "\tpopl %%ss\n" );
-    fprintf( outfile, "\tmovl %%ebp, %%esp\n" );
+    fprintf( outfile, "\tpushl %%ds\n"
+                      "\tpopl %%ss\n"
+                      "\tmovl %%ebp, %%esp\n" );
     fprintf( outfile, "\taddl $%d, %%ebp\n", STRUCTOFFSET(STACK32FRAME, ebp) );
 
 
@@ -235,22 +235,19 @@
         fprintf( outfile, "\t.byte 0x64\n\tpopl (%d)\n", STACKOFFSET );
 
         /* Restore registers and return directly to caller */
-        fprintf( outfile, "\taddl $8, %%esp\n" );
-        fprintf( outfile, "\tpopl %%ebp\n" );
-        fprintf( outfile, "\tpopw %%ds\n" );
-        fprintf( outfile, "\tpopw %%es\n" );
-        fprintf( outfile, "\tpopw %%fs\n" );
-        fprintf( outfile, "\tpopw %%gs\n" );
-        fprintf( outfile, "\taddl $20, %%esp\n" );
-
-        fprintf( outfile, "\txorb %%ch, %%ch\n" );
-        fprintf( outfile, "\tpopl %%ebx\n" );
-        fprintf( outfile, "\taddw %%cx, %%sp\n" );
-        fprintf( outfile, "\tpush %%ebx\n" );
-
-        fprintf( outfile, "\t.byte 0x66\n" );
-        fprintf( outfile, "\tlret\n" );
-
+        fprintf( outfile, "\taddl $8, %%esp\n"
+                          "\tpopl %%ebp\n"
+                          "\tpopw %%ds\n"
+                          "\tpopw %%es\n"
+                          "\tpopw %%fs\n"
+                          "\tpopw %%gs\n"
+                          "\taddl $20, %%esp\n"
+                          "\txorb %%ch, %%ch\n"
+                          "\tpopl %%ebx\n"
+                          "\taddw %%cx, %%sp\n"
+                          "\tpush %%ebx\n"
+                          "\t.byte 0x66\n"
+                          "\tlret\n" );
         return;
     }
 
@@ -328,8 +325,8 @@
         else
             fprintf( outfile, "\tcall " __ASM_NAME("RELAY_DebugCallFrom16") "\n ");
 
-        fprintf( outfile, "\tpopl %%edx\n" );
-        fprintf( outfile, "\tpopl %%edx\n" );
+        fprintf( outfile, "\tpopl %%edx\n"
+                          "\tpopl %%edx\n" );
 
         if ( UsePIC )
             fprintf( outfile, "\tpopl %%ebx\n" );
@@ -367,8 +364,8 @@
         else
             fprintf( outfile, "\tcall " __ASM_NAME("RELAY_DebugCallFrom16Ret") "\n ");
 
-        fprintf( outfile, "\tpopl %%eax\n" );
-        fprintf( outfile, "\tpopl %%eax\n" );
+        fprintf( outfile, "\tpopl %%eax\n"
+                          "\tpopl %%eax\n" );
 
         if ( UsePIC )
             fprintf( outfile, "\tpopl %%ebx\n" );
@@ -413,9 +410,9 @@
         fprintf( outfile, "\tmovl %d(%%ebx), %%ecx\n", CONTEXTOFFSET(Ecx) );
         fprintf( outfile, "\tmovl %d(%%ebx), %%ebx\n", CONTEXTOFFSET(Ebx) );
 
-        fprintf( outfile, "\tpopl %%ds\n" );
-        fprintf( outfile, "\tpopfl\n" );
-        fprintf( outfile, "\tlret\n" );
+        fprintf( outfile, "\tpopl %%ds\n"
+                          "\tpopfl\n"
+                          "\tlret\n" );
     }
     else
     {
@@ -425,13 +422,13 @@
         fprintf( outfile, "\t.byte 0x64\n\tpopl (%d)\n", STACKOFFSET );
 
         /* Restore registers */
-        fprintf( outfile, "\tpopl %%edx\n" );
-        fprintf( outfile, "\tpopl %%ecx\n" );
-        fprintf( outfile, "\tpopl %%ebp\n" );
-        fprintf( outfile, "\tpopw %%ds\n" );
-        fprintf( outfile, "\tpopw %%es\n" );
-        fprintf( outfile, "\tpopw %%fs\n" );
-        fprintf( outfile, "\tpopw %%gs\n" );
+        fprintf( outfile, "\tpopl %%edx\n"
+                          "\tpopl %%ecx\n"
+                          "\tpopl %%ebp\n"
+                          "\tpopw %%ds\n"
+                          "\tpopw %%es\n"
+                          "\tpopw %%fs\n"
+                          "\tpopw %%gs\n" );
 
         /* Prepare return value and set flags accordingly */
         if ( !short_ret )
@@ -484,11 +481,11 @@
     fprintf( outfile, "\tmovl %%esp, %%ebp\n" );
 
     /* Save the 32-bit registers */
-    fprintf( outfile, "\tpushl %%ebx\n" );
-    fprintf( outfile, "\tpushl %%ecx\n" );
-    fprintf( outfile, "\tpushl %%edx\n" );
-    fprintf( outfile, "\tpushl %%esi\n" );
-    fprintf( outfile, "\tpushl %%edi\n" );
+    fprintf( outfile, "\tpushl %%ebx\n"
+                      "\tpushl %%ecx\n"
+                      "\tpushl %%edx\n"
+                      "\tpushl %%esi\n"
+                      "\tpushl %%edi\n" );
     fprintf( outfile, "\t.byte 0x64\n\tmovl %%gs,(%d)\n", STRUCTOFFSET(TEB,gs_sel) );
 
     if ( UsePIC )
@@ -505,8 +502,8 @@
     {
         /* Push flags, number of arguments, and target */
         fprintf( outfile, "\tpushl $%d\n", reg_func );
-        fprintf( outfile, "\tpushl 12(%%ebp)\n" );
-        fprintf( outfile, "\tpushl  8(%%ebp)\n" );
+        fprintf( outfile, "\tpushl 12(%%ebp)\n"
+                          "\tpushl  8(%%ebp)\n" );
 
         if ( UsePIC )
             fprintf( outfile, "\tcall " __ASM_NAME("RELAY_DebugCallTo16@PLT") "\n" );
@@ -552,9 +549,9 @@
     if ( !reg_func )
     {
         /* Convert and push return value */
-        fprintf( outfile, "\tshll $16,%%edx\n" );
-        fprintf( outfile, "\tmovw %%ax,%%dx\n" );
-        fprintf( outfile, "\tpushl %%edx\n" );
+        fprintf( outfile, "\tshll $16,%%edx\n"
+                          "\tmovw %%ax,%%dx\n"
+                          "\tpushl %%edx\n" );
     }
     else
     {
@@ -614,15 +611,15 @@
     fprintf( outfile, "\tpopl %%eax\n" );
 
     /* Restore the 32-bit registers */
-    fprintf( outfile, "\tpopl %%edi\n" );
-    fprintf( outfile, "\tpopl %%esi\n" );
-    fprintf( outfile, "\tpopl %%edx\n" );
-    fprintf( outfile, "\tpopl %%ecx\n" );
-    fprintf( outfile, "\tpopl %%ebx\n" );
+    fprintf( outfile, "\tpopl %%edi\n"
+                      "\tpopl %%esi\n"
+                      "\tpopl %%edx\n"
+                      "\tpopl %%ecx\n"
+                      "\tpopl %%ebx\n" );
 
     /* Function exit sequence */
-    fprintf( outfile, "\tpopl %%ebp\n" );
-    fprintf( outfile, "\tret $8\n" );
+    fprintf( outfile, "\tpopl %%ebp\n"
+                      "\tret $8\n" );
 
 
     /* Start of the actual CallTo16 routine */
@@ -653,11 +650,11 @@
         fprintf( outfile, "\tpushl %%ecx\n" );
     else
     {
-        fprintf( outfile, "\tshldl $16, %%ecx, %%eax\n" );
-        fprintf( outfile, "\tpushw $0\n" );
-        fprintf( outfile, "\tpushw %%ax\n" );
-        fprintf( outfile, "\tpushw $0\n" );
-        fprintf( outfile, "\tpushw %%cx\n" );
+        fprintf( outfile, "\tshldl $16, %%ecx, %%eax\n"
+                          "\tpushw $0\n"
+                          "\tpushw %%ax\n"
+                          "\tpushw $0\n"
+                          "\tpushw %%cx\n" );
     }
 
     if (reg_func)
@@ -698,14 +695,14 @@
         fprintf( outfile, "\tmovw %%ax,%%gs\n" );
 
         /* Set %ds and %es (and %ax just in case) equal to %ss */
-        fprintf( outfile, "\tmovw %%ss,%%ax\n" );
-        fprintf( outfile, "\tmovw %%ax,%%ds\n" );
-        fprintf( outfile, "\tmovw %%ax,%%es\n" );
+        fprintf( outfile, "\tmovw %%ss,%%ax\n"
+                          "\tmovw %%ax,%%ds\n"
+                          "\tmovw %%ax,%%es\n" );
     }
 
     /* Jump to the called routine */
-    fprintf( outfile, "\t.byte 0x66\n" );
-    fprintf( outfile, "\tlret\n" );
+    fprintf( outfile, "\t.byte 0x66\n"
+                      "\tlret\n" );
 }
 
 
@@ -870,11 +867,11 @@
 
     /* Entry code */
 
-    fprintf( outfile, "\tpushl %%ebp\n" );
-    fprintf( outfile, "\tmovl %%esp,%%ebp\n" );
-    fprintf( outfile, "\tpushl %%edi\n" );
-    fprintf( outfile, "\tpushl %%esi\n" );
-    fprintf( outfile, "\tpushl %%ebx\n" );
+    fprintf( outfile, "\tpushl %%ebp\n"
+                      "\tmovl %%esp,%%ebp\n"
+                      "\tpushl %%edi\n"
+                      "\tpushl %%esi\n"
+                      "\tpushl %%ebx\n" );
 
     /* Get the 16-bit stack */
 
@@ -882,21 +879,21 @@
 
     /* Convert it to a flat address */
 
-    fprintf( outfile, "\tshldl $16,%%ebx,%%eax\n" );
-    fprintf( outfile, "\tandl $0xfff8,%%eax\n" );
-    fprintf( outfile, "\tshrl $1,%%eax\n" );
+    fprintf( outfile, "\tshldl $16,%%ebx,%%eax\n"
+                      "\tandl $0xfff8,%%eax\n"
+                      "\tshrl $1,%%eax\n" );
     fprintf( outfile, "\tmovl " __ASM_NAME("wine_ldt_copy") "(%%eax),%%esi\n" );
-    fprintf( outfile, "\tmovw %%bx,%%ax\n" );
-    fprintf( outfile, "\taddl %%eax,%%esi\n" );
+    fprintf( outfile, "\tmovw %%bx,%%ax\n"
+                      "\taddl %%eax,%%esi\n" );
 
     /* Allocate temporary area (simulate STACK16_PUSH) */
 
-    fprintf( outfile, "\tpushf\n" );
-    fprintf( outfile, "\tcld\n" );
+    fprintf( outfile, "\tpushf\n"
+                      "\tcld\n" );
     fprintf( outfile, "\tleal -%d(%%esi), %%edi\n", size );
     fprintf( outfile, "\tmovl $%d, %%ecx\n", sizeof(STACK16FRAME) );
-    fprintf( outfile, "\trep\n\tmovsb\n" );
-    fprintf( outfile, "\tpopf\n" );
+    fprintf( outfile, "\trep\n\tmovsb\n"
+                      "\tpopf\n" );
 
     fprintf( outfile, "\t.byte 0x64\n\tsubw $%d,(%d)\n", size, STACKOFFSET );
 
@@ -906,14 +903,12 @@
 
     if ( !isEx )
     {
-        fprintf( outfile, "\tleal 4(%%edi), %%edi\n" );
-
-        fprintf( outfile, "\tleal -8(%%esp), %%eax\n" );
-        fprintf( outfile, "\tmovl %%eax, -8(%%edi)\n" );    /* 32-bit sp */
-
-        fprintf( outfile, "\tmovw %%ss, %%ax\n" );
-        fprintf( outfile, "\tandl $0x0000ffff, %%eax\n" );
-        fprintf( outfile, "\tmovl %%eax, -4(%%edi)\n" );    /* 32-bit ss */
+        fprintf( outfile, "\tleal 4(%%edi), %%edi\n"
+                          "\tleal -8(%%esp), %%eax\n"
+                          "\tmovl %%eax, -8(%%edi)\n"       /* 32-bit sp */
+                          "\tmovw %%ss, %%ax\n"
+                          "\tandl $0x0000ffff, %%eax\n"
+                          "\tmovl %%eax, -4(%%edi)\n" );    /* 32-bit ss */
 
         fprintf( outfile, "\taddl $%d, %%ebx\n", sizeof(STACK16FRAME)-size+4 + 4 );
         fprintf( outfile, "\tmovl %%ebx, 0(%%edi)\n" );    /* 16-bit ss:sp */
@@ -924,20 +919,16 @@
     else
     {
         fprintf( outfile, "\taddl $%d, %%ebx\n", sizeof(STACK16FRAME)-size+4 );
-        fprintf( outfile, "\tmovl %%ebx, 0(%%edi)\n" );
-
-        fprintf( outfile, "\tmovw %%ds, %%ax\n" );
-        fprintf( outfile, "\tmovw %%ax, 4(%%edi)\n" );
-
-        fprintf( outfile, "\taddl $20, %%ebx\n" );
-        fprintf( outfile, "\tmovw %%bx, 10(%%edi)\n" );
-
-        fprintf( outfile, "\tleal -8(%%esp), %%eax\n" );
-        fprintf( outfile, "\tmovl %%eax, 12(%%edi)\n" );
-
-        fprintf( outfile, "\tmovw %%ss, %%ax\n" );
-        fprintf( outfile, "\tandl $0x0000ffff, %%eax\n" );
-        fprintf( outfile, "\tmovl %%eax, 16(%%edi)\n" );
+        fprintf( outfile, "\tmovl %%ebx, 0(%%edi)\n"
+                          "\tmovw %%ds, %%ax\n"
+                          "\tmovw %%ax, 4(%%edi)\n"
+                          "\taddl $20, %%ebx\n"
+                          "\tmovw %%bx, 10(%%edi)\n"
+                          "\tleal -8(%%esp), %%eax\n"
+                          "\tmovl %%eax, 12(%%edi)\n"
+                          "\tmovw %%ss, %%ax\n"
+                          "\tandl $0x0000ffff, %%eax\n"
+                          "\tmovl %%eax, 16(%%edi)\n" );
 
         fprintf( outfile, "\tmovl " __ASM_NAME("CALL32_%s_RetAddr") ", %%eax\n", name );
         fprintf( outfile, "\tmovl %%eax, 20(%%edi)\n" );
@@ -945,49 +936,46 @@
 
     /* Set up registers and call CBClient relay stub (simulating a far call) */
 
-    fprintf( outfile, "\tmovl 16(%%ebp), %%esi\n" );
-    fprintf( outfile, "\tmovl (%%esi), %%esi\n" );
-
-    fprintf( outfile, "\tmovl %%edi, %%ebx\n" );
-    fprintf( outfile, "\tmovl 8(%%ebp), %%eax\n" );
-    fprintf( outfile, "\tmovl 12(%%ebp), %%ebp\n" );
-
-    fprintf( outfile, "\tpushl %%cs\n" );
-    fprintf( outfile, "\tcall *%%eax\n" );
+    fprintf( outfile, "\tmovl 16(%%ebp), %%esi\n"
+                      "\tmovl (%%esi), %%esi\n"
+                      "\tmovl %%edi, %%ebx\n"
+                      "\tmovl 8(%%ebp), %%eax\n"
+                      "\tmovl 12(%%ebp), %%ebp\n"
+                      "\tpushl %%cs\n"
+                      "\tcall *%%eax\n" );
 
     /* Return new esi value to caller */
 
-    fprintf( outfile, "\tmovl 32(%%esp), %%edi\n" );
-    fprintf( outfile, "\tmovl %%esi, (%%edi)\n" );
+    fprintf( outfile, "\tmovl 32(%%esp), %%edi\n"
+                      "\tmovl %%esi, (%%edi)\n" );
 
     /* Cleanup temporary area (simulate STACK16_POP) */
 
-    fprintf( outfile, "\tpop %%esi\n" );
-
-    fprintf( outfile, "\tpushf\n" );
-    fprintf( outfile, "\tstd\n" );
-    fprintf( outfile, "\tdec %%esi\n" );
+    fprintf( outfile, "\tpop %%esi\n"
+                      "\tpushf\n"
+                      "\tstd\n"
+                      "\tdec %%esi\n" );
     fprintf( outfile, "\tleal %d(%%esi), %%edi\n", size );
     fprintf( outfile, "\tmovl $%d, %%ecx\n", sizeof(STACK16FRAME) );
-    fprintf( outfile, "\trep\n\tmovsb\n" );
-    fprintf( outfile, "\tpopf\n" );
+    fprintf( outfile, "\trep\n\tmovsb\n"
+                      "\tpopf\n" );
 
     fprintf( outfile, "\t.byte 0x64\n\taddw $%d,(%d)\n", size, STACKOFFSET );
 
     /* Return argument size to caller */
     if ( isEx )
     {
-        fprintf( outfile, "\tmovl 32(%%esp), %%ebx\n" );
-        fprintf( outfile, "\tmovl %%ebp, (%%ebx)\n" );
+        fprintf( outfile, "\tmovl 32(%%esp), %%ebx\n"
+                          "\tmovl %%ebp, (%%ebx)\n" );
     }
 
     /* Restore registers and return */
 
-    fprintf( outfile, "\tpopl %%ebx\n" );
-    fprintf( outfile, "\tpopl %%esi\n" );
-    fprintf( outfile, "\tpopl %%edi\n" );
-    fprintf( outfile, "\tpopl %%ebp\n" );
-    fprintf( outfile, "\tret\n" );
+    fprintf( outfile, "\tpopl %%ebx\n"
+                      "\tpopl %%esi\n"
+                      "\tpopl %%edi\n"
+                      "\tpopl %%ebp\n"
+                      "\tret\n" );
 }
 
 static void BuildCallTo32CBClientRet( FILE *outfile, BOOL isEx )
@@ -1001,15 +989,15 @@
 
     if ( !isEx )
     {
-        fprintf( outfile, "\tmovzwl %%sp, %%ebx\n" );
-        fprintf( outfile, "\tlssl %%ss:-16(%%ebx), %%esp\n" );
+        fprintf( outfile, "\tmovzwl %%sp, %%ebx\n"
+                          "\tlssl %%ss:-16(%%ebx), %%esp\n" );
     }
     else
     {
-        fprintf( outfile, "\tmovzwl %%bp, %%ebx\n" );
-        fprintf( outfile, "\tsubw %%bp, %%sp\n" );
-        fprintf( outfile, "\tmovzwl %%sp, %%ebp\n" );
-        fprintf( outfile, "\tlssl %%ss:-12(%%ebx), %%esp\n" );
+        fprintf( outfile, "\tmovzwl %%bp, %%ebx\n"
+                          "\tsubw %%bp, %%sp\n"
+                          "\tmovzwl %%sp, %%ebp\n"
+                          "\tlssl %%ss:-12(%%ebx), %%esp\n" );
     }
     fprintf( outfile, "\tlret\n" );
 
@@ -1053,15 +1041,15 @@
 
     /* Allocate some buffer space on the stack */
 
-    fprintf( outfile, "\tpushl %%ebp\n" );
-    fprintf( outfile, "\tmovl %%esp,%%ebp\n ");
+    fprintf( outfile, "\tpushl %%ebp\n"
+                      "\tmovl %%esp,%%ebp\n ");
     fprintf( outfile, "\tleal -%d(%%esp), %%esp\n", STACK_SPACE );
 
     /* Build the context structure */
 
     fprintf( outfile, "\tmovl %%eax,%d(%%ebp)\n", CONTEXTOFFSET(Eax) - STACK_SPACE );
-    fprintf( outfile, "\tpushfl\n" );
-    fprintf( outfile, "\tpopl %%eax\n" );
+    fprintf( outfile, "\tpushfl\n"
+                      "\tpopl %%eax\n" );
     fprintf( outfile, "\tmovl %%eax,%d(%%ebp)\n", CONTEXTOFFSET(EFlags) - STACK_SPACE );
     fprintf( outfile, "\tmovl 0(%%ebp),%%eax\n" );
     fprintf( outfile, "\tmovl %%eax,%d(%%ebp)\n", CONTEXTOFFSET(Ebp) - STACK_SPACE );
@@ -1071,8 +1059,8 @@
     fprintf( outfile, "\tmovl %%esi,%d(%%ebp)\n", CONTEXTOFFSET(Esi) - STACK_SPACE );
     fprintf( outfile, "\tmovl %%edi,%d(%%ebp)\n", CONTEXTOFFSET(Edi) - STACK_SPACE );
 
-    fprintf( outfile, "\txorl %%eax,%%eax\n" );
-    fprintf( outfile, "\tmovw %%cs,%%ax\n" );
+    fprintf( outfile, "\txorl %%eax,%%eax\n"
+                      "\tmovw %%cs,%%ax\n" );
     fprintf( outfile, "\tmovl %%eax,%d(%%ebp)\n", CONTEXTOFFSET(SegCs) - STACK_SPACE );
     fprintf( outfile, "\tmovw %%es,%%ax\n" );
     fprintf( outfile, "\tmovl %%eax,%d(%%ebp)\n", CONTEXTOFFSET(SegEs) - STACK_SPACE );
@@ -1094,19 +1082,19 @@
 
     /* Transfer the arguments */
 
-    fprintf( outfile, "\tmovl 4(%%ebp),%%ebx\n" );   /* get relay code addr */
-    fprintf( outfile, "\tpushl %%esp\n" );           /* push ptr to context struct */
-    fprintf( outfile, "\tmovzbl 4(%%ebx),%%ecx\n" ); /* fetch number of args to copy */
-    fprintf( outfile, "\tjecxz 1f\n" );
-    fprintf( outfile, "\tsubl %%ecx,%%esp\n" );
-    fprintf( outfile, "\tleal 12(%%ebp),%%esi\n" );  /* get %esp at time of call */
-    fprintf( outfile, "\tmovl %%esp,%%edi\n" );
-    fprintf( outfile, "\tshrl $2,%%ecx\n" );
-    fprintf( outfile, "\tcld\n" );
-    fprintf( outfile, "\trep\n\tmovsl\n" );  /* copy args */
+    fprintf( outfile, "\tmovl 4(%%ebp),%%ebx\n"    /* get relay code addr */
+                      "\tpushl %%esp\n"            /* push ptr to context struct */
+                      "\tmovzbl 4(%%ebx),%%ecx\n"  /* fetch number of args to copy */
+                      "\tjecxz 1f\n"
+                      "\tsubl %%ecx,%%esp\n"
+                      "\tleal 12(%%ebp),%%esi\n"   /* get %esp at time of call */
+                      "\tmovl %%esp,%%edi\n"
+                      "\tshrl $2,%%ecx\n"
+                      "\tcld\n"
+                      "\trep\n\tmovsl\n" );        /* copy args */
 
-    fprintf( outfile, "1:\tmovzbl 5(%%ebx),%%eax\n" ); /* fetch number of args to remove */
-    fprintf( outfile, "\tleal 12(%%ebp,%%eax),%%eax\n" );
+    fprintf( outfile, "1:\tmovzbl 5(%%ebx),%%eax\n"  /* fetch number of args to remove */
+                      "\tleal 12(%%ebp,%%eax),%%eax\n" );
     fprintf( outfile, "\tmovl %%eax,%d(%%ebp)\n", CONTEXTOFFSET(Esp) - STACK_SPACE );
 
     /* Call the entry point */
@@ -1140,14 +1128,14 @@
     fprintf( outfile, "\tmovl %d(%%ebp),%%ebx\n", CONTEXTOFFSET(Ebx) - STACK_SPACE );
 
     fprintf( outfile, "\tmovl %d(%%ebp),%%eax\n", CONTEXTOFFSET(EFlags) - STACK_SPACE );
-    fprintf( outfile, "\tpushl %%eax\n" );
-    fprintf( outfile, "\tpopfl\n" );
+    fprintf( outfile, "\tpushl %%eax\n"
+                      "\tpopfl\n" );
     fprintf( outfile, "\tmovl %d(%%ebp),%%eax\n", CONTEXTOFFSET(Eax) - STACK_SPACE );
 
     fprintf( outfile, "\tmovl %d(%%ebp),%%ebp\n", CONTEXTOFFSET(Esp) - STACK_SPACE );
-    fprintf( outfile, "\tleal -8(%%ebp),%%esp\n" );
-    fprintf( outfile, "\tpopl %%ebp\n" );
-    fprintf( outfile, "\tret\n" );
+    fprintf( outfile, "\tleal -8(%%ebp),%%esp\n"
+                      "\tpopl %%ebp\n"
+                      "\tret\n" );
 }
 
 
@@ -1162,8 +1150,8 @@
 
     /* File header */
 
-    fprintf( outfile, "/* File generated automatically. Do not edit! */\n\n" );
-    fprintf( outfile, "\t.text\n" );
+    fprintf( outfile, "/* File generated automatically. Do not edit! */\n\n"
+                      "\t.text\n" );
 
     if (output_file_name && use_stabs)
     {
@@ -1179,9 +1167,9 @@
         fprintf( outfile, "Code_Start:\n\n" );
     }
 
-    fprintf( outfile, __ASM_NAME("Call16_Start") ":\n" );
-    fprintf( outfile, "\t.globl " __ASM_NAME("Call16_Start") "\n" );
-    fprintf( outfile, "\t.byte 0\n\n" );
+    fprintf( outfile, __ASM_NAME("Call16_Start") ":\n"
+                      "\t.globl " __ASM_NAME("Call16_Start") "\n"
+                      "\t.byte 0\n\n" );
 
     /* Standard CallFrom16 routine (WORD return) */
     BuildCallFrom16Core( outfile, FALSE, FALSE, TRUE );
@@ -1215,8 +1203,8 @@
 
     if (use_stabs)
     {
-        fprintf( outfile, "\t.stabs \"\",100,0,0,.Letext\n");
-        fprintf( outfile, ".Letext:\n");
+        fprintf( outfile, "\t.stabs \"\",100,0,0,.Letext\n"
+                          ".Letext:\n");
 
         /* Some versions of gdb need to have the filename data for
            each section, so output it again for the data section. */
@@ -1243,8 +1231,8 @@
     BuildCallTo32CBClientRet( outfile, TRUE  );
 
     /* End of Call16_Ret segment */
-    fprintf( outfile, "\n\t.globl " __ASM_NAME("Call16_Ret_End") "\n" );
-    fprintf( outfile, __ASM_NAME("Call16_Ret_End") ":\n" );
+    fprintf( outfile, "\n\t.globl " __ASM_NAME("Call16_Ret_End") "\n"
+                      __ASM_NAME("Call16_Ret_End") ":\n" );
 }
 
 /*******************************************************************
@@ -1256,8 +1244,8 @@
 {
     /* File header */
 
-    fprintf( outfile, "/* File generated automatically. Do not edit! */\n\n" );
-    fprintf( outfile, "\t.text\n" );
+    fprintf( outfile, "/* File generated automatically. Do not edit! */\n\n"
+                      "\t.text\n" );
 
     if (output_file_name && use_stabs)
     {
@@ -1279,8 +1267,8 @@
 
     if (use_stabs)
     {
-        fprintf( outfile, "\t.stabs \"\",100,0,0,.Letext\n");
-        fprintf( outfile, ".Letext:\n");
+        fprintf( outfile, "\t.stabs \"\",100,0,0,.Letext\n"
+                          ".Letext:\n");
     }
 }
 

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux