Mercurial > sdl-ios-xcode
annotate src/hermes/mmx_main.asm @ 1197:bb5ace455586
Fixed compiling with gcc 4, patch applied from Gentoo Bugzilla:
http://bugs.gentoo.org/show_bug.cgi?id=87809
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 08 Dec 2005 14:41:49 +0000 |
parents | da33b7e6d181 |
children | 2d6dc7de1145 |
rev | line source |
---|---|
0 | 1 ; |
2 ; mmx format converter main loops for HERMES | |
3 ; Some routines 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 BITS 32 | |
11 | |
12 GLOBAL _ConvertMMX | |
13 GLOBAL _mmxreturn | |
14 | |
15 | |
1166
da33b7e6d181
Date: Tue, 1 Nov 2005 20:25:10 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
0
diff
changeset
|
16 SECTION .note.GNU-stack noalloc progbits noexec nowrite |
0 | 17 SECTION .text |
18 | |
19 ;; _ConvertMMX: | |
20 ;; [ESP+8] ConverterInfo* | |
21 ;; -------------------------------------------------------------------------- | |
22 ;; ConverterInfo (ebp+..) | |
23 ;; 0: void *s_pixels | |
24 ;; 4: int s_width | |
25 ;; 8: int s_height | |
26 ;; 12: int s_add | |
27 ;; 16: void *d_pixels | |
28 ;; 20: int d_width | |
29 ;; 24: int d_height | |
30 ;; 28: int d_add | |
31 ;; 32: void (*converter_function)() | |
32 ;; 36: int32 *lookup | |
33 | |
34 _ConvertMMX: | |
35 push ebp | |
36 mov ebp,esp | |
37 | |
38 ; Save the registers used by the blitters, necessary for optimized code | |
39 pusha | |
40 | |
41 mov eax,[ebp+8] | |
42 | |
43 cmp dword [eax+4],BYTE 0 | |
44 je endconvert | |
45 | |
46 mov ebp,eax | |
47 | |
48 mov esi,[ebp+0] | |
49 mov edi,[ebp+16] | |
50 | |
51 y_loop: | |
52 mov ecx,[ebp+4] | |
53 | |
54 jmp [ebp+32] | |
55 | |
56 _mmxreturn: | |
57 add esi,[ebp+12] | |
58 add edi,[ebp+28] | |
59 | |
60 dec dword [ebp+8] | |
61 jnz y_loop | |
62 | |
63 | |
64 ; Restore the registers used by the blitters, necessary for optimized code | |
65 popa | |
66 | |
67 pop ebp | |
68 | |
69 endconvert: | |
70 emms | |
71 | |
72 ret | |
73 | |
74 | |
75 |