Mercurial > sdl-ios-xcode
annotate src/hermes/x86_main.asm @ 4427:eada7e321df6 SDL-1.2
Fixed bug #943
Ozkan Sezer 2010-02-06 12:31:06 PST
Hi:
Here are some small fixes for compiling SDL against mingw-w64.
(see http://mingw-w64.sourceforge.net/ . Despite the name, it
supports both win32 and win64.) Two patches, one for SDL-1.2
and one for SDL-1.3 attached.
src/audio/windx5/directx.h and src/video/windx5/directx.h (both
SDL-1.2 and SDL-1.3.) I get compilation errors about some union
not having a member named u1 and alike, because of other system
headers being included before this one and them already defining
DUMMYUNIONNAME and stuff. This header probably assumes that those
stuff are defined in windef.h, but mingw-w64 headers define them
in _mingw.h. Easily fixed by moving NONAMELESSUNION definition to
the top of the file. SDL_dx5yuv.c (SDL-1.2-only) also needs to
include the header before SDL_video.h to avoid the same problem.
src/thread/win32/SDL_systhread.c (both SDL-1.2 and SDL-1.3.) :
The __GNUC__ case for pfnSDL_CurrentBeginThread is 32-bit centric
because _beginthreadex returns uintptr_t, not unsigned long which
is 32 bits in win64. Changing the return type to uintptr_t fixes
it.
Hope these are useful. Thanks.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 10 Mar 2010 15:04:13 +0000 |
parents | 540466e900db |
children |
rev | line source |
---|---|
0 | 1 ; |
2 ; x86 format converters for HERMES | |
3 ; Some routines Copyright (c) 1998 Christian Nentwich (brn@eleet.mcb.at) | |
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 ; Most routines are (c) Glenn Fiedler (ptc@gaffer.org), used with permission | |
10 ; | |
11 | |
12 BITS 32 | |
13 | |
1873
eb4d9d99849b
Renamed, per Mike's comment on bug #157
Sam Lantinga <slouken@libsdl.org>
parents:
1871
diff
changeset
|
14 %include "common.inc" |
1871 | 15 |
16 SDL_FUNC _ConvertX86 | |
0 | 17 |
18 SECTION .text | |
19 | |
20 ;; _ConvertX86: | |
21 ;; [ESP+8] ConverterInfo* | |
22 ;; -------------------------------------------------------------------------- | |
23 ;; ConverterInfo (ebp+..) | |
24 ;; 0: void *s_pixels | |
25 ;; 4: int s_width | |
26 ;; 8: int s_height | |
27 ;; 12: int s_add | |
28 ;; 16: void *d_pixels | |
29 ;; 20: int d_width | |
30 ;; 24: int d_height | |
31 ;; 28: int d_add | |
32 ;; 32: void (*converter_function)() | |
33 ;; 36: int32 *lookup | |
34 | |
35 _ConvertX86: | |
36 push ebp | |
37 mov ebp,esp | |
38 | |
39 ; Save the registers used by the blitters, necessary for optimized code | |
40 pusha | |
41 | |
42 mov eax,[ebp+8] | |
43 | |
44 cmp dword [eax+4],BYTE 0 | |
45 je endconvert | |
46 | |
47 mov ebp,eax | |
48 | |
49 mov esi,[ebp+0] | |
50 mov edi,[ebp+16] | |
51 | |
52 y_loop: | |
53 mov ecx,[ebp+4] | |
54 | |
3983
540466e900db
Removed textrels from hermes code.
Ryan C. Gordon <icculus@icculus.org>
parents:
1873
diff
changeset
|
55 call [ebp+32] |
0 | 56 |
57 add esi,[ebp+12] | |
58 add edi,[ebp+28] | |
59 | |
60 dec dword [ebp+8] | |
61 jnz y_loop | |
62 | |
63 ; Restore the registers used by the blitters, necessary for optimized code | |
64 popa | |
65 | |
66 pop ebp | |
67 | |
68 endconvert: | |
69 ret | |
70 | |
71 | |
72 | |
1199
2d6dc7de1145
From: Mike Frysinger <vapier@gentoo.org>
Ryan C. Gordon <icculus@icculus.org>
parents:
1166
diff
changeset
|
73 %ifidn __OUTPUT_FORMAT__,elf |
2d6dc7de1145
From: Mike Frysinger <vapier@gentoo.org>
Ryan C. Gordon <icculus@icculus.org>
parents:
1166
diff
changeset
|
74 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
|
75 %endif |