Mercurial > sdl-ios-xcode
annotate src/stdlib/SDL_stdlib.c @ 4080:e1098effe318 SDL-1.2
Better windres detection
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 18 Jul 2007 04:04:24 +0000 |
parents | bb6839704ed6 |
children | 782fd950bd46 c121d94672cb a1b03ba2fcd0 |
rev | line source |
---|---|
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1 /* |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
2 SDL - Simple DirectMedia Layer |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
3 Copyright (C) 1997-2006 Sam Lantinga |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
4 |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
5 This library is free software; you can redistribute it and/or |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
7 License as published by the Free Software Foundation; either |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
9 |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
10 This library is distributed in the hope that it will be useful, |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
13 Lesser General Public License for more details. |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
14 |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
18 |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
19 Sam Lantinga |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
20 slouken@libsdl.org |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
21 */ |
1402
d910939febfa
Use consistent identifiers for the various platforms we support.
Sam Lantinga <slouken@libsdl.org>
parents:
1354
diff
changeset
|
22 #include "SDL_config.h" |
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
23 |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
24 /* This file contains portable stdlib functions for SDL */ |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
25 |
1354
22f39393668a
Fixed build problem with SDL_string.c
Sam Lantinga <slouken@libsdl.org>
parents:
1346
diff
changeset
|
26 #include "SDL_stdinc.h" |
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
27 |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
28 #ifndef HAVE_LIBC |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
29 /* These are some C runtime intrinsics that need to be defined */ |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
30 |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
31 #if defined(_MSC_VER) |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
32 |
1433
bb6839704ed6
SDL_windows.h is no longer necessary
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
33 #ifndef __FLTUSED__ |
bb6839704ed6
SDL_windows.h is no longer necessary
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
34 #define __FLTUSED__ |
bb6839704ed6
SDL_windows.h is no longer necessary
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
35 #ifdef __cplusplus |
bb6839704ed6
SDL_windows.h is no longer necessary
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
36 extern "C" |
bb6839704ed6
SDL_windows.h is no longer necessary
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
37 #endif |
bb6839704ed6
SDL_windows.h is no longer necessary
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
38 __declspec(selectany) int _fltused=1; |
bb6839704ed6
SDL_windows.h is no longer necessary
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
39 #endif |
bb6839704ed6
SDL_windows.h is no longer necessary
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
40 |
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
41 /* Float to long */ |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
42 void __declspec(naked) _ftol() |
1345
7f32b9bede06
Fixes for Visual C++ 6.0
Sam Lantinga <slouken@libsdl.org>
parents:
1331
diff
changeset
|
43 { |
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
44 __asm { |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
45 push ebp |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
46 mov ebp,esp |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
47 sub esp,20h |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
48 and esp,0FFFFFFF0h |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
49 fld st(0) |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
50 fst dword ptr [esp+18h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
51 fistp qword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
52 fild qword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
53 mov edx,dword ptr [esp+18h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
54 mov eax,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
55 test eax,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
56 je integer_QnaN_or_zero |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
57 arg_is_not_integer_QnaN: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
58 fsubp st(1),st |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
59 test edx,edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
60 jns positive |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
61 fstp dword ptr [esp] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
62 mov ecx,dword ptr [esp] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
63 xor ecx,80000000h |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
64 add ecx,7FFFFFFFh |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
65 adc eax,0 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
66 mov edx,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
67 adc edx,0 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
68 jmp localexit |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
69 positive: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
70 fstp dword ptr [esp] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
71 mov ecx,dword ptr [esp] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
72 add ecx,7FFFFFFFh |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
73 sbb eax,0 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
74 mov edx,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
75 sbb edx,0 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
76 jmp localexit |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
77 integer_QnaN_or_zero: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
78 mov edx,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
79 test edx,7FFFFFFFh |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
80 jne arg_is_not_integer_QnaN |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
81 fstp dword ptr [esp+18h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
82 fstp dword ptr [esp+18h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
83 localexit: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
84 leave |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
85 ret |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
86 } |
1345
7f32b9bede06
Fixes for Visual C++ 6.0
Sam Lantinga <slouken@libsdl.org>
parents:
1331
diff
changeset
|
87 } |
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
88 void __declspec(naked) _ftol2_sse() |
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
89 { |
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
90 _ftol(); |
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
91 } |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
92 |
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
93 /* 64-bit math operators for 32-bit systems */ |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
94 void __declspec(naked) _allmul() |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
95 { |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
96 __asm { |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
97 push ebp |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
98 mov ebp,esp |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
99 push edi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
100 push esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
101 push ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
102 sub esp,0Ch |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
103 mov eax,dword ptr [ebp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
104 mov edi,dword ptr [ebp+8] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
105 mov ebx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
106 mov esi,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
107 sar esi,1Fh |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
108 mov eax,dword ptr [ebp+8] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
109 mul ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
110 imul edi,esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
111 mov ecx,edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
112 mov dword ptr [ebp-18h],eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
113 mov edx,dword ptr [ebp+0Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
114 add ecx,edi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
115 imul ebx,edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
116 mov eax,dword ptr [ebp-18h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
117 lea ebx,[ebx+ecx] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
118 mov dword ptr [ebp-14h],ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
119 mov edx,dword ptr [ebp-14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
120 add esp,0Ch |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
121 pop ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
122 pop esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
123 pop edi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
124 pop ebp |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
125 ret |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
126 } |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
127 } |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
128 void __declspec(naked) _alldiv() |
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
129 { |
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
130 __asm { |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
131 push edi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
132 push esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
133 push ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
134 xor edi,edi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
135 mov eax,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
136 or eax,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
137 jge L1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
138 inc edi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
139 mov edx,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
140 neg eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
141 neg edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
142 sbb eax,0 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
143 mov dword ptr [esp+14h],eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
144 mov dword ptr [esp+10h],edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
145 L1: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
146 mov eax,dword ptr [esp+1Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
147 or eax,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
148 jge L2 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
149 inc edi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
150 mov edx,dword ptr [esp+18h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
151 neg eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
152 neg edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
153 sbb eax,0 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
154 mov dword ptr [esp+1Ch],eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
155 mov dword ptr [esp+18h],edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
156 L2: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
157 or eax,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
158 jne L3 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
159 mov ecx,dword ptr [esp+18h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
160 mov eax,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
161 xor edx,edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
162 div ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
163 mov ebx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
164 mov eax,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
165 div ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
166 mov edx,ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
167 jmp L4 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
168 L3: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
169 mov ebx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
170 mov ecx,dword ptr [esp+18h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
171 mov edx,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
172 mov eax,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
173 L5: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
174 shr ebx,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
175 rcr ecx,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
176 shr edx,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
177 rcr eax,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
178 or ebx,ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
179 jne L5 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
180 div ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
181 mov esi,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
182 mul dword ptr [esp+1Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
183 mov ecx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
184 mov eax,dword ptr [esp+18h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
185 mul esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
186 add edx,ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
187 jb L6 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
188 cmp edx,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
189 ja L6 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
190 jb L7 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
191 cmp eax,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
192 jbe L7 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
193 L6: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
194 dec esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
195 L7: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
196 xor edx,edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
197 mov eax,esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
198 L4: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
199 dec edi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
200 jne L8 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
201 neg edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
202 neg eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
203 sbb edx,0 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
204 L8: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
205 pop ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
206 pop esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
207 pop edi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
208 ret 10h |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
209 } |
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
210 } |
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
211 void __declspec(naked) _aulldiv() |
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
212 { |
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
213 __asm { |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
214 push ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
215 push esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
216 mov eax,dword ptr [esp+18h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
217 or eax,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
218 jne L1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
219 mov ecx,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
220 mov eax,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
221 xor edx,edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
222 div ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
223 mov ebx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
224 mov eax,dword ptr [esp+0Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
225 div ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
226 mov edx,ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
227 jmp L2 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
228 L1: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
229 mov ecx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
230 mov ebx,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
231 mov edx,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
232 mov eax,dword ptr [esp+0Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
233 L3: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
234 shr ecx,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
235 rcr ebx,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
236 shr edx,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
237 rcr eax,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
238 or ecx,ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
239 jne L3 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
240 div ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
241 mov esi,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
242 mul dword ptr [esp+18h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
243 mov ecx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
244 mov eax,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
245 mul esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
246 add edx,ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
247 jb L4 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
248 cmp edx,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
249 ja L4 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
250 jb L5 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
251 cmp eax,dword ptr [esp+0Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
252 jbe L5 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
253 L4: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
254 dec esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
255 L5: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
256 xor edx,edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
257 mov eax,esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
258 L2: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
259 pop esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
260 pop ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
261 ret 10h |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
262 } |
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
263 } |
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
264 void __declspec(naked) _allrem() |
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
265 { |
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
266 __asm { |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
267 push ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
268 push edi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
269 xor edi,edi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
270 mov eax,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
271 or eax,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
272 jge L1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
273 inc edi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
274 mov edx,dword ptr [esp+0Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
275 neg eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
276 neg edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
277 sbb eax,0 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
278 mov dword ptr [esp+10h],eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
279 mov dword ptr [esp+0Ch],edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
280 L1: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
281 mov eax,dword ptr [esp+18h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
282 or eax,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
283 jge L2 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
284 mov edx,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
285 neg eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
286 neg edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
287 sbb eax,0 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
288 mov dword ptr [esp+18h],eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
289 mov dword ptr [esp+14h],edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
290 L2: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
291 or eax,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
292 jne L3 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
293 mov ecx,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
294 mov eax,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
295 xor edx,edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
296 div ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
297 mov eax,dword ptr [esp+0Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
298 div ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
299 mov eax,edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
300 xor edx,edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
301 dec edi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
302 jns L4 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
303 jmp L8 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
304 L3: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
305 mov ebx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
306 mov ecx,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
307 mov edx,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
308 mov eax,dword ptr [esp+0Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
309 L5: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
310 shr ebx,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
311 rcr ecx,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
312 shr edx,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
313 rcr eax,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
314 or ebx,ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
315 jne L5 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
316 div ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
317 mov ecx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
318 mul dword ptr [esp+18h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
319 xchg eax,ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
320 mul dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
321 add edx,ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
322 jb L6 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
323 cmp edx,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
324 ja L6 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
325 jb L7 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
326 cmp eax,dword ptr [esp+0Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
327 jbe L7 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
328 L6: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
329 sub eax,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
330 sbb edx,dword ptr [esp+18h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
331 L7: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
332 sub eax,dword ptr [esp+0Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
333 sbb edx,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
334 dec edi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
335 jns L8 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
336 L4: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
337 neg edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
338 neg eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
339 sbb edx,0 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
340 L8: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
341 pop edi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
342 pop ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
343 ret 10h |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
344 } |
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
345 } |
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
346 void __declspec(naked) _aullrem() |
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
347 { |
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
348 __asm { |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
349 push ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
350 mov eax,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
351 or eax,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
352 jne L1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
353 mov ecx,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
354 mov eax,dword ptr [esp+0Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
355 xor edx,edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
356 div ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
357 mov eax,dword ptr [esp+8] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
358 div ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
359 mov eax,edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
360 xor edx,edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
361 jmp L2 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
362 L1: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
363 mov ecx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
364 mov ebx,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
365 mov edx,dword ptr [esp+0Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
366 mov eax,dword ptr [esp+8] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
367 L3: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
368 shr ecx,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
369 rcr ebx,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
370 shr edx,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
371 rcr eax,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
372 or ecx,ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
373 jne L3 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
374 div ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
375 mov ecx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
376 mul dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
377 xchg eax,ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
378 mul dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
379 add edx,ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
380 jb L4 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
381 cmp edx,dword ptr [esp+0Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
382 ja L4 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
383 jb L5 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
384 cmp eax,dword ptr [esp+8] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
385 jbe L5 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
386 L4: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
387 sub eax,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
388 sbb edx,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
389 L5: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
390 sub eax,dword ptr [esp+8] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
391 sbb edx,dword ptr [esp+0Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
392 neg edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
393 neg eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
394 sbb edx,0 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
395 L2: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
396 pop ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
397 ret 10h |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
398 } |
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
399 } |
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
400 void __declspec(naked) _alldvrm() |
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
401 { |
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
402 __asm { |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
403 push edi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
404 push esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
405 push ebp |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
406 xor edi,edi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
407 xor ebp,ebp |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
408 mov eax,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
409 or eax,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
410 jge L1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
411 inc edi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
412 inc ebp |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
413 mov edx,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
414 neg eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
415 neg edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
416 sbb eax,0 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
417 mov dword ptr [esp+14h],eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
418 mov dword ptr [esp+10h],edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
419 L1: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
420 mov eax,dword ptr [esp+1Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
421 or eax,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
422 jge L2 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
423 inc edi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
424 mov edx,dword ptr [esp+18h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
425 neg eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
426 neg edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
427 sbb eax,0 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
428 mov dword ptr [esp+1Ch],eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
429 mov dword ptr [esp+18h],edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
430 L2: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
431 or eax,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
432 jne L3 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
433 mov ecx,dword ptr [esp+18h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
434 mov eax,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
435 xor edx,edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
436 div ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
437 mov ebx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
438 mov eax,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
439 div ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
440 mov esi,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
441 mov eax,ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
442 mul dword ptr [esp+18h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
443 mov ecx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
444 mov eax,esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
445 mul dword ptr [esp+18h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
446 add edx,ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
447 jmp L4 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
448 L3: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
449 mov ebx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
450 mov ecx,dword ptr [esp+18h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
451 mov edx,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
452 mov eax,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
453 L5: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
454 shr ebx,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
455 rcr ecx,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
456 shr edx,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
457 rcr eax,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
458 or ebx,ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
459 jne L5 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
460 div ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
461 mov esi,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
462 mul dword ptr [esp+1Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
463 mov ecx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
464 mov eax,dword ptr [esp+18h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
465 mul esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
466 add edx,ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
467 jb L6 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
468 cmp edx,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
469 ja L6 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
470 jb L7 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
471 cmp eax,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
472 jbe L7 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
473 L6: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
474 dec esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
475 sub eax,dword ptr [esp+18h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
476 sbb edx,dword ptr [esp+1Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
477 L7: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
478 xor ebx,ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
479 L4: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
480 sub eax,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
481 sbb edx,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
482 dec ebp |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
483 jns L9 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
484 neg edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
485 neg eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
486 sbb edx,0 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
487 L9: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
488 mov ecx,edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
489 mov edx,ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
490 mov ebx,ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
491 mov ecx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
492 mov eax,esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
493 dec edi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
494 jne L8 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
495 neg edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
496 neg eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
497 sbb edx,0 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
498 L8: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
499 pop ebp |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
500 pop esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
501 pop edi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
502 ret 10h |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
503 } |
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
504 } |
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
505 void __declspec(naked) _aulldvrm() |
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
506 { |
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
507 __asm { |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
508 push esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
509 mov eax,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
510 or eax,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
511 jne L1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
512 mov ecx,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
513 mov eax,dword ptr [esp+0Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
514 xor edx,edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
515 div ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
516 mov ebx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
517 mov eax,dword ptr [esp+8] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
518 div ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
519 mov esi,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
520 mov eax,ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
521 mul dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
522 mov ecx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
523 mov eax,esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
524 mul dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
525 add edx,ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
526 jmp L2 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
527 L1: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
528 mov ecx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
529 mov ebx,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
530 mov edx,dword ptr [esp+0Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
531 mov eax,dword ptr [esp+8] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
532 L3: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
533 shr ecx,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
534 rcr ebx,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
535 shr edx,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
536 rcr eax,1 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
537 or ecx,ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
538 jne L3 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
539 div ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
540 mov esi,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
541 mul dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
542 mov ecx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
543 mov eax,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
544 mul esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
545 add edx,ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
546 jb L4 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
547 cmp edx,dword ptr [esp+0Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
548 ja L4 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
549 jb L5 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
550 cmp eax,dword ptr [esp+8] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
551 jbe L5 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
552 L4: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
553 dec esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
554 sub eax,dword ptr [esp+10h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
555 sbb edx,dword ptr [esp+14h] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
556 L5: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
557 xor ebx,ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
558 L2: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
559 sub eax,dword ptr [esp+8] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
560 sbb edx,dword ptr [esp+0Ch] |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
561 neg edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
562 neg eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
563 sbb edx,0 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
564 mov ecx,edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
565 mov edx,ebx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
566 mov ebx,ecx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
567 mov ecx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
568 mov eax,esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
569 pop esi |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
570 ret 10h |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
571 } |
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
572 } |
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
573 void __declspec(naked) _allshl() |
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
574 { |
1346
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
575 __asm { |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
576 cmp cl,40h |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
577 jae RETZERO |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
578 cmp cl,20h |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
579 jae MORE32 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
580 shld edx,eax,cl |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
581 shl eax,cl |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
582 ret |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
583 MORE32: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
584 mov edx,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
585 xor eax,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
586 and cl,1Fh |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
587 shl edx,cl |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
588 ret |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
589 RETZERO: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
590 xor eax,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
591 xor edx,edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
592 ret |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
593 } |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
594 } |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
595 void __declspec(naked) _aullshr() |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
596 { |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
597 __asm { |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
598 cmp cl,40h |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
599 jae RETZERO |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
600 cmp cl,20h |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
601 jae MORE32 |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
602 shrd eax,edx,cl |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
603 shr edx,cl |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
604 ret |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
605 MORE32: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
606 mov eax,edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
607 xor edx,edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
608 and cl,1Fh |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
609 shr eax,cl |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
610 ret |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
611 RETZERO: |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
612 xor eax,eax |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
613 xor edx,edx |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
614 ret |
1b5fbaf1d2c6
Default to build SDL without MSVCRT
Sam Lantinga <slouken@libsdl.org>
parents:
1345
diff
changeset
|
615 } |
1330
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
616 } |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
617 |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
618 #endif /* MSC_VER */ |
450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
619 |
1331
1cbaeee565b1
A few fixes to get this building on Linux again
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
620 #endif /* !HAVE_LIBC */ |