Subversion Repositories Kolibri OS

Rev

Rev 8210 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. /*
  2.    Header definitions for the MMX routines for the HERMES library
  3.    Copyright (c) 1998 Christian Nentwich (c.nentwich@cs.ucl.ac.uk)
  4.    This source code is licensed under the GNU LGPL
  5.  
  6.    Please refer to the file COPYING.LIB contained in the distribution for
  7.    licensing conditions
  8. */
  9. #ifndef __HERMES_HEAD_MMX__
  10. #define __HERMES_HEAD_MMX__
  11.  
  12.  
  13. /* If you cannot stand ifdefs, then please do not look into this file, it's
  14.    going to end your life :) */
  15.  
  16. #ifdef X86_ASSEMBLER
  17.  
  18.  
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22.  
  23. void STACKCALL ConvertMMX(HermesConverterInterface *);
  24.  
  25. void STACKCALL ClearMMX_32(HermesClearInterface *);
  26. void STACKCALL ClearMMX_24(HermesClearInterface *);
  27. void STACKCALL ClearMMX_16(HermesClearInterface *);
  28. void STACKCALL ClearMMX_8(HermesClearInterface *);
  29.  
  30. void ConvertMMXpII32_24RGB888();
  31. void ConvertMMXpII32_16RGB565();
  32. void ConvertMMXpII32_16BGR565();
  33. void ConvertMMXpII32_16RGB555();
  34. void ConvertMMXpII32_16BGR565();
  35. void ConvertMMXpII32_16BGR555();
  36.  
  37. void ConvertMMXp32_16RGB555();
  38.  
  39. #ifdef __cplusplus
  40. }
  41. #endif
  42.  
  43.  
  44.  
  45. /* Fix the underscore business with ELF compilers */
  46.  
  47. #if (defined(__ELF__) && defined(__GNUC__)) || defined(__SUNPRO_C)
  48.   #ifdef __cplusplus
  49.   extern "C" {  
  50.   #endif
  51.  
  52.   extern void _ConvertMMX(HermesConverterInterface *);
  53.   extern void _ConvertMMXpII32_24RGB888();
  54.   extern void _ConvertMMXpII32_16RGB565();
  55.   extern void _ConvertMMXpII32_16BGR565();
  56.   extern void _ConvertMMXpII32_16RGB555();
  57.   extern void _ConvertMMXpII32_16BGR555();
  58.  
  59.   #define ConvertMMX _ConvertMMX
  60.   #define ConvertMMXpII32_24RGB888 _ConvertMMXpII32_24RGB888
  61.   #define ConvertMMXpII32_16RGB565 _ConvertMMXpII32_16RGB565
  62.   #define ConvertMMXpII32_16BGR565 _ConvertMMXpII32_16BGR565
  63.   #define ConvertMMXpII32_16RGB555 _ConvertMMXpII32_16RGB555
  64.   #define ConvertMMXpII32_16BGR555 _ConvertMMXpII32_16BGR555
  65.  
  66.   #ifdef __cplusplus
  67.   }
  68.   #endif
  69.  
  70. #endif /* ELF and GNUC */
  71.  
  72.  
  73.  
  74.  
  75. /* Make it work with Watcom */
  76. #ifdef __WATCOMC__
  77. #pragma warning 601 9
  78.  
  79. #pragma aux ConvertMMX "_*" modify [EAX EBX ECX EDX ESI EDI]
  80.  
  81. #pragma aux ClearMMX_32 "_*" modify [EAX EBX ECX EDX ESI EDI]
  82. #pragma aux ClearMMX_24 "_*" modify [EAX EBX ECX EDX ESI EDI]
  83. #pragma aux ClearMMX_16 "_*" modify [EAX EBX ECX EDX ESI EDI]
  84. #pragma aux ClearMMX_8 "_*" modify [EAX EBX ECX EDX ESI EDI]
  85.  
  86. #pragma aux ConvertMMXpII32_24RGB888 "_*"
  87. #pragma aux ConvertMMXpII32_16RGB565 "_*"
  88. #pragma aux ConvertMMXpII32_16BGR565 "_*"
  89. #pragma aux ConvertMMXpII32_16RGB555 "_*"
  90. #pragma aux ConvertMMXpII32_16BGR555 "_*"
  91. #pragma aux ConvertMMXp32_16RGB555 "_*"
  92.  
  93. #endif /* WATCOM */
  94.  
  95. #endif /* X86_ASSEMBLER */
  96.  
  97.  
  98. #endif
  99.