src/hermes/HeadMMX.h
author Sam Lantinga
Mon, 06 Feb 2006 08:28:51 +0000
changeset 1330 450721ad5436
parent 1197 bb5ace455586
child 1402 d910939febfa
permissions -rw-r--r--
It's now possible to build SDL without any C runtime at all on Windows,
using Visual C++ 2005
     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 
    10 #ifndef __HERMES_HEAD_MMX__
    11 #define __HERMES_HEAD_MMX__
    12 
    13 
    14 /* If you cannot stand ifdefs, then please do not look into this file, it's
    15    going to end your life :) */
    16 
    17 #ifdef X86_ASSEMBLER
    18 
    19 
    20 #ifdef __cplusplus
    21 extern "C" {
    22 #endif
    23 
    24 void STACKCALL ConvertMMX(HermesConverterInterface *);
    25 
    26 void STACKCALL ClearMMX_32(HermesClearInterface *);
    27 void STACKCALL ClearMMX_24(HermesClearInterface *);
    28 void STACKCALL ClearMMX_16(HermesClearInterface *);
    29 void STACKCALL ClearMMX_8(HermesClearInterface *);
    30 
    31 void ConvertMMXpII32_24RGB888();
    32 void ConvertMMXpII32_16RGB565();
    33 void ConvertMMXpII32_16BGR565();
    34 void ConvertMMXpII32_16RGB555();
    35 void ConvertMMXpII32_16BGR565();
    36 void ConvertMMXpII32_16BGR555();
    37 
    38 void ConvertMMXp32_16RGB555();
    39 
    40 #ifdef __cplusplus
    41 }
    42 #endif
    43 
    44 
    45 
    46 /* Fix the underscore business with ELF compilers */
    47 
    48 #if defined(__ELF__) && defined(__GNUC__)
    49   #ifdef __cplusplus 
    50   extern "C" {   
    51   #endif
    52 
    53   extern void _ConvertMMX(HermesConverterInterface *);
    54   extern void _ConvertMMXpII32_24RGB888();
    55   extern void _ConvertMMXpII32_16RGB565();
    56   extern void _ConvertMMXpII32_16BGR565();
    57   extern void _ConvertMMXpII32_16RGB555();
    58   extern void _ConvertMMXpII32_16BGR555();
    59 
    60   #define ConvertMMX _ConvertMMX
    61   #define ConvertMMXpII32_24RGB888 _ConvertMMXpII32_24RGB888
    62   #define ConvertMMXpII32_16RGB565 _ConvertMMXpII32_16RGB565
    63   #define ConvertMMXpII32_16BGR565 _ConvertMMXpII32_16BGR565
    64   #define ConvertMMXpII32_16RGB555 _ConvertMMXpII32_16RGB555
    65   #define ConvertMMXpII32_16BGR555 _ConvertMMXpII32_16BGR555
    66 
    67   #ifdef __cplusplus
    68   }
    69   #endif
    70 
    71 #endif /* ELF and GNUC */
    72 
    73 
    74 
    75 
    76 /* Make it work with Watcom */
    77 #ifdef __WATCOMC__
    78 #pragma warning 601 9
    79 
    80 #pragma aux ConvertMMX "_*" modify [EAX EBX ECX EDX ESI EDI]
    81 
    82 #pragma aux ClearMMX_32 "_*" modify [EAX EBX ECX EDX ESI EDI]
    83 #pragma aux ClearMMX_24 "_*" modify [EAX EBX ECX EDX ESI EDI]
    84 #pragma aux ClearMMX_16 "_*" modify [EAX EBX ECX EDX ESI EDI]
    85 #pragma aux ClearMMX_8 "_*" modify [EAX EBX ECX EDX ESI EDI]
    86 
    87 #pragma aux ConvertMMXpII32_24RGB888 "_*"
    88 #pragma aux ConvertMMXpII32_16RGB565 "_*"
    89 #pragma aux ConvertMMXpII32_16BGR565 "_*"
    90 #pragma aux ConvertMMXpII32_16RGB555 "_*"
    91 #pragma aux ConvertMMXpII32_16BGR555 "_*"
    92 #pragma aux ConvertMMXp32_16RGB555 "_*"
    93 
    94 #endif /* WATCOM */
    95 
    96 #endif /* X86_ASSEMBLER */
    97 
    98 
    99 #endif