delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/05/00:34:07

From: "Ian Miller" <Ian AT shelob DOT force9 DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Patch for grx23 under gcc-2.95
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Message-ID: <%ifA3.5110$C7.116315@wards>
Date: Sat, 4 Sep 1999 21:26:23 +0100
NNTP-Posting-Host: 212.56.111.174
X-Complaints-To: abuse AT plus DOT net DOT uk
X-Trace: wards 936476987 212.56.111.174 (Sat, 04 Sep 1999 20:29:47 GMT)
NNTP-Posting-Date: Sat, 04 Sep 1999 20:29:47 GMT
Lines: 139
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Apply this patch to your grx23 distribution like so

   cd <your grx directory>
   patch -p1 < <this file>

to make changes necessary for compilation under gcc-2.95.

Note that this may not be a perfect fix - I just did what I had
to do to get it to compile - but the tests seem to run OK.

Hope this helps,
Ian
P.S. As I don't trust this newsreader to not reformat my
posts, I have put a copy of these diffs on my web site in
http://www.shelob.force9.co.uk/djgpp/patgrx23.dif

*** grx23orig/src/include/gcc/memfill.h Mon May 18 11:30:56 1998
--- grx23/src/include/gcc/memfill.h Sat Sep  4 20:25:32 1999
***************
*** 114,119 ****
--- 114,120 ----


  #define __INLINE_386_REPFILL24__(p,c,b,INS,SEG) do {               \
+   int dummy;                                                       \
    __asm__ volatile (                "\n"                           \
      "      testl  $1,%0              \n"                           \
      "      je     1f                 \n"                           \
***************
*** 180,188 ****
      "    "#INS"b  %%dl,"#SEG"(%0)    \n"                           \
      "      incl   %0                 \n"                           \
      "9:                              \n"                           \
!    : "=r" ((void *)(p)), "=r" ((int)(b))                    \
     : "d"  ((int)(c)), "0"  ((void *)(p)), "1"  ((int)(b))   \
!    : "ax", "cx", "dx"                                       \
    );                                                               \
  } while (0)

--- 181,189 ----
      "    "#INS"b  %%dl,"#SEG"(%0)    \n"                           \
      "      incl   %0                 \n"                           \
      "9:                              \n"                           \
!    : "=r" ((void *)(p)), "=r" ((int)(b)), "=dx" (dummy)     \
     : "d"  ((int)(c)), "0"  ((void *)(p)), "1"  ((int)(b))   \
!    : "ax", "cx"                                       \
    );                                                               \
  } while (0)


*** grx23orig/src/include/gcc/mempeek.h Mon May  4 20:23:36 1998
--- grx23/src/include/gcc/mempeek.h Sat Sep  4 20:27:50 1999
***************
*** 82,94 ****
  })

  #define __INLINE_386_POKE24__(P,C,INS,SEL) do {                         \
     __asm__ volatile(                              "\n"           \
    "    "#INS"w %%ax," SEL "(%1)             \n"           \
    "    shrl    $8,%%eax                     \n"           \
    "    "#INS"b %%ah," SEL "2(%1)            \n"           \
!   : /* nothing */                                         \
    : "a" ((unsigned)(C)), "r" ((void *)(P))                \
-   : "ax"                                                  \
     );                                                            \
  } while (0)

--- 82,94 ----
  })

  #define __INLINE_386_POKE24__(P,C,INS,SEL) do {                         \
+    int dummy;                                                    \
     __asm__ volatile(                              "\n"           \
    "    "#INS"w %%ax," SEL "(%1)             \n"           \
    "    shrl    $8,%%eax                     \n"           \
    "    "#INS"b %%ah," SEL "2(%1)            \n"           \
!   : "=ax" (dummy)                                         \
    : "a" ((unsigned)(C)), "r" ((void *)(P))                \
     );                                                            \
  } while (0)


*** grx23orig/src/utils/shiftscl.c Sun Apr  5 22:48:50 1998
--- grx23/src/utils/shiftscl.c Sat Sep  4 20:21:40 1999
***************
*** 17,22 ****
--- 17,23 ----
     GR_int8u far **src,
     int ws, int shift, int planes) {
    int plane;
+   int dummy;

    GRX_ENTER();
    if (shift <= 0) {
***************
*** 42,50 ****
     "   jne     1b           \n"
     "   shrb    %%cl,%%ch    \n"
     "   movb    %%ch,(%4)      "
!    : "=r" ((void *)s), "=r" ((void *)d), "=r" ((int)w)
     : "0" ((void *)s), "1" ((void *)d), "2" ((int)w), "c" ((int)shift)
!    : "ax", "cx"
   );
  #     elif defined(__TURBOC__)
   asm     push  ds           ;
--- 43,51 ----
     "   jne     1b           \n"
     "   shrb    %%cl,%%ch    \n"
     "   movb    %%ch,(%4)      "
!    : "=r" ((void *)s), "=r" ((void *)d), "=r" ((int)w), "=cx" (dummy)
     : "0" ((void *)s), "1" ((void *)d), "2" ((int)w), "c" ((int)shift)
!    : "ax"
   );
  #     elif defined(__TURBOC__)
   asm     push  ds           ;
***************
*** 96,104 ****
     "   incl    %4           \n"
     "   decl    %5           \n"
     "   jne     1b             "
!    : "=r" ((void *)s), "=r" ((void *)d), "=r" ((int)w)
     : "0" ((void *)s), "1" ((void *)d), "2" ((int)w), "c" ((int)shift)
!    : "ax", "cx"
   );
  #     elif defined(__TURBOC__)
   asm     push  ds           ;
--- 97,105 ----
     "   incl    %4           \n"
     "   decl    %5           \n"
     "   jne     1b             "
!    : "=r" ((void *)s), "=r" ((void *)d), "=r" ((int)w), "=cx" (dummy)
     : "0" ((void *)s), "1" ((void *)d), "2" ((int)w), "c" ((int)shift)
!    : "ax"
   );
  #     elif defined(__TURBOC__)
   asm     push  ds           ;



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019