1
{****************************************************************}
2
{ CODE GENERATOR TEST PROGRAM }
3
{****************************************************************}
4
{ NODE TESTED : secondcase() }
5
{****************************************************************}
6
{ PRE-REQUISITES: secondload() }
9
{****************************************************************}
11
{****************************************************************}
12
{ REMARKS: Tests the case statement (except jump table gen.) }
13
{****************************************************************}
25
The value is in LOC_REGISTER (operand to test)
35
{************************************************************************}
37
{************************************************************************}
40
procedure TestCmpListOneShort;
45
Write('Linear Comparison list without ranges (smallint)...');
49
-12 : failed := false;
61
procedure TestCmpListTwoShort;
66
Write('Linear Comparison list without ranges (smallint)...');
84
procedure TestCmpListOneWord;
89
Write('Linear Comparison list without ranges (word)...');
104
procedure TestCmpListTwoWord;
109
Write('Linear Comparison list without ranges (word)...');
127
procedure TestCmpListOneInt64;
132
Write('Linear Comparison list without ranges (int64)...');
136
3000000 : failed := false;
147
procedure TestCmpListTwoInt64;
152
Write('Linear Comparison list without ranges (int64)...');
169
procedure TestCmpListThreeInt64;
175
Write('Linear Comparison list without ranges (int64)...');
177
s := (int64(l) shl 32);
180
(int64(3000000) shl 32) : failed := false;
192
procedure TestCmpListRangesOneShort;
197
Write('Linear Comparison list with ranges (smallint)...');
201
-12..-8 : failed := false;
212
procedure TestCmpListRangesTwoShort;
217
Write('Linear Comparison list with ranges (smallint)...');
235
procedure TestCmpListRangesOneWord;
240
Write('Linear Comparison list with ranges (word)...');
244
12..13 : failed := false;
255
procedure TestCmpListRangesTwoWord;
260
Write('Linear Comparison list with ranges (word)...');
276
procedure TestCmpListRangesThreeWord;
281
Write('Linear Comparison list with ranges (word)...');
287
3..7 : failed := false;
298
procedure TestCmpListRangesOneInt64;
303
Write('Linear Comparison list with ranges (int64)...');
307
11..3000000 : failed := false;
318
procedure TestCmpListRangesTwoInt64;
323
Write('Linear Comparison list with ranges (int64)...');
345
TestCmpListRangesOneShort;
346
TestCmpListRangesTwoShort;
347
TestCmpListRangesOneWord;
348
TestCmpListRangesTwoWord;
349
TestCmpListRangesThreeWord;
353
TestCmpListThreeInt64;
354
TestCmpListRangesOneInt64;
355
TestCmpListRangesTwoInt64;