-
Notifications
You must be signed in to change notification settings - Fork 5
/
FastCode.inc
202 lines (163 loc) · 3.64 KB
/
FastCode.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
// Fastcode Library definitions //
// Define this if you want to use fctIA32SizePenalty instead of
// fctIA32, fctSSESizePenalty instead of fctSSE,
// FastcodePascalSizePenalty instead of FastcodePascal}
{.$DEFINE FastcodeSizePenalty}
// Define this to disable RTL Patching}
{.$DEFINE FastcodeNoRtlPatch}
// Define either FastcodeCPUID or one of next five}
{$IFNDEF DisableFastCode}
{$DEFINE FastcodeCPUID}
{.$DEFINE FastcodeIA32}
{.$DEFINE FastcodeMMX}
{.$DEFINE FastcodeSSE}
{.$DEFINE FastcodeSSE2}
{.$DEFINE FastcodePascal}
{$ENDIF}
// Default to FastcodeIA32 / FastcodeIA32SizePenalty if No Fastcode
// Compile Option Selected
{$IFNDEF FastcodeIA32}
{$IFNDEF FastcodeMMX}
{$IFNDEF FastcodeSSE}
{$IFNDEF FastcodeSSE2}
{$IFNDEF FastcodePascal}
{$IFNDEF FastcodeCPUID}
{$DEFINE FastcodeIA32}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
// Ensure Only One Fastcode Compile Option (Best) is Selected
{$IFDEF FastcodeCPUID}
{$UNDEF FastcodeMMX}
{$UNDEF FastcodeSSE}
{$UNDEF FastcodeSSE2}
{$UNDEF FastcodeIA32}
{$UNDEF FastcodePascal}
{$ENDIF}
{$IFDEF FastcodeSSE2}
{$UNDEF FastcodeIA32}
{$UNDEF FastcodePascal}
{$UNDEF FastcodeMMX}
{$UNDEF FastcodeSSE}
{$UNDEF FastcodeCPUID}
{$ENDIF}
{$IFDEF FastcodeSSE}
{$UNDEF FastcodeIA32}
{$UNDEF FastcodePascal}
{$UNDEF FastcodeMMX}
{$UNDEF FastcodeSSE2}
{$UNDEF FastcodeCPUID}
{$ENDIF}
{$IFDEF FastcodeMMX}
{$UNDEF FastcodeIA32}
{$UNDEF FastcodePascal}
{$UNDEF FastcodeIA32}
{$UNDEF FastcodeSSE}
{$UNDEF FastcodeSSE2}
{$UNDEF FastcodeCPUID}
{$ENDIF}
{$IFDEF FastcodeIA32}
{$UNDEF FastcodePascal}
{$UNDEF FastcodeMMX}
{$UNDEF FastcodeSSE}
{$UNDEF FastcodeSSE2}
{$UNDEF FastcodeCPUID}
{$ENDIF}
// Delphi Version definitions
{$IFDEF Ver80}
{$DEFINE Delphi1}
{$ENDIF}
{$IFDEF Ver90}
{$DEFINE Delphi2}
{$ENDIF}
{$IFDEF Ver100}
{$DEFINE Delphi3}
{$ENDIF}
{$IFDEF Ver120}
{$DEFINE Delphi4}
{$ENDIF}
{$IFDEF Ver130}
{$DEFINE Delphi5}
{$ENDIF}
{$IFDEF Ver140}
{$DEFINE Delphi6}
{$ENDIF}
{$IFDEF Ver150}
{$DEFINE Delphi7}
{$ENDIF}
{$IFDEF Ver160}
{$DEFINE Delphi8}
{$ENDIF}
{$IFDEF Ver170}
{$DEFINE Delphi2005}
{$ENDIF}
{$IFDEF CONDITIONALEXPRESSIONS}
{$IF (CompilerVersion >= 18.0) and (CompilerVersion < 19.0)}
{$DEFINE Delphi2006}
{$DEFINE INLINE}
{$IFEND}
{$IF (CompilerVersion >= 19.0) and (CompilerVersion < 20.0)}
{$DEFINE Delphi2007}
{$DEFINE INLINE}
{$IFEND}
{$ENDIF}
{$IFDEF Delphi2007}
{$DEFINE Delphi2007Plus}
{$ENDIF}
{$IFDEF Delphi2007Plus}
{$DEFINE Delphi2006Plus}
{$ENDIF}
{$IFDEF Delphi2006}
{$DEFINE Delphi2006Plus}
{$ENDIF}
{$IFDEF Delphi2006Plus}
{$DEFINE Delphi2005Plus}
{$ENDIF}
{$IFDEF Delphi2005}
{$DEFINE Delphi2005Plus}
{$ENDIF}
{$IFDEF Delphi2005Plus}
{$DEFINE Delphi7Plus}
{$ENDIF}
{$IFDEF Delphi7}
{$DEFINE Delphi7Plus}
{$ENDIF}
{$IFDEF Delphi7Plus}
{$DEFINE Delphi6Plus}
{$ENDIF}
{$IFDEF Delphi6}
{$DEFINE Delphi6Plus}
{$ENDIF}
{$IFDEF Delphi6Plus}
{$DEFINE Delphi5Plus}
{$ENDIF}
{$IFDEF Delphi5}
{$DEFINE Delphi5Plus}
{$ENDIF}
{$IFDEF Delphi5Plus}
{$DEFINE Delphi4Plus}
{$ENDIF}
{$IFDEF Delphi4}
{$DEFINE Delphi4Plus}
{$ENDIF}
{$IFDEF Delphi4Plus}
{$DEFINE Delphi3Plus}
{$ENDIF}
{$IFDEF Delphi3}
{$DEFINE Delphi3Plus}
{$ENDIF}
{$IFDEF Delphi3Plus}
{$DEFINE Delphi2Plus}
{$ENDIF}
{$IFDEF Delphi2}
{$DEFINE Delphi2Plus}
{$ENDIF}
{$IFDEF Delphi2Plus}
{$DEFINE Delphi1Plus}
{$ENDIF}
{$IFDEF Delphi1}
{$DEFINE Delphi1Plus}
{$ENDIF}