Subversion Repositories Kolibri OS

Rev

Rev 8210 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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