src/hermes/HeadMMX.h
author Ryan C. Gordon
Wed, 29 Nov 2006 10:30:05 +0000
branchSDL-1.2
changeset 3900 ce3a2bd11305
parent 1402 d910939febfa
child 1662 782fd950bd46
child 1895 c121d94672cb
child 4152 39b9405d3cb6
permissions -rw-r--r--
Wrapped some macro params in parentheses for alloca wrappers.
Thansk, Suzuki Masahiro.
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@1402
     9
#include "SDL_config.h"
slouken@0
    10
slouken@0
    11
#ifndef __HERMES_HEAD_MMX__
slouken@0
    12
#define __HERMES_HEAD_MMX__
slouken@0
    13
slouken@0
    14
slouken@0
    15
/* If you cannot stand ifdefs, then please do not look into this file, it's
slouken@0
    16
   going to end your life :) */
slouken@0
    17
slouken@0
    18
#ifdef X86_ASSEMBLER
slouken@0
    19
slouken@0
    20
slouken@0
    21
#ifdef __cplusplus
slouken@0
    22
extern "C" {
slouken@0
    23
#endif
slouken@0
    24
slouken@0
    25
void STACKCALL ConvertMMX(HermesConverterInterface *);
slouken@0
    26
slouken@0
    27
void STACKCALL ClearMMX_32(HermesClearInterface *);
slouken@0
    28
void STACKCALL ClearMMX_24(HermesClearInterface *);
slouken@0
    29
void STACKCALL ClearMMX_16(HermesClearInterface *);
slouken@0
    30
void STACKCALL ClearMMX_8(HermesClearInterface *);
slouken@0
    31
slouken@0
    32
void ConvertMMXpII32_24RGB888();
slouken@0
    33
void ConvertMMXpII32_16RGB565();
slouken@0
    34
void ConvertMMXpII32_16BGR565();
slouken@0
    35
void ConvertMMXpII32_16RGB555();
slouken@0
    36
void ConvertMMXpII32_16BGR565();
slouken@0
    37
void ConvertMMXpII32_16BGR555();
slouken@0
    38
slouken@0
    39
void ConvertMMXp32_16RGB555();
slouken@0
    40
slouken@0
    41
#ifdef __cplusplus
slouken@0
    42
}
slouken@0
    43
#endif
slouken@0
    44
slouken@0
    45
slouken@0
    46
slouken@0
    47
/* Fix the underscore business with ELF compilers */
slouken@0
    48
slouken@0
    49
#if defined(__ELF__) && defined(__GNUC__)
slouken@0
    50
  #ifdef __cplusplus 
slouken@0
    51
  extern "C" {   
slouken@0
    52
  #endif
slouken@0
    53
slouken@1197
    54
  extern void _ConvertMMX(HermesConverterInterface *);
slouken@1197
    55
  extern void _ConvertMMXpII32_24RGB888();
slouken@1197
    56
  extern void _ConvertMMXpII32_16RGB565();
slouken@1197
    57
  extern void _ConvertMMXpII32_16BGR565();
slouken@1197
    58
  extern void _ConvertMMXpII32_16RGB555();
slouken@1197
    59
  extern void _ConvertMMXpII32_16BGR555();
slouken@0
    60
slouken@1197
    61
  #define ConvertMMX _ConvertMMX
slouken@1197
    62
  #define ConvertMMXpII32_24RGB888 _ConvertMMXpII32_24RGB888
slouken@1197
    63
  #define ConvertMMXpII32_16RGB565 _ConvertMMXpII32_16RGB565
slouken@1197
    64
  #define ConvertMMXpII32_16BGR565 _ConvertMMXpII32_16BGR565
slouken@1197
    65
  #define ConvertMMXpII32_16RGB555 _ConvertMMXpII32_16RGB555
slouken@1197
    66
  #define ConvertMMXpII32_16BGR555 _ConvertMMXpII32_16BGR555
slouken@0
    67
slouken@0
    68
  #ifdef __cplusplus
slouken@0
    69
  }
slouken@0
    70
  #endif
slouken@0
    71
slouken@0
    72
#endif /* ELF and GNUC */
slouken@0
    73
slouken@0
    74
slouken@0
    75
slouken@0
    76
slouken@0
    77
/* Make it work with Watcom */
slouken@0
    78
#ifdef __WATCOMC__
slouken@0
    79
#pragma warning 601 9
slouken@0
    80
slouken@0
    81
#pragma aux ConvertMMX "_*" modify [EAX EBX ECX EDX ESI EDI]
slouken@0
    82
slouken@0
    83
#pragma aux ClearMMX_32 "_*" modify [EAX EBX ECX EDX ESI EDI]
slouken@0
    84
#pragma aux ClearMMX_24 "_*" modify [EAX EBX ECX EDX ESI EDI]
slouken@0
    85
#pragma aux ClearMMX_16 "_*" modify [EAX EBX ECX EDX ESI EDI]
slouken@0
    86
#pragma aux ClearMMX_8 "_*" modify [EAX EBX ECX EDX ESI EDI]
slouken@0
    87
slouken@0
    88
#pragma aux ConvertMMXpII32_24RGB888 "_*"
slouken@0
    89
#pragma aux ConvertMMXpII32_16RGB565 "_*"
slouken@0
    90
#pragma aux ConvertMMXpII32_16BGR565 "_*"
slouken@0
    91
#pragma aux ConvertMMXpII32_16RGB555 "_*"
slouken@0
    92
#pragma aux ConvertMMXpII32_16BGR555 "_*"
slouken@0
    93
#pragma aux ConvertMMXp32_16RGB555 "_*"
slouken@0
    94
slouken@0
    95
#endif /* WATCOM */
slouken@0
    96
slouken@0
    97
#endif /* X86_ASSEMBLER */
slouken@0
    98
slouken@0
    99
slouken@0
   100
#endif