view src/hermes/HeadMMX.h @ 1135:cf6133247d34

Mac Classic and CodeWarrior patches. --ryan. From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se> Subject: Re: [SDL] Updated Mac patch Date: Tue, 6 Sep 2005 15:21:27 +0200 To: A list for developers using the SDL library <sdl@libsdl.org> Earlier, I wrote: > Updated the previous Mac patch to disable Carbon by default. > Also "fixed" the SDL.spec again, so that it builds on Darwin. > > http://www.algonet.se/~afb/SDL-1.2.9-mac.patch > Also applied fine to SDL12 CVS, when I tried it. > > Haven't completed any new packaging or projects for Xcode/PB, > but it seems to build and install fine here (in development). Tested the new patch to build with old CodeWarrior and MPW, and it seems it needed some hacks with those old headers... Just in case you want to support the archeological versions - here is a small add-on to the above patch, to fix those... http://www.algonet.se/~afb/SDL-1.2.9-classic.patch I couldn't get the old CW5 projects to build without a few modifications - such as deleting the stray old header in: "CWprojects/Support/Carbon/Include/ConditionalMacros.h" ? But I updated both projects to CW6 too and built for Carbon, and it ran all of the Mac test projects without any problems. The MPW file seems to have compiled, with a small order change. As long as you're still shipping the CWProjects and MPWmake with the download, they should probably be updated/fixed ? (another "solution" would of course be to just delete them) I'll post my new projects along with the new Xcode projects later on, along with XML exports of the various .mcp files. (CW5 builds for Classic / "PPC", and CW6 builds for Carbon) It'll be packaged as a part of the next SpriteWorld X release... http://spriteworldx.sourceforge.net/ [Classic/Carbon/Win/X11] --anders
author Ryan C. Gordon <icculus@icculus.org>
date Thu, 08 Sep 2005 06:34:28 +0000
parents 74212992fb08
children bb5ace455586
line wrap: on
line source

/*
   Header definitions for the MMX routines for the HERMES library
   Copyright (c) 1998 Christian Nentwich (c.nentwich@cs.ucl.ac.uk)
   This source code is licensed under the GNU LGPL
  
   Please refer to the file COPYING.LIB contained in the distribution for
   licensing conditions
*/

#ifndef __HERMES_HEAD_MMX__
#define __HERMES_HEAD_MMX__


/* If you cannot stand ifdefs, then please do not look into this file, it's
   going to end your life :) */

#ifdef X86_ASSEMBLER


#ifdef __cplusplus
extern "C" {
#endif

void STACKCALL ConvertMMX(HermesConverterInterface *);

void STACKCALL ClearMMX_32(HermesClearInterface *);
void STACKCALL ClearMMX_24(HermesClearInterface *);
void STACKCALL ClearMMX_16(HermesClearInterface *);
void STACKCALL ClearMMX_8(HermesClearInterface *);

void ConvertMMXpII32_24RGB888();
void ConvertMMXpII32_16RGB565();
void ConvertMMXpII32_16BGR565();
void ConvertMMXpII32_16RGB555();
void ConvertMMXpII32_16BGR565();
void ConvertMMXpII32_16BGR555();

void ConvertMMXp32_16RGB555();

#ifdef __cplusplus
}
#endif



/* Fix the underscore business with ELF compilers */

#if defined(__ELF__) && defined(__GNUC__)
  #ifdef __cplusplus 
  extern "C" {   
  #endif

  void ConvertMMX(HermesConverterInterface *) __attribute__ ((alias ("_ConvertMMX")));
#if 0
  void ClearMMX_32(HermesClearInterface *) __attribute__ ((alias ("_ClearMMX_32")));
  void ClearMMX_24(HermesClearInterface *)  __attribute__ ((alias ("_ClearMMX_24")));
  void ClearMMX_16(HermesClearInterface *)  __attribute__ ((alias ("_ClearMMX_16")));
  void ClearMMX_8(HermesClearInterface *)  __attribute__ ((alias ("_ClearMMX_8")));

  void ConvertMMXp32_16RGB555() __attribute__ ((alias ("_ConvertMMXp32_16RGB555")));
#endif

  void ConvertMMXpII32_24RGB888() __attribute__ ((alias ("_ConvertMMXpII32_24RGB888")));
  void ConvertMMXpII32_16RGB565() __attribute__ ((alias ("_ConvertMMXpII32_16RGB565")));
  void ConvertMMXpII32_16BGR565() __attribute__ ((alias ("_ConvertMMXpII32_16BGR565")));
  void ConvertMMXpII32_16RGB555() __attribute__ ((alias ("_ConvertMMXpII32_16RGB555")));
  void ConvertMMXpII32_16BGR555() __attribute__ ((alias ("_ConvertMMXpII32_16BGR555")));

  #ifdef __cplusplus
  }
  #endif

#endif /* ELF and GNUC */




/* Make it work with Watcom */
#ifdef __WATCOMC__
#pragma warning 601 9

#pragma aux ConvertMMX "_*" modify [EAX EBX ECX EDX ESI EDI]

#pragma aux ClearMMX_32 "_*" modify [EAX EBX ECX EDX ESI EDI]
#pragma aux ClearMMX_24 "_*" modify [EAX EBX ECX EDX ESI EDI]
#pragma aux ClearMMX_16 "_*" modify [EAX EBX ECX EDX ESI EDI]
#pragma aux ClearMMX_8 "_*" modify [EAX EBX ECX EDX ESI EDI]

#pragma aux ConvertMMXpII32_24RGB888 "_*"
#pragma aux ConvertMMXpII32_16RGB565 "_*"
#pragma aux ConvertMMXpII32_16BGR565 "_*"
#pragma aux ConvertMMXpII32_16RGB555 "_*"
#pragma aux ConvertMMXpII32_16BGR555 "_*"
#pragma aux ConvertMMXp32_16RGB555 "_*"

#endif /* WATCOM */

#endif /* X86_ASSEMBLER */


#endif