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