src/hermes/HeadX86.h
author Ben Avison <bavison@riscosopen.org>
Thu, 31 Oct 2019 14:00:28 +0300
branchSDL-1.2
changeset 13219 4f88e197acad
parent 4152 39b9405d3cb6
permissions -rw-r--r--
ARM: Create configure option --enable-arm-neon to govern assembly optimizations
---
configure.in | 39 +++++++++++++++++++++++++++++++++++++++
include/SDL_config.h.in | 1 +
include/SDL_cpuinfo.h | 3 +++
src/cpuinfo/SDL_cpuinfo.c | 37 +++++++++++++++++++++++++++++++++++++
4 files changed, 80 insertions(+)
slouken@0
     1
/*
slouken@0
     2
   Header definitions for the x86 routines for the HERMES library
slouken@0
     3
   Copyright (c) 1998 Christian Nentwich (brn@eleet.mcb.at)
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_X86__
slouken@0
    11
#define __HERMES_HEAD_X86__
slouken@0
    12
slouken@0
    13
slouken@0
    14
#ifdef X86_ASSEMBLER
slouken@0
    15
slouken@0
    16
/* If you can't stand IFDEFS, then close your eyes now, please :) */
slouken@0
    17
slouken@0
    18
/* Ok, we start with normal function definitions */
slouken@0
    19
#ifdef __cplusplus
slouken@0
    20
extern "C" {
slouken@0
    21
#endif
slouken@0
    22
slouken@0
    23
slouken@0
    24
void STACKCALL ConvertX86(HermesConverterInterface *);
slouken@0
    25
void STACKCALL ClearX86_32(HermesClearInterface *);
slouken@0
    26
void STACKCALL ClearX86_24(HermesClearInterface *);
slouken@0
    27
void STACKCALL ClearX86_16(HermesClearInterface *);
slouken@0
    28
void STACKCALL ClearX86_8(HermesClearInterface *);
slouken@0
    29
slouken@0
    30
int STACKCALL Hermes_X86_CPU();
slouken@0
    31
slouken@0
    32
void ConvertX86p32_32BGR888();
slouken@0
    33
void ConvertX86p32_32RGBA888();
slouken@0
    34
void ConvertX86p32_32BGRA888();
slouken@0
    35
void ConvertX86p32_24RGB888();
slouken@0
    36
void ConvertX86p32_24BGR888();
slouken@0
    37
void ConvertX86p32_16RGB565();
slouken@0
    38
void ConvertX86p32_16BGR565();
slouken@0
    39
void ConvertX86p32_16RGB555();
slouken@0
    40
void ConvertX86p32_16BGR555();
slouken@0
    41
void ConvertX86p32_8RGB332();
slouken@0
    42
slouken@0
    43
void ConvertX86p16_32RGB888();
slouken@0
    44
void ConvertX86p16_32BGR888();
slouken@0
    45
void ConvertX86p16_32RGBA888();
slouken@0
    46
void ConvertX86p16_32BGRA888();
slouken@0
    47
void ConvertX86p16_24RGB888();
slouken@0
    48
void ConvertX86p16_24BGR888();
slouken@0
    49
void ConvertX86p16_16BGR565();
slouken@0
    50
void ConvertX86p16_16RGB555();
slouken@0
    51
void ConvertX86p16_16BGR555();
slouken@0
    52
void ConvertX86p16_8RGB332();
slouken@0
    53
slouken@0
    54
void CopyX86p_4byte();
slouken@0
    55
void CopyX86p_3byte();
slouken@0
    56
void CopyX86p_2byte();
slouken@0
    57
void CopyX86p_1byte();
slouken@0
    58
slouken@0
    59
void ConvertX86pI8_32();
slouken@0
    60
void ConvertX86pI8_24();
slouken@0
    61
void ConvertX86pI8_16();
slouken@0
    62
slouken@366
    63
extern int ConvertX86p16_32RGB888_LUT_X86[512];
slouken@366
    64
extern int ConvertX86p16_32BGR888_LUT_X86[512];
slouken@366
    65
extern int ConvertX86p16_32RGBA888_LUT_X86[512];
slouken@366
    66
extern int ConvertX86p16_32BGRA888_LUT_X86[512];
slouken@0
    67
  
slouken@0
    68
#ifdef __cplusplus
slouken@0
    69
}
slouken@0
    70
#endif
slouken@0
    71
slouken@0
    72
slouken@0
    73
slouken@0
    74
slouken@0
    75
/* Now fix up the ELF underscore problem */
slouken@0
    76
icculus@4152
    77
#if (defined(__ELF__) && defined(__GNUC__)) || defined(__SUNPRO_C)
slouken@0
    78
  #ifdef __cplusplus
slouken@0
    79
  extern "C" {
slouken@0
    80
  #endif
slouken@0
    81
slouken@1197
    82
  extern int _Hermes_X86_CPU();
slouken@0
    83
slouken@1197
    84
  extern void _ConvertX86(HermesConverterInterface *);
slouken@0
    85
slouken@1197
    86
  extern void _ConvertX86p32_32BGR888();
slouken@1197
    87
  extern void _ConvertX86p32_32RGBA888();
slouken@1197
    88
  extern void _ConvertX86p32_32BGRA888();
slouken@1197
    89
  extern void _ConvertX86p32_24RGB888();
slouken@1197
    90
  extern void _ConvertX86p32_24BGR888();
slouken@1197
    91
  extern void _ConvertX86p32_16RGB565();
slouken@1197
    92
  extern void _ConvertX86p32_16BGR565();
slouken@1197
    93
  extern void _ConvertX86p32_16RGB555();
slouken@1197
    94
  extern void _ConvertX86p32_16BGR555();
slouken@1197
    95
  extern void _ConvertX86p32_8RGB332();
slouken@1197
    96
slouken@1197
    97
  extern void _ConvertX86p16_16BGR565();
slouken@1197
    98
  extern void _ConvertX86p16_16RGB555();
slouken@1197
    99
  extern void _ConvertX86p16_16BGR555();
slouken@1197
   100
  extern void _ConvertX86p16_8RGB332();
slouken@1197
   101
slouken@0
   102
slouken@1197
   103
  #define Hermes_X86_CPU _Hermes_X86_CPU
slouken@1197
   104
slouken@1197
   105
  #define ConvertX86 _ConvertX86
slouken@0
   106
slouken@1197
   107
  #define ConvertX86p32_32BGR888 _ConvertX86p32_32BGR888
slouken@1197
   108
  #define ConvertX86p32_32RGBA888 _ConvertX86p32_32RGBA888
slouken@1197
   109
  #define ConvertX86p32_32BGRA888 _ConvertX86p32_32BGRA888
slouken@1197
   110
  #define ConvertX86p32_24RGB888 _ConvertX86p32_24RGB888
slouken@1197
   111
  #define ConvertX86p32_24BGR888 _ConvertX86p32_24BGR888
slouken@1197
   112
  #define ConvertX86p32_16RGB565 _ConvertX86p32_16RGB565
slouken@1197
   113
  #define ConvertX86p32_16BGR565 _ConvertX86p32_16BGR565
slouken@1197
   114
  #define ConvertX86p32_16RGB555 _ConvertX86p32_16RGB555
slouken@1197
   115
  #define ConvertX86p32_16BGR555 _ConvertX86p32_16BGR555
slouken@1197
   116
  #define ConvertX86p32_8RGB332 _ConvertX86p32_8RGB332
slouken@0
   117
slouken@1197
   118
  #define ConvertX86p16_16BGR565 _ConvertX86p16_16BGR565
slouken@1197
   119
  #define ConvertX86p16_16RGB555 _ConvertX86p16_16RGB555
slouken@1197
   120
  #define ConvertX86p16_16BGR555 _ConvertX86p16_16BGR555
slouken@1197
   121
  #define ConvertX86p16_8RGB332 _ConvertX86p16_8RGB332
slouken@0
   122
slouken@0
   123
slouken@0
   124
  #ifdef __cplusplus
slouken@0
   125
  }
slouken@0
   126
  #endif
slouken@0
   127
slouken@0
   128
#endif /* ELF & GNU */
slouken@0
   129
slouken@0
   130
slouken@0
   131
slouken@0
   132
/* Make it run with WATCOM C */
slouken@0
   133
#ifdef __WATCOMC__
slouken@0
   134
#pragma warning 601 9
slouken@0
   135
slouken@0
   136
#pragma aux Hermes_X86_CPU "_*"
slouken@0
   137
slouken@0
   138
#pragma aux ConvertX86 "_*" modify [EAX EBX ECX EDX ESI EDI]
slouken@0
   139
#pragma aux ClearX86_32 "_*" modify [EAX EBX ECX EDX ESI EDI]
slouken@0
   140
#pragma aux ClearX86_24 "_*" modify [EAX EBX ECX EDX ESI EDI]
slouken@0
   141
#pragma aux ClearX86_16 "_*" modify [EAX EBX ECX EDX ESI EDI]
slouken@0
   142
#pragma aux ClearX86_8 "_*" modify [EAX EBX ECX EDX ESI EDI]
slouken@0
   143
slouken@0
   144
#pragma aux ConvertX86p32_32BGR888 "_*"
slouken@0
   145
#pragma aux ConvertX86p32_32RGBA888 "_*"
slouken@0
   146
#pragma aux ConvertX86p32_32BGRA888 "_*"
slouken@0
   147
#pragma aux ConvertX86p32_24RGB888 "_*"
slouken@0
   148
#pragma aux ConvertX86p32_24BGR888 "_*"
slouken@0
   149
#pragma aux ConvertX86p32_16RGB565 "_*"
slouken@0
   150
#pragma aux ConvertX86p32_16BGR565 "_*"
slouken@0
   151
#pragma aux ConvertX86p32_16RGB555 "_*"
slouken@0
   152
#pragma aux ConvertX86p32_16BGR555 "_*"
slouken@0
   153
#pragma aux ConvertX86p32_8RGB332 "_*"
slouken@0
   154
slouken@0
   155
#pragma aux ConvertX86p16_32RGB888 "_*"
slouken@0
   156
#pragma aux ConvertX86p16_32BGR888 "_*"
slouken@0
   157
#pragma aux ConvertX86p16_32RGBA888 "_*"
slouken@0
   158
#pragma aux ConvertX86p16_32BGRA888 "_*"
slouken@0
   159
#pragma aux ConvertX86p16_24RGB888 "_*"
slouken@0
   160
#pragma aux ConvertX86p16_24BGR888 "_*"
slouken@0
   161
#pragma aux ConvertX86p16_16BGR565 "_*"
slouken@0
   162
#pragma aux ConvertX86p16_16RGB555 "_*"
slouken@0
   163
#pragma aux ConvertX86p16_16BGR555 "_*"
slouken@0
   164
#pragma aux ConvertX86p16_8RGB332 "_*"
slouken@0
   165
slouken@0
   166
#pragma aux CopyX86p_4byte "_*"
slouken@0
   167
#pragma aux CopyX86p_3byte "_*"
slouken@0
   168
#pragma aux CopyX86p_2byte "_*"
slouken@0
   169
#pragma aux CopyX86p_1byte "_*"
slouken@0
   170
slouken@0
   171
#pragma aux ConvertX86pI8_32 "_*"
slouken@0
   172
#pragma aux ConvertX86pI8_24 "_*"
slouken@0
   173
#pragma aux ConvertX86pI8_16 "_*"
slouken@0
   174
slouken@0
   175
#pragma aux ConvertX86p16_32RGB888_LUT_X86 "_*"
slouken@0
   176
#pragma aux ConvertX86p16_32BGR888_LUT_X86 "_*"
slouken@0
   177
#pragma aux ConvertX86p16_32RGBA888_LUT_X86 "_*"
slouken@0
   178
#pragma aux ConvertX86p16_32BGRA888_LUT_X86 "_*"
slouken@0
   179
slouken@0
   180
#endif /* __WATCOMC__ */
slouken@0
   181
slouken@0
   182
slouken@0
   183
#endif /* X86_ASSEMBLER */
slouken@0
   184
slouken@0
   185
slouken@0
   186
#endif