Remove support for interrupt handlers from winebuild

Jukka Heinonen jhei at iki.fi
Sun Mar 14 03:58:35 CST 2004


As far as I know, Wine has not used interrupt handlers generated
using winebuild for a long time, so this patch just removes support
for those.




Changelog:
  Remove support for generating interrupt handlers using winebuild.




Index: tools/winebuild/build.h
===================================================================
RCS file: /home/wine/wine/tools/winebuild/build.h,v
retrieving revision 1.50
diff -u -r1.50 build.h
--- tools/winebuild/build.h	17 Feb 2004 20:36:16 -0000	1.50
+++ tools/winebuild/build.h	7 Mar 2004 19:32:42 -0000
@@ -123,10 +123,9 @@
 #define FLAG_RET64     0x08  /* function returns a 64-bit value */
 #define FLAG_I386      0x10  /* function is i386 only */
 #define FLAG_REGISTER  0x20  /* use register calling convention */
-#define FLAG_INTERRUPT 0x40  /* function is an interrupt handler */
-#define FLAG_PRIVATE   0x80  /* function is private (cannot be imported) */
+#define FLAG_PRIVATE   0x40  /* function is private (cannot be imported) */
 
-#define FLAG_FORWARD   0x100 /* function is a forwarded name */
+#define FLAG_FORWARD   0x80  /* function is a forwarded name */
 
   /* Offset of a structure field relative to the start of the struct */
 #define STRUCTOFFSET(type,field) ((int)&((type *)0)->field)




Index: tools/winebuild/spec16.c
===================================================================
RCS file: /home/wine/wine/tools/winebuild/spec16.c,v
retrieving revision 1.46
diff -u -r1.46 spec16.c
--- tools/winebuild/spec16.c	11 Feb 2004 06:41:01 -0000	1.46
+++ tools/winebuild/spec16.c	7 Mar 2004 19:32:48 -0000
@@ -317,8 +317,6 @@
  *  extern LONG WINAPI PREFIX_CallFrom16_C_long_xxx( FARPROC func, LPBYTE args );
  *  extern void WINAPI PREFIX_CallFrom16_C_regs_xxx( FARPROC func, LPBYTE args,
  *                                                   CONTEXT86 *context );
- *  extern void WINAPI PREFIX_CallFrom16_C_intr_xxx( FARPROC func, LPBYTE args,
- *                                                   CONTEXT86 *context );
  *
  * where 'C' is the calling convention ('p' for pascal or 'c' for cdecl),
  * and each 'x' is an argument  ('w'=word, 's'=signed word, 'l'=long,
@@ -333,10 +331,6 @@
  * For register functions, the arguments (if present) are converted just
  * the same as for normal functions, but in addition the CONTEXT86 pointer
  * filled with the current register values is passed to the 32-bit routine.
- * (An 'intr' interrupt handler routine is treated exactly like a register
- * routine, except that upon return, the flags word pushed onto the stack
- * by the interrupt is removed by the 16-bit call stub.)
- *
  */
 static void BuildCallFrom16Func( FILE *outfile, const char *profile, const char *prefix )
 {
@@ -360,7 +354,6 @@
 
     if (!strncmp( "word_", profile + 2, 5 )) short_ret = 1;
     else if (!strncmp( "regs_", profile + 2, 5 )) reg_func = 1;
-    else if (!strncmp( "intr_", profile + 2, 5 )) reg_func = 2;
     else if (strncmp( "long_", profile + 2, 5 ))
     {
         fprintf( stderr, "Invalid function name '%s', ignored\n", profile );
@@ -467,7 +460,6 @@
              (odp->type == TYPE_PASCAL) ? "p" :
              (odp->type == TYPE_VARARGS) ? "v" : "c",
              (odp->flags & FLAG_REGISTER) ? "regs" :
-             (odp->flags & FLAG_INTERRUPT) ? "intr" :
              (odp->flags & FLAG_RET16) ? "word" : "long",
              odp->u.func.arg_types );
     return buffer;
@@ -490,8 +482,8 @@
 
     if ((retval = type1 - type2) != 0) return retval;
 
-    type1 = odp1->flags & (FLAG_RET16|FLAG_REGISTER|FLAG_INTERRUPT);
-    type2 = odp2->flags & (FLAG_RET16|FLAG_REGISTER|FLAG_INTERRUPT);
+    type1 = odp1->flags & (FLAG_RET16|FLAG_REGISTER);
+    type2 = odp2->flags & (FLAG_RET16|FLAG_REGISTER);
 
     if ((retval = type1 - type2) != 0) return retval;
 
@@ -701,8 +693,6 @@
                     break;
                 }
 
-        if (typelist[i]->flags & FLAG_INTERRUPT) argsize += 2;
-
         /* build the arg types bit fields */
         arg_types[0] = arg_types[1] = 0;
         for (j = 0; typelist[i]->u.func.arg_types[j]; j++)
@@ -719,13 +709,13 @@
             }
             arg_types[j / 10] |= type << (3 * (j % 10));
         }
-        if (typelist[i]->flags & (FLAG_REGISTER|FLAG_INTERRUPT)) arg_types[0] |= ARG_REGISTER;
+        if (typelist[i]->flags & FLAG_REGISTER) arg_types[0] |= ARG_REGISTER;
         if (typelist[i]->flags & FLAG_RET16) arg_types[0] |= ARG_RET16;
 
 #ifdef __i386__
         fprintf( outfile, "    { 0x68, __wine_%s_CallFrom16_%s, 0x9a, __wine_call_from_16_%s,\n",
                  make_c_identifier(spec->file_name), profile,
-                 (typelist[i]->flags & (FLAG_REGISTER|FLAG_INTERRUPT)) ? "regs":
+                 (typelist[i]->flags & FLAG_REGISTER) ? "regs":
                  (typelist[i]->flags & FLAG_RET16) ? "word" : "long" );
         if (argsize)
             fprintf( outfile, "      0x%04x, 0xca66, %d, { 0x%08x, 0x%08x } },\n",




Index: tools/winebuild/parser.c
===================================================================
RCS file: /home/wine/wine/tools/winebuild/parser.c,v
retrieving revision 1.50
diff -u -r1.50 parser.c
--- tools/winebuild/parser.c	17 Feb 2004 20:36:16 -0000	1.50
+++ tools/winebuild/parser.c	7 Mar 2004 19:32:53 -0000
@@ -66,7 +66,6 @@
     "ret64",       /* FLAG_RET64 */
     "i386",        /* FLAG_I386 */
     "register",    /* FLAG_REGISTER */
-    "interrupt",   /* FLAG_INTERRUPT */
     "private",     /* FLAG_PRIVATE */
     NULL
 };
@@ -238,11 +237,6 @@
         if (odp->type == TYPE_PASCAL)
         {
             error( "'pascal' not supported for Win32\n" );
-            return 0;
-        }
-        if (odp->flags & FLAG_INTERRUPT)
-        {
-            error( "'interrupt' not supported for Win32\n" );
             return 0;
         }
         break;



-- 
Jukka Heinonen <http://www.iki.fi/jhei>



More information about the wine-patches mailing list