if (!(s3vPriv.chip == S3_ViRGE_GX2 || s3vPriv.chip == S3_ViRGE_MX)) {
if (!(S3_ViRGE_GX2_SERIES(s3vPriv.chip) || S3_ViRGE_MX_SERIES(s3vPriv.chip))) {
S3VRecolorCursor(pScr, pCurs, displayed)     ScreenPtr pScr;     CursorPtr pCurs;     Bool displayed;{   ColormapPtr pmap;   unsigned short packedcolfg, packedcolbg;   xColorItem sourceColor, maskColor;   if (!xf86VTSema)      return;   if (!displayed)      return;   switch (vgaBitsPerPixel) {   case 8:     if (!(s3vPriv.chip == S3_ViRGE_GX2 || s3vPriv.chip == S3_ViRGE_MX)) {      vgaGetInstalledColormaps(pScr, &pmap);      sourceColor.red = pCurs->foreRed;      sourceColor.green = pCurs->foreGreen;      sourceColor.blue = pCurs->foreBlue;      FakeAllocColor(pmap, &sourceColor);      maskColor.red = pCurs->backRed;      maskColor.green = pCurs->backGreen;      maskColor.blue = pCurs->backBlue;      FakeAllocColor(pmap, &maskColor);      FakeFreeColor(pmap, sourceColor.pixel);      FakeFreeColor(pmap, maskColor.pixel);      outb(vgaCRIndex, 0x45);      inb(vgaCRReg);	/* reset stack pointer */      outb(vgaCRIndex, 0x4A);      outb(vgaCRReg, sourceColor.pixel);      outb(vgaCRReg, sourceColor.pixel);      outb(vgaCRIndex, 0x45);      inb(vgaCRReg);	/* reset stack pointer */      outb(vgaCRIndex, 0x4B);      outb(vgaCRReg, maskColor.pixel);      outb(vgaCRReg, maskColor.pixel);      break;     }  /* else fall through for ViRGE/MX... */   case 16:     if (!(s3vPriv.chip == S3_ViRGE_GX2 || s3vPriv.chip == S3_ViRGE_MX)) {      if (vga256InfoRec.weight.green == 5 && s3vPriv.chip != S3_ViRGE_VX) {	 packedcolfg = ((pCurs->foreRed   & 0xf800) >>  1)	    | ((pCurs->foreGreen & 0xf800) >>  6)	       | ((pCurs->foreBlue  & 0xf800) >> 11);	 packedcolbg = ((pCurs->backRed   & 0xf800) >>  1)	    | ((pCurs->backGreen & 0xf800) >>  6)	       | ((pCurs->backBlue  & 0xf800) >> 11);      } else {	 packedcolfg = ((pCurs->foreRed   & 0xf800) >>  0)	    | ((pCurs->foreGreen & 0xfc00) >>  5)	       | ((pCurs->foreBlue  & 0xf800) >> 11);	 packedcolbg = ((pCurs->backRed   & 0xf800) >>  0)	    | ((pCurs->backGreen & 0xfc00) >>  5)	       | ((pCurs->backBlue  & 0xf800) >> 11);      }      outb(vgaCRIndex, 0x45);      inb(vgaCRReg);		/* reset stack pointer */      outb(vgaCRIndex, 0x4A);      outb(vgaCRReg, packedcolfg);      outb(vgaCRReg, packedcolfg>>8);      outb(vgaCRIndex, 0x45);      inb(vgaCRReg);		/* reset stack pointer */      outb(vgaCRIndex, 0x4B);      outb(vgaCRReg, packedcolbg);      outb(vgaCRReg, packedcolbg>>8);      break;     }  /* else fall through for ViRGE/MX... */   case 24:   case 32:      outb(vgaCRIndex, 0x45);      inb(vgaCRReg);		/* reset stack pointer */      outb(vgaCRIndex, 0x4A);      outb(vgaCRReg, pCurs->foreBlue >>8);      outb(vgaCRReg, pCurs->foreGreen>>8);      outb(vgaCRReg, pCurs->foreRed  >>8);      outb(vgaCRIndex, 0x45);      inb(vgaCRReg);		/* reset stack pointer */      outb(vgaCRIndex, 0x4B);      outb(vgaCRReg, pCurs->backBlue >>8);	 outb(vgaCRReg, pCurs->backGreen>>8);      outb(vgaCRReg, pCurs->backRed  >>8);      break;   }}