Mercurial > sdl-ios-xcode
annotate src/hermes/mmx_main.asm @ 2204:9f64d06fa168
Added support for building version.rc in Windows build.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 16 Jul 2007 03:28:48 +0000 |
parents | 180fa05e98e2 |
children |
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 | |
1873
eb4d9d99849b
Renamed, per Mike's comment on bug #157
Sam Lantinga <slouken@libsdl.org>
parents:
1871
diff
changeset
|
12 %include "common.inc" |
1871 | 13 |
14 SDL_FUNC _ConvertMMX | |
0 | 15 |
16 SECTION .text | |
17 | |
18 ;; _ConvertMMX: | |
19 ;; [ESP+8] ConverterInfo* | |
20 ;; -------------------------------------------------------------------------- | |
21 ;; ConverterInfo (ebp+..) | |
22 ;; 0: void *s_pixels | |
23 ;; 4: int s_width | |
24 ;; 8: int s_height | |
25 ;; 12: int s_add | |
26 ;; 16: void *d_pixels | |
27 ;; 20: int d_width | |
28 ;; 24: int d_height | |
29 ;; 28: int d_add | |
30 ;; 32: void (*converter_function)() | |
31 ;; 36: int32 *lookup | |
32 | |
33 _ConvertMMX: | |
34 push ebp | |
35 mov ebp,esp | |
36 | |
37 ; Save the registers used by the blitters, necessary for optimized code | |
38 pusha | |
39 | |
40 mov eax,[ebp+8] | |
41 | |
42 cmp dword [eax+4],BYTE 0 | |
43 je endconvert | |
44 | |
45 mov ebp,eax | |
46 | |
47 mov esi,[ebp+0] | |
48 mov edi,[ebp+16] | |
49 | |
50 y_loop: | |
51 mov ecx,[ebp+4] | |
52 | |
2134
180fa05e98e2
Merged r3106:3107 from branches/SDL-1.2: Hermes PIC fixes.
Ryan C. Gordon <icculus@icculus.org>
parents:
1873
diff
changeset
|
53 call [ebp+32] |
0 | 54 |
55 add esi,[ebp+12] | |
56 add edi,[ebp+28] | |
57 | |
58 dec dword [ebp+8] | |
59 jnz y_loop | |
60 | |
61 | |
62 ; Restore the registers used by the blitters, necessary for optimized code | |
63 popa | |
64 | |
65 pop ebp | |
66 | |
67 endconvert: | |
68 emms | |
69 | |
70 ret | |
71 | |
1199
2d6dc7de1145
From: Mike Frysinger <vapier@gentoo.org>
Ryan C. Gordon <icculus@icculus.org>
parents:
1166
diff
changeset
|
72 %ifidn __OUTPUT_FORMAT__,elf |
2d6dc7de1145
From: Mike Frysinger <vapier@gentoo.org>
Ryan C. Gordon <icculus@icculus.org>
parents:
1166
diff
changeset
|
73 section .note.GNU-stack noalloc noexec nowrite progbits |
2d6dc7de1145
From: Mike Frysinger <vapier@gentoo.org>
Ryan C. Gordon <icculus@icculus.org>
parents:
1166
diff
changeset
|
74 %endif |