Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/debugtools/DDR_VM/binary_operation_investigation/test_suite.cpp
6000 views
1
/*******************************************************************************
2
* Copyright (c) 2001, 2014 IBM Corp. and others
3
*
4
* This program and the accompanying materials are made available under
5
* the terms of the Eclipse Public License 2.0 which accompanies this
6
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
7
* or the Apache License, Version 2.0 which accompanies this distribution and
8
* is available at https://www.apache.org/licenses/LICENSE-2.0.
9
*
10
* This Source Code may also be made available under the following
11
* Secondary Licenses when the conditions for such availability set
12
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
13
* General Public License, version 2 with the GNU Classpath
14
* Exception [1] and GNU General Public License, version 2 with the
15
* OpenJDK Assembly Exception [2].
16
*
17
* [1] https://www.gnu.org/software/classpath/license.html
18
* [2] http://openjdk.java.net/legal/assembly-exception.html
19
*
20
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
21
*******************************************************************************/
22
23
/* Automatically generated by generate_test_suit.pl. */
24
25
/* DO NOT MODIFY THIS GENERATED FILE. CHANGE THE generate_test_suite.pl SCRIPT INSTEAD */
26
27
#include <iostream>
28
29
#include "j9_types.hpp"
30
31
using namespace std;
32
33
34
static void testaddU_8(void)
35
{
36
//Locals
37
U_8 base;
38
U_8 u_8;
39
U_16 u_16;
40
U_32 u_32;
41
U_64 u_64;
42
I_16 i_16;
43
I_32 i_32;
44
I_64 i_64;
45
UDATA udata;
46
IDATA idata;
47
48
cout << "START SECTION U_8 add" << endl;
49
50
cout << "SUBSECTION U_8 WITH U_8" << endl;
51
base = 0;
52
u_8 = 0;
53
{
54
U_8 result1 = base + u_8;
55
U_8 result2 = u_8 + base;
56
cout << "U_8," << hex << (unsigned int)base << ",add,U_8," << hex << (unsigned int)u_8 << ",U_8," << hex << (unsigned int)result1 << "," << hex << (unsigned int)result2 << endl;
57
}
58
base = 0;
59
u_8 = 1;
60
{
61
U_8 result1 = base + u_8;
62
U_8 result2 = u_8 + base;
63
cout << "U_8," << hex << (unsigned int)base << ",add,U_8," << hex << (unsigned int)u_8 << ",U_8," << hex << (unsigned int)result1 << "," << hex << (unsigned int)result2 << endl;
64
}
65
base = 0;
66
u_8 = 2;
67
{
68
U_8 result1 = base + u_8;
69
U_8 result2 = u_8 + base;
70
cout << "U_8," << hex << (unsigned int)base << ",add,U_8," << hex << (unsigned int)u_8 << ",U_8," << hex << (unsigned int)result1 << "," << hex << (unsigned int)result2 << endl;
71
}
72
base = 0xff;
73
u_8 = 1;
74
{
75
U_8 result1 = base + u_8;
76
U_8 result2 = u_8 + base;
77
cout << "U_8," << hex << (unsigned int)base << ",add,U_8," << hex << (unsigned int)u_8 << ",U_8," << hex << (unsigned int)result1 << "," << hex << (unsigned int)result2 << endl;
78
}
79
80
cout << "SUBSECTION U_8 WITH U_16" << endl;
81
base = 0;
82
u_16 = 0;
83
{
84
I_32 result1 = base + u_16;
85
I_32 result2 = u_16 + base;
86
cout << "U_8," << hex << (unsigned int)base << ",add,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
87
}
88
base = 0;
89
u_16 = 1;
90
{
91
I_32 result1 = base + u_16;
92
I_32 result2 = u_16 + base;
93
cout << "U_8," << hex << (unsigned int)base << ",add,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
94
}
95
base = 0;
96
u_16 = 2;
97
{
98
I_32 result1 = base + u_16;
99
I_32 result2 = u_16 + base;
100
cout << "U_8," << hex << (unsigned int)base << ",add,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
101
}
102
base = 0xff;
103
u_16 = 1;
104
{
105
I_32 result1 = base + u_16;
106
I_32 result2 = u_16 + base;
107
cout << "U_8," << hex << (unsigned int)base << ",add,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
108
}
109
110
cout << "SUBSECTION U_8 WITH U_32" << endl;
111
base = 0;
112
u_32 = 0;
113
{
114
U_32 result1 = base + u_32;
115
U_32 result2 = u_32 + base;
116
cout << "U_8," << hex << (unsigned int)base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
117
}
118
base = 0;
119
u_32 = 1;
120
{
121
U_32 result1 = base + u_32;
122
U_32 result2 = u_32 + base;
123
cout << "U_8," << hex << (unsigned int)base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
124
}
125
base = 0;
126
u_32 = 2;
127
{
128
U_32 result1 = base + u_32;
129
U_32 result2 = u_32 + base;
130
cout << "U_8," << hex << (unsigned int)base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
131
}
132
base = 0xff;
133
u_32 = 1;
134
{
135
U_32 result1 = base + u_32;
136
U_32 result2 = u_32 + base;
137
cout << "U_8," << hex << (unsigned int)base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
138
}
139
140
cout << "SUBSECTION U_8 WITH U_64" << endl;
141
base = 0;
142
u_64 = 0;
143
{
144
U_64 result1 = base + u_64;
145
U_64 result2 = u_64 + base;
146
cout << "U_8," << hex << (unsigned int)base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
147
}
148
base = 0;
149
u_64 = 1;
150
{
151
U_64 result1 = base + u_64;
152
U_64 result2 = u_64 + base;
153
cout << "U_8," << hex << (unsigned int)base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
154
}
155
base = 0;
156
u_64 = 2;
157
{
158
U_64 result1 = base + u_64;
159
U_64 result2 = u_64 + base;
160
cout << "U_8," << hex << (unsigned int)base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
161
}
162
base = 0xff;
163
u_64 = 1;
164
{
165
U_64 result1 = base + u_64;
166
U_64 result2 = u_64 + base;
167
cout << "U_8," << hex << (unsigned int)base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
168
}
169
170
cout << "SUBSECTION U_8 WITH I_16" << endl;
171
base = 0;
172
i_16 = 0;
173
{
174
I_32 result1 = base + i_16;
175
I_32 result2 = i_16 + base;
176
cout << "U_8," << hex << (unsigned int)base << ",add,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
177
}
178
base = 0;
179
i_16 = 1;
180
{
181
I_32 result1 = base + i_16;
182
I_32 result2 = i_16 + base;
183
cout << "U_8," << hex << (unsigned int)base << ",add,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
184
}
185
base = 0;
186
i_16 = 2;
187
{
188
I_32 result1 = base + i_16;
189
I_32 result2 = i_16 + base;
190
cout << "U_8," << hex << (unsigned int)base << ",add,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
191
}
192
base = 0;
193
i_16 = -1;
194
{
195
I_32 result1 = base + i_16;
196
I_32 result2 = i_16 + base;
197
cout << "U_8," << hex << (unsigned int)base << ",add,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
198
}
199
base = 0xff;
200
i_16 = 1;
201
{
202
I_32 result1 = base + i_16;
203
I_32 result2 = i_16 + base;
204
cout << "U_8," << hex << (unsigned int)base << ",add,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
205
}
206
base = 0xff;
207
i_16 = -1;
208
{
209
I_32 result1 = base + i_16;
210
I_32 result2 = i_16 + base;
211
cout << "U_8," << hex << (unsigned int)base << ",add,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
212
}
213
214
cout << "SUBSECTION U_8 WITH I_32" << endl;
215
base = 0;
216
i_32 = 0;
217
{
218
I_32 result1 = base + i_32;
219
I_32 result2 = i_32 + base;
220
cout << "U_8," << hex << (unsigned int)base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
221
}
222
base = 0;
223
i_32 = 1;
224
{
225
I_32 result1 = base + i_32;
226
I_32 result2 = i_32 + base;
227
cout << "U_8," << hex << (unsigned int)base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
228
}
229
base = 0;
230
i_32 = 2;
231
{
232
I_32 result1 = base + i_32;
233
I_32 result2 = i_32 + base;
234
cout << "U_8," << hex << (unsigned int)base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
235
}
236
base = 0;
237
i_32 = -1;
238
{
239
I_32 result1 = base + i_32;
240
I_32 result2 = i_32 + base;
241
cout << "U_8," << hex << (unsigned int)base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
242
}
243
base = 0xff;
244
i_32 = 1;
245
{
246
I_32 result1 = base + i_32;
247
I_32 result2 = i_32 + base;
248
cout << "U_8," << hex << (unsigned int)base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
249
}
250
base = 0xff;
251
i_32 = -1;
252
{
253
I_32 result1 = base + i_32;
254
I_32 result2 = i_32 + base;
255
cout << "U_8," << hex << (unsigned int)base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
256
}
257
258
cout << "SUBSECTION U_8 WITH I_64" << endl;
259
base = 0;
260
i_64 = 0;
261
{
262
I_64 result1 = base + i_64;
263
I_64 result2 = i_64 + base;
264
cout << "U_8," << hex << (unsigned int)base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
265
}
266
base = 0;
267
i_64 = 1;
268
{
269
I_64 result1 = base + i_64;
270
I_64 result2 = i_64 + base;
271
cout << "U_8," << hex << (unsigned int)base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
272
}
273
base = 0;
274
i_64 = 2;
275
{
276
I_64 result1 = base + i_64;
277
I_64 result2 = i_64 + base;
278
cout << "U_8," << hex << (unsigned int)base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
279
}
280
base = 0;
281
i_64 = -1;
282
{
283
I_64 result1 = base + i_64;
284
I_64 result2 = i_64 + base;
285
cout << "U_8," << hex << (unsigned int)base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
286
}
287
base = 0xff;
288
i_64 = 1;
289
{
290
I_64 result1 = base + i_64;
291
I_64 result2 = i_64 + base;
292
cout << "U_8," << hex << (unsigned int)base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
293
}
294
base = 0xff;
295
i_64 = -1;
296
{
297
I_64 result1 = base + i_64;
298
I_64 result2 = i_64 + base;
299
cout << "U_8," << hex << (unsigned int)base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
300
}
301
302
cout << "SUBSECTION U_8 WITH UDATA" << endl;
303
base = 0;
304
udata = 0;
305
{
306
UDATA result1 = base + udata;
307
UDATA result2 = udata + base;
308
cout << "U_8," << hex << (unsigned int)base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
309
}
310
base = 0;
311
udata = 1;
312
{
313
UDATA result1 = base + udata;
314
UDATA result2 = udata + base;
315
cout << "U_8," << hex << (unsigned int)base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
316
}
317
base = 0;
318
udata = 2;
319
{
320
UDATA result1 = base + udata;
321
UDATA result2 = udata + base;
322
cout << "U_8," << hex << (unsigned int)base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
323
}
324
base = 0xff;
325
udata = 1;
326
{
327
UDATA result1 = base + udata;
328
UDATA result2 = udata + base;
329
cout << "U_8," << hex << (unsigned int)base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
330
}
331
332
cout << "SUBSECTION U_8 WITH IDATA" << endl;
333
base = 0;
334
idata = 0;
335
{
336
IDATA result1 = base + idata;
337
IDATA result2 = idata + base;
338
cout << "U_8," << hex << (unsigned int)base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
339
}
340
base = 0;
341
idata = 1;
342
{
343
IDATA result1 = base + idata;
344
IDATA result2 = idata + base;
345
cout << "U_8," << hex << (unsigned int)base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
346
}
347
base = 0;
348
idata = 2;
349
{
350
IDATA result1 = base + idata;
351
IDATA result2 = idata + base;
352
cout << "U_8," << hex << (unsigned int)base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
353
}
354
base = 0;
355
idata = -1;
356
{
357
IDATA result1 = base + idata;
358
IDATA result2 = idata + base;
359
cout << "U_8," << hex << (unsigned int)base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
360
}
361
base = 0xff;
362
idata = 1;
363
{
364
IDATA result1 = base + idata;
365
IDATA result2 = idata + base;
366
cout << "U_8," << hex << (unsigned int)base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
367
}
368
base = 0xff;
369
idata = -1;
370
{
371
IDATA result1 = base + idata;
372
IDATA result2 = idata + base;
373
cout << "U_8," << hex << (unsigned int)base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
374
}
375
376
}
377
378
static void testsubU_8(void)
379
{
380
//Locals
381
U_8 base;
382
U_8 u_8;
383
U_16 u_16;
384
U_32 u_32;
385
U_64 u_64;
386
I_16 i_16;
387
I_32 i_32;
388
I_64 i_64;
389
UDATA udata;
390
IDATA idata;
391
392
cout << "START SECTION U_8 sub" << endl;
393
394
cout << "SUBSECTION U_8 WITH U_8" << endl;
395
base = 0;
396
u_8 = 0;
397
{
398
U_8 result1 = base - u_8;
399
U_8 result2 = u_8 - base;
400
cout << "U_8," << hex << (unsigned int)base << ",sub,U_8," << hex << (unsigned int)u_8 << ",U_8," << hex << (unsigned int)result1 << "," << hex << (unsigned int)result2 << endl;
401
}
402
base = 0;
403
u_8 = 1;
404
{
405
U_8 result1 = base - u_8;
406
U_8 result2 = u_8 - base;
407
cout << "U_8," << hex << (unsigned int)base << ",sub,U_8," << hex << (unsigned int)u_8 << ",U_8," << hex << (unsigned int)result1 << "," << hex << (unsigned int)result2 << endl;
408
}
409
base = 0;
410
u_8 = 2;
411
{
412
U_8 result1 = base - u_8;
413
U_8 result2 = u_8 - base;
414
cout << "U_8," << hex << (unsigned int)base << ",sub,U_8," << hex << (unsigned int)u_8 << ",U_8," << hex << (unsigned int)result1 << "," << hex << (unsigned int)result2 << endl;
415
}
416
base = 0xff;
417
u_8 = 1;
418
{
419
U_8 result1 = base - u_8;
420
U_8 result2 = u_8 - base;
421
cout << "U_8," << hex << (unsigned int)base << ",sub,U_8," << hex << (unsigned int)u_8 << ",U_8," << hex << (unsigned int)result1 << "," << hex << (unsigned int)result2 << endl;
422
}
423
424
cout << "SUBSECTION U_8 WITH U_16" << endl;
425
base = 0;
426
u_16 = 0;
427
{
428
I_32 result1 = base - u_16;
429
I_32 result2 = u_16 - base;
430
cout << "U_8," << hex << (unsigned int)base << ",sub,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
431
}
432
base = 0;
433
u_16 = 1;
434
{
435
I_32 result1 = base - u_16;
436
I_32 result2 = u_16 - base;
437
cout << "U_8," << hex << (unsigned int)base << ",sub,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
438
}
439
base = 0;
440
u_16 = 2;
441
{
442
I_32 result1 = base - u_16;
443
I_32 result2 = u_16 - base;
444
cout << "U_8," << hex << (unsigned int)base << ",sub,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
445
}
446
base = 0xff;
447
u_16 = 1;
448
{
449
I_32 result1 = base - u_16;
450
I_32 result2 = u_16 - base;
451
cout << "U_8," << hex << (unsigned int)base << ",sub,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
452
}
453
454
cout << "SUBSECTION U_8 WITH U_32" << endl;
455
base = 0;
456
u_32 = 0;
457
{
458
U_32 result1 = base - u_32;
459
U_32 result2 = u_32 - base;
460
cout << "U_8," << hex << (unsigned int)base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
461
}
462
base = 0;
463
u_32 = 1;
464
{
465
U_32 result1 = base - u_32;
466
U_32 result2 = u_32 - base;
467
cout << "U_8," << hex << (unsigned int)base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
468
}
469
base = 0;
470
u_32 = 2;
471
{
472
U_32 result1 = base - u_32;
473
U_32 result2 = u_32 - base;
474
cout << "U_8," << hex << (unsigned int)base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
475
}
476
base = 0xff;
477
u_32 = 1;
478
{
479
U_32 result1 = base - u_32;
480
U_32 result2 = u_32 - base;
481
cout << "U_8," << hex << (unsigned int)base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
482
}
483
484
cout << "SUBSECTION U_8 WITH U_64" << endl;
485
base = 0;
486
u_64 = 0;
487
{
488
U_64 result1 = base - u_64;
489
U_64 result2 = u_64 - base;
490
cout << "U_8," << hex << (unsigned int)base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
491
}
492
base = 0;
493
u_64 = 1;
494
{
495
U_64 result1 = base - u_64;
496
U_64 result2 = u_64 - base;
497
cout << "U_8," << hex << (unsigned int)base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
498
}
499
base = 0;
500
u_64 = 2;
501
{
502
U_64 result1 = base - u_64;
503
U_64 result2 = u_64 - base;
504
cout << "U_8," << hex << (unsigned int)base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
505
}
506
base = 0xff;
507
u_64 = 1;
508
{
509
U_64 result1 = base - u_64;
510
U_64 result2 = u_64 - base;
511
cout << "U_8," << hex << (unsigned int)base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
512
}
513
514
cout << "SUBSECTION U_8 WITH I_16" << endl;
515
base = 0;
516
i_16 = 0;
517
{
518
I_32 result1 = base - i_16;
519
I_32 result2 = i_16 - base;
520
cout << "U_8," << hex << (unsigned int)base << ",sub,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
521
}
522
base = 0;
523
i_16 = 1;
524
{
525
I_32 result1 = base - i_16;
526
I_32 result2 = i_16 - base;
527
cout << "U_8," << hex << (unsigned int)base << ",sub,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
528
}
529
base = 0;
530
i_16 = 2;
531
{
532
I_32 result1 = base - i_16;
533
I_32 result2 = i_16 - base;
534
cout << "U_8," << hex << (unsigned int)base << ",sub,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
535
}
536
base = 0;
537
i_16 = -1;
538
{
539
I_32 result1 = base - i_16;
540
I_32 result2 = i_16 - base;
541
cout << "U_8," << hex << (unsigned int)base << ",sub,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
542
}
543
base = 0xff;
544
i_16 = 1;
545
{
546
I_32 result1 = base - i_16;
547
I_32 result2 = i_16 - base;
548
cout << "U_8," << hex << (unsigned int)base << ",sub,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
549
}
550
base = 0xff;
551
i_16 = -1;
552
{
553
I_32 result1 = base - i_16;
554
I_32 result2 = i_16 - base;
555
cout << "U_8," << hex << (unsigned int)base << ",sub,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
556
}
557
558
cout << "SUBSECTION U_8 WITH I_32" << endl;
559
base = 0;
560
i_32 = 0;
561
{
562
I_32 result1 = base - i_32;
563
I_32 result2 = i_32 - base;
564
cout << "U_8," << hex << (unsigned int)base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
565
}
566
base = 0;
567
i_32 = 1;
568
{
569
I_32 result1 = base - i_32;
570
I_32 result2 = i_32 - base;
571
cout << "U_8," << hex << (unsigned int)base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
572
}
573
base = 0;
574
i_32 = 2;
575
{
576
I_32 result1 = base - i_32;
577
I_32 result2 = i_32 - base;
578
cout << "U_8," << hex << (unsigned int)base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
579
}
580
base = 0;
581
i_32 = -1;
582
{
583
I_32 result1 = base - i_32;
584
I_32 result2 = i_32 - base;
585
cout << "U_8," << hex << (unsigned int)base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
586
}
587
base = 0xff;
588
i_32 = 1;
589
{
590
I_32 result1 = base - i_32;
591
I_32 result2 = i_32 - base;
592
cout << "U_8," << hex << (unsigned int)base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
593
}
594
base = 0xff;
595
i_32 = -1;
596
{
597
I_32 result1 = base - i_32;
598
I_32 result2 = i_32 - base;
599
cout << "U_8," << hex << (unsigned int)base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
600
}
601
602
cout << "SUBSECTION U_8 WITH I_64" << endl;
603
base = 0;
604
i_64 = 0;
605
{
606
I_64 result1 = base - i_64;
607
I_64 result2 = i_64 - base;
608
cout << "U_8," << hex << (unsigned int)base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
609
}
610
base = 0;
611
i_64 = 1;
612
{
613
I_64 result1 = base - i_64;
614
I_64 result2 = i_64 - base;
615
cout << "U_8," << hex << (unsigned int)base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
616
}
617
base = 0;
618
i_64 = 2;
619
{
620
I_64 result1 = base - i_64;
621
I_64 result2 = i_64 - base;
622
cout << "U_8," << hex << (unsigned int)base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
623
}
624
base = 0;
625
i_64 = -1;
626
{
627
I_64 result1 = base - i_64;
628
I_64 result2 = i_64 - base;
629
cout << "U_8," << hex << (unsigned int)base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
630
}
631
base = 0xff;
632
i_64 = 1;
633
{
634
I_64 result1 = base - i_64;
635
I_64 result2 = i_64 - base;
636
cout << "U_8," << hex << (unsigned int)base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
637
}
638
base = 0xff;
639
i_64 = -1;
640
{
641
I_64 result1 = base - i_64;
642
I_64 result2 = i_64 - base;
643
cout << "U_8," << hex << (unsigned int)base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
644
}
645
646
cout << "SUBSECTION U_8 WITH UDATA" << endl;
647
base = 0;
648
udata = 0;
649
{
650
UDATA result1 = base - udata;
651
UDATA result2 = udata - base;
652
cout << "U_8," << hex << (unsigned int)base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
653
}
654
base = 0;
655
udata = 1;
656
{
657
UDATA result1 = base - udata;
658
UDATA result2 = udata - base;
659
cout << "U_8," << hex << (unsigned int)base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
660
}
661
base = 0;
662
udata = 2;
663
{
664
UDATA result1 = base - udata;
665
UDATA result2 = udata - base;
666
cout << "U_8," << hex << (unsigned int)base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
667
}
668
base = 0xff;
669
udata = 1;
670
{
671
UDATA result1 = base - udata;
672
UDATA result2 = udata - base;
673
cout << "U_8," << hex << (unsigned int)base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
674
}
675
676
cout << "SUBSECTION U_8 WITH IDATA" << endl;
677
base = 0;
678
idata = 0;
679
{
680
IDATA result1 = base - idata;
681
IDATA result2 = idata - base;
682
cout << "U_8," << hex << (unsigned int)base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
683
}
684
base = 0;
685
idata = 1;
686
{
687
IDATA result1 = base - idata;
688
IDATA result2 = idata - base;
689
cout << "U_8," << hex << (unsigned int)base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
690
}
691
base = 0;
692
idata = 2;
693
{
694
IDATA result1 = base - idata;
695
IDATA result2 = idata - base;
696
cout << "U_8," << hex << (unsigned int)base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
697
}
698
base = 0;
699
idata = -1;
700
{
701
IDATA result1 = base - idata;
702
IDATA result2 = idata - base;
703
cout << "U_8," << hex << (unsigned int)base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
704
}
705
base = 0xff;
706
idata = 1;
707
{
708
IDATA result1 = base - idata;
709
IDATA result2 = idata - base;
710
cout << "U_8," << hex << (unsigned int)base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
711
}
712
base = 0xff;
713
idata = -1;
714
{
715
IDATA result1 = base - idata;
716
IDATA result2 = idata - base;
717
cout << "U_8," << hex << (unsigned int)base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
718
}
719
720
}
721
722
static void testaddU_16(void)
723
{
724
//Locals
725
U_16 base;
726
U_8 u_8;
727
U_16 u_16;
728
U_32 u_32;
729
U_64 u_64;
730
I_16 i_16;
731
I_32 i_32;
732
I_64 i_64;
733
UDATA udata;
734
IDATA idata;
735
736
cout << "START SECTION U_16 add" << endl;
737
738
cout << "SUBSECTION U_16 WITH U_8" << endl;
739
base = 0;
740
u_8 = 0;
741
{
742
I_32 result1 = base + u_8;
743
I_32 result2 = u_8 + base;
744
cout << "U_16," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
745
}
746
base = 0;
747
u_8 = 1;
748
{
749
I_32 result1 = base + u_8;
750
I_32 result2 = u_8 + base;
751
cout << "U_16," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
752
}
753
base = 0;
754
u_8 = 2;
755
{
756
I_32 result1 = base + u_8;
757
I_32 result2 = u_8 + base;
758
cout << "U_16," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
759
}
760
base = 0xffff;
761
u_8 = 1;
762
{
763
I_32 result1 = base + u_8;
764
I_32 result2 = u_8 + base;
765
cout << "U_16," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
766
}
767
768
cout << "SUBSECTION U_16 WITH U_16" << endl;
769
base = 0;
770
u_16 = 0;
771
{
772
U_16 result1 = base + u_16;
773
U_16 result2 = u_16 + base;
774
cout << "U_16," << hex << base << ",add,U_16," << hex << u_16 << ",U_16," << hex << result1 << "," << hex << result2 << endl;
775
}
776
base = 0;
777
u_16 = 1;
778
{
779
U_16 result1 = base + u_16;
780
U_16 result2 = u_16 + base;
781
cout << "U_16," << hex << base << ",add,U_16," << hex << u_16 << ",U_16," << hex << result1 << "," << hex << result2 << endl;
782
}
783
base = 0;
784
u_16 = 2;
785
{
786
U_16 result1 = base + u_16;
787
U_16 result2 = u_16 + base;
788
cout << "U_16," << hex << base << ",add,U_16," << hex << u_16 << ",U_16," << hex << result1 << "," << hex << result2 << endl;
789
}
790
base = 0xffff;
791
u_16 = 1;
792
{
793
U_16 result1 = base + u_16;
794
U_16 result2 = u_16 + base;
795
cout << "U_16," << hex << base << ",add,U_16," << hex << u_16 << ",U_16," << hex << result1 << "," << hex << result2 << endl;
796
}
797
798
cout << "SUBSECTION U_16 WITH U_32" << endl;
799
base = 0;
800
u_32 = 0;
801
{
802
U_32 result1 = base + u_32;
803
U_32 result2 = u_32 + base;
804
cout << "U_16," << hex << base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
805
}
806
base = 0;
807
u_32 = 1;
808
{
809
U_32 result1 = base + u_32;
810
U_32 result2 = u_32 + base;
811
cout << "U_16," << hex << base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
812
}
813
base = 0;
814
u_32 = 2;
815
{
816
U_32 result1 = base + u_32;
817
U_32 result2 = u_32 + base;
818
cout << "U_16," << hex << base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
819
}
820
base = 0xffff;
821
u_32 = 1;
822
{
823
U_32 result1 = base + u_32;
824
U_32 result2 = u_32 + base;
825
cout << "U_16," << hex << base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
826
}
827
828
cout << "SUBSECTION U_16 WITH U_64" << endl;
829
base = 0;
830
u_64 = 0;
831
{
832
U_64 result1 = base + u_64;
833
U_64 result2 = u_64 + base;
834
cout << "U_16," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
835
}
836
base = 0;
837
u_64 = 1;
838
{
839
U_64 result1 = base + u_64;
840
U_64 result2 = u_64 + base;
841
cout << "U_16," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
842
}
843
base = 0;
844
u_64 = 2;
845
{
846
U_64 result1 = base + u_64;
847
U_64 result2 = u_64 + base;
848
cout << "U_16," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
849
}
850
base = 0xffff;
851
u_64 = 1;
852
{
853
U_64 result1 = base + u_64;
854
U_64 result2 = u_64 + base;
855
cout << "U_16," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
856
}
857
858
cout << "SUBSECTION U_16 WITH I_16" << endl;
859
base = 0;
860
i_16 = 0;
861
{
862
I_32 result1 = base + i_16;
863
I_32 result2 = i_16 + base;
864
cout << "U_16," << hex << base << ",add,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
865
}
866
base = 0;
867
i_16 = 1;
868
{
869
I_32 result1 = base + i_16;
870
I_32 result2 = i_16 + base;
871
cout << "U_16," << hex << base << ",add,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
872
}
873
base = 0;
874
i_16 = 2;
875
{
876
I_32 result1 = base + i_16;
877
I_32 result2 = i_16 + base;
878
cout << "U_16," << hex << base << ",add,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
879
}
880
base = 0;
881
i_16 = -1;
882
{
883
I_32 result1 = base + i_16;
884
I_32 result2 = i_16 + base;
885
cout << "U_16," << hex << base << ",add,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
886
}
887
base = 0xffff;
888
i_16 = 1;
889
{
890
I_32 result1 = base + i_16;
891
I_32 result2 = i_16 + base;
892
cout << "U_16," << hex << base << ",add,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
893
}
894
base = 0xffff;
895
i_16 = -1;
896
{
897
I_32 result1 = base + i_16;
898
I_32 result2 = i_16 + base;
899
cout << "U_16," << hex << base << ",add,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
900
}
901
902
cout << "SUBSECTION U_16 WITH I_32" << endl;
903
base = 0;
904
i_32 = 0;
905
{
906
I_32 result1 = base + i_32;
907
I_32 result2 = i_32 + base;
908
cout << "U_16," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
909
}
910
base = 0;
911
i_32 = 1;
912
{
913
I_32 result1 = base + i_32;
914
I_32 result2 = i_32 + base;
915
cout << "U_16," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
916
}
917
base = 0;
918
i_32 = 2;
919
{
920
I_32 result1 = base + i_32;
921
I_32 result2 = i_32 + base;
922
cout << "U_16," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
923
}
924
base = 0;
925
i_32 = -1;
926
{
927
I_32 result1 = base + i_32;
928
I_32 result2 = i_32 + base;
929
cout << "U_16," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
930
}
931
base = 0xffff;
932
i_32 = 1;
933
{
934
I_32 result1 = base + i_32;
935
I_32 result2 = i_32 + base;
936
cout << "U_16," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
937
}
938
base = 0xffff;
939
i_32 = -1;
940
{
941
I_32 result1 = base + i_32;
942
I_32 result2 = i_32 + base;
943
cout << "U_16," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
944
}
945
946
cout << "SUBSECTION U_16 WITH I_64" << endl;
947
base = 0;
948
i_64 = 0;
949
{
950
I_64 result1 = base + i_64;
951
I_64 result2 = i_64 + base;
952
cout << "U_16," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
953
}
954
base = 0;
955
i_64 = 1;
956
{
957
I_64 result1 = base + i_64;
958
I_64 result2 = i_64 + base;
959
cout << "U_16," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
960
}
961
base = 0;
962
i_64 = 2;
963
{
964
I_64 result1 = base + i_64;
965
I_64 result2 = i_64 + base;
966
cout << "U_16," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
967
}
968
base = 0;
969
i_64 = -1;
970
{
971
I_64 result1 = base + i_64;
972
I_64 result2 = i_64 + base;
973
cout << "U_16," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
974
}
975
base = 0xffff;
976
i_64 = 1;
977
{
978
I_64 result1 = base + i_64;
979
I_64 result2 = i_64 + base;
980
cout << "U_16," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
981
}
982
base = 0xffff;
983
i_64 = -1;
984
{
985
I_64 result1 = base + i_64;
986
I_64 result2 = i_64 + base;
987
cout << "U_16," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
988
}
989
990
cout << "SUBSECTION U_16 WITH UDATA" << endl;
991
base = 0;
992
udata = 0;
993
{
994
UDATA result1 = base + udata;
995
UDATA result2 = udata + base;
996
cout << "U_16," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
997
}
998
base = 0;
999
udata = 1;
1000
{
1001
UDATA result1 = base + udata;
1002
UDATA result2 = udata + base;
1003
cout << "U_16," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
1004
}
1005
base = 0;
1006
udata = 2;
1007
{
1008
UDATA result1 = base + udata;
1009
UDATA result2 = udata + base;
1010
cout << "U_16," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
1011
}
1012
base = 0xffff;
1013
udata = 1;
1014
{
1015
UDATA result1 = base + udata;
1016
UDATA result2 = udata + base;
1017
cout << "U_16," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
1018
}
1019
1020
cout << "SUBSECTION U_16 WITH IDATA" << endl;
1021
base = 0;
1022
idata = 0;
1023
{
1024
IDATA result1 = base + idata;
1025
IDATA result2 = idata + base;
1026
cout << "U_16," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
1027
}
1028
base = 0;
1029
idata = 1;
1030
{
1031
IDATA result1 = base + idata;
1032
IDATA result2 = idata + base;
1033
cout << "U_16," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
1034
}
1035
base = 0;
1036
idata = 2;
1037
{
1038
IDATA result1 = base + idata;
1039
IDATA result2 = idata + base;
1040
cout << "U_16," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
1041
}
1042
base = 0;
1043
idata = -1;
1044
{
1045
IDATA result1 = base + idata;
1046
IDATA result2 = idata + base;
1047
cout << "U_16," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
1048
}
1049
base = 0xffff;
1050
idata = 1;
1051
{
1052
IDATA result1 = base + idata;
1053
IDATA result2 = idata + base;
1054
cout << "U_16," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
1055
}
1056
base = 0xffff;
1057
idata = -1;
1058
{
1059
IDATA result1 = base + idata;
1060
IDATA result2 = idata + base;
1061
cout << "U_16," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
1062
}
1063
1064
}
1065
1066
static void testsubU_16(void)
1067
{
1068
//Locals
1069
U_16 base;
1070
U_8 u_8;
1071
U_16 u_16;
1072
U_32 u_32;
1073
U_64 u_64;
1074
I_16 i_16;
1075
I_32 i_32;
1076
I_64 i_64;
1077
UDATA udata;
1078
IDATA idata;
1079
1080
cout << "START SECTION U_16 sub" << endl;
1081
1082
cout << "SUBSECTION U_16 WITH U_8" << endl;
1083
base = 0;
1084
u_8 = 0;
1085
{
1086
I_32 result1 = base - u_8;
1087
I_32 result2 = u_8 - base;
1088
cout << "U_16," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
1089
}
1090
base = 0;
1091
u_8 = 1;
1092
{
1093
I_32 result1 = base - u_8;
1094
I_32 result2 = u_8 - base;
1095
cout << "U_16," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
1096
}
1097
base = 0;
1098
u_8 = 2;
1099
{
1100
I_32 result1 = base - u_8;
1101
I_32 result2 = u_8 - base;
1102
cout << "U_16," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
1103
}
1104
base = 0xffff;
1105
u_8 = 1;
1106
{
1107
I_32 result1 = base - u_8;
1108
I_32 result2 = u_8 - base;
1109
cout << "U_16," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
1110
}
1111
1112
cout << "SUBSECTION U_16 WITH U_16" << endl;
1113
base = 0;
1114
u_16 = 0;
1115
{
1116
U_16 result1 = base - u_16;
1117
U_16 result2 = u_16 - base;
1118
cout << "U_16," << hex << base << ",sub,U_16," << hex << u_16 << ",U_16," << hex << result1 << "," << hex << result2 << endl;
1119
}
1120
base = 0;
1121
u_16 = 1;
1122
{
1123
U_16 result1 = base - u_16;
1124
U_16 result2 = u_16 - base;
1125
cout << "U_16," << hex << base << ",sub,U_16," << hex << u_16 << ",U_16," << hex << result1 << "," << hex << result2 << endl;
1126
}
1127
base = 0;
1128
u_16 = 2;
1129
{
1130
U_16 result1 = base - u_16;
1131
U_16 result2 = u_16 - base;
1132
cout << "U_16," << hex << base << ",sub,U_16," << hex << u_16 << ",U_16," << hex << result1 << "," << hex << result2 << endl;
1133
}
1134
base = 0xffff;
1135
u_16 = 1;
1136
{
1137
U_16 result1 = base - u_16;
1138
U_16 result2 = u_16 - base;
1139
cout << "U_16," << hex << base << ",sub,U_16," << hex << u_16 << ",U_16," << hex << result1 << "," << hex << result2 << endl;
1140
}
1141
1142
cout << "SUBSECTION U_16 WITH U_32" << endl;
1143
base = 0;
1144
u_32 = 0;
1145
{
1146
U_32 result1 = base - u_32;
1147
U_32 result2 = u_32 - base;
1148
cout << "U_16," << hex << base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1149
}
1150
base = 0;
1151
u_32 = 1;
1152
{
1153
U_32 result1 = base - u_32;
1154
U_32 result2 = u_32 - base;
1155
cout << "U_16," << hex << base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1156
}
1157
base = 0;
1158
u_32 = 2;
1159
{
1160
U_32 result1 = base - u_32;
1161
U_32 result2 = u_32 - base;
1162
cout << "U_16," << hex << base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1163
}
1164
base = 0xffff;
1165
u_32 = 1;
1166
{
1167
U_32 result1 = base - u_32;
1168
U_32 result2 = u_32 - base;
1169
cout << "U_16," << hex << base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1170
}
1171
1172
cout << "SUBSECTION U_16 WITH U_64" << endl;
1173
base = 0;
1174
u_64 = 0;
1175
{
1176
U_64 result1 = base - u_64;
1177
U_64 result2 = u_64 - base;
1178
cout << "U_16," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
1179
}
1180
base = 0;
1181
u_64 = 1;
1182
{
1183
U_64 result1 = base - u_64;
1184
U_64 result2 = u_64 - base;
1185
cout << "U_16," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
1186
}
1187
base = 0;
1188
u_64 = 2;
1189
{
1190
U_64 result1 = base - u_64;
1191
U_64 result2 = u_64 - base;
1192
cout << "U_16," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
1193
}
1194
base = 0xffff;
1195
u_64 = 1;
1196
{
1197
U_64 result1 = base - u_64;
1198
U_64 result2 = u_64 - base;
1199
cout << "U_16," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
1200
}
1201
1202
cout << "SUBSECTION U_16 WITH I_16" << endl;
1203
base = 0;
1204
i_16 = 0;
1205
{
1206
I_32 result1 = base - i_16;
1207
I_32 result2 = i_16 - base;
1208
cout << "U_16," << hex << base << ",sub,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
1209
}
1210
base = 0;
1211
i_16 = 1;
1212
{
1213
I_32 result1 = base - i_16;
1214
I_32 result2 = i_16 - base;
1215
cout << "U_16," << hex << base << ",sub,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
1216
}
1217
base = 0;
1218
i_16 = 2;
1219
{
1220
I_32 result1 = base - i_16;
1221
I_32 result2 = i_16 - base;
1222
cout << "U_16," << hex << base << ",sub,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
1223
}
1224
base = 0;
1225
i_16 = -1;
1226
{
1227
I_32 result1 = base - i_16;
1228
I_32 result2 = i_16 - base;
1229
cout << "U_16," << hex << base << ",sub,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
1230
}
1231
base = 0xffff;
1232
i_16 = 1;
1233
{
1234
I_32 result1 = base - i_16;
1235
I_32 result2 = i_16 - base;
1236
cout << "U_16," << hex << base << ",sub,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
1237
}
1238
base = 0xffff;
1239
i_16 = -1;
1240
{
1241
I_32 result1 = base - i_16;
1242
I_32 result2 = i_16 - base;
1243
cout << "U_16," << hex << base << ",sub,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
1244
}
1245
1246
cout << "SUBSECTION U_16 WITH I_32" << endl;
1247
base = 0;
1248
i_32 = 0;
1249
{
1250
I_32 result1 = base - i_32;
1251
I_32 result2 = i_32 - base;
1252
cout << "U_16," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
1253
}
1254
base = 0;
1255
i_32 = 1;
1256
{
1257
I_32 result1 = base - i_32;
1258
I_32 result2 = i_32 - base;
1259
cout << "U_16," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
1260
}
1261
base = 0;
1262
i_32 = 2;
1263
{
1264
I_32 result1 = base - i_32;
1265
I_32 result2 = i_32 - base;
1266
cout << "U_16," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
1267
}
1268
base = 0;
1269
i_32 = -1;
1270
{
1271
I_32 result1 = base - i_32;
1272
I_32 result2 = i_32 - base;
1273
cout << "U_16," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
1274
}
1275
base = 0xffff;
1276
i_32 = 1;
1277
{
1278
I_32 result1 = base - i_32;
1279
I_32 result2 = i_32 - base;
1280
cout << "U_16," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
1281
}
1282
base = 0xffff;
1283
i_32 = -1;
1284
{
1285
I_32 result1 = base - i_32;
1286
I_32 result2 = i_32 - base;
1287
cout << "U_16," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
1288
}
1289
1290
cout << "SUBSECTION U_16 WITH I_64" << endl;
1291
base = 0;
1292
i_64 = 0;
1293
{
1294
I_64 result1 = base - i_64;
1295
I_64 result2 = i_64 - base;
1296
cout << "U_16," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
1297
}
1298
base = 0;
1299
i_64 = 1;
1300
{
1301
I_64 result1 = base - i_64;
1302
I_64 result2 = i_64 - base;
1303
cout << "U_16," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
1304
}
1305
base = 0;
1306
i_64 = 2;
1307
{
1308
I_64 result1 = base - i_64;
1309
I_64 result2 = i_64 - base;
1310
cout << "U_16," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
1311
}
1312
base = 0;
1313
i_64 = -1;
1314
{
1315
I_64 result1 = base - i_64;
1316
I_64 result2 = i_64 - base;
1317
cout << "U_16," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
1318
}
1319
base = 0xffff;
1320
i_64 = 1;
1321
{
1322
I_64 result1 = base - i_64;
1323
I_64 result2 = i_64 - base;
1324
cout << "U_16," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
1325
}
1326
base = 0xffff;
1327
i_64 = -1;
1328
{
1329
I_64 result1 = base - i_64;
1330
I_64 result2 = i_64 - base;
1331
cout << "U_16," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
1332
}
1333
1334
cout << "SUBSECTION U_16 WITH UDATA" << endl;
1335
base = 0;
1336
udata = 0;
1337
{
1338
UDATA result1 = base - udata;
1339
UDATA result2 = udata - base;
1340
cout << "U_16," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
1341
}
1342
base = 0;
1343
udata = 1;
1344
{
1345
UDATA result1 = base - udata;
1346
UDATA result2 = udata - base;
1347
cout << "U_16," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
1348
}
1349
base = 0;
1350
udata = 2;
1351
{
1352
UDATA result1 = base - udata;
1353
UDATA result2 = udata - base;
1354
cout << "U_16," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
1355
}
1356
base = 0xffff;
1357
udata = 1;
1358
{
1359
UDATA result1 = base - udata;
1360
UDATA result2 = udata - base;
1361
cout << "U_16," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
1362
}
1363
1364
cout << "SUBSECTION U_16 WITH IDATA" << endl;
1365
base = 0;
1366
idata = 0;
1367
{
1368
IDATA result1 = base - idata;
1369
IDATA result2 = idata - base;
1370
cout << "U_16," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
1371
}
1372
base = 0;
1373
idata = 1;
1374
{
1375
IDATA result1 = base - idata;
1376
IDATA result2 = idata - base;
1377
cout << "U_16," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
1378
}
1379
base = 0;
1380
idata = 2;
1381
{
1382
IDATA result1 = base - idata;
1383
IDATA result2 = idata - base;
1384
cout << "U_16," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
1385
}
1386
base = 0;
1387
idata = -1;
1388
{
1389
IDATA result1 = base - idata;
1390
IDATA result2 = idata - base;
1391
cout << "U_16," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
1392
}
1393
base = 0xffff;
1394
idata = 1;
1395
{
1396
IDATA result1 = base - idata;
1397
IDATA result2 = idata - base;
1398
cout << "U_16," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
1399
}
1400
base = 0xffff;
1401
idata = -1;
1402
{
1403
IDATA result1 = base - idata;
1404
IDATA result2 = idata - base;
1405
cout << "U_16," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
1406
}
1407
1408
}
1409
1410
static void testaddU_32(void)
1411
{
1412
//Locals
1413
U_32 base;
1414
U_8 u_8;
1415
U_16 u_16;
1416
U_32 u_32;
1417
U_64 u_64;
1418
I_16 i_16;
1419
I_32 i_32;
1420
I_64 i_64;
1421
UDATA udata;
1422
IDATA idata;
1423
1424
cout << "START SECTION U_32 add" << endl;
1425
1426
cout << "SUBSECTION U_32 WITH U_8" << endl;
1427
base = 0;
1428
u_8 = 0;
1429
{
1430
U_32 result1 = base + u_8;
1431
U_32 result2 = u_8 + base;
1432
cout << "U_32," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1433
}
1434
base = 0;
1435
u_8 = 1;
1436
{
1437
U_32 result1 = base + u_8;
1438
U_32 result2 = u_8 + base;
1439
cout << "U_32," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1440
}
1441
base = 0;
1442
u_8 = 2;
1443
{
1444
U_32 result1 = base + u_8;
1445
U_32 result2 = u_8 + base;
1446
cout << "U_32," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1447
}
1448
base = 0xffffffff;
1449
u_8 = 1;
1450
{
1451
U_32 result1 = base + u_8;
1452
U_32 result2 = u_8 + base;
1453
cout << "U_32," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1454
}
1455
1456
cout << "SUBSECTION U_32 WITH U_16" << endl;
1457
base = 0;
1458
u_16 = 0;
1459
{
1460
U_32 result1 = base + u_16;
1461
U_32 result2 = u_16 + base;
1462
cout << "U_32," << hex << base << ",add,U_16," << hex << u_16 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1463
}
1464
base = 0;
1465
u_16 = 1;
1466
{
1467
U_32 result1 = base + u_16;
1468
U_32 result2 = u_16 + base;
1469
cout << "U_32," << hex << base << ",add,U_16," << hex << u_16 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1470
}
1471
base = 0;
1472
u_16 = 2;
1473
{
1474
U_32 result1 = base + u_16;
1475
U_32 result2 = u_16 + base;
1476
cout << "U_32," << hex << base << ",add,U_16," << hex << u_16 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1477
}
1478
base = 0xffffffff;
1479
u_16 = 1;
1480
{
1481
U_32 result1 = base + u_16;
1482
U_32 result2 = u_16 + base;
1483
cout << "U_32," << hex << base << ",add,U_16," << hex << u_16 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1484
}
1485
1486
cout << "SUBSECTION U_32 WITH U_32" << endl;
1487
base = 0;
1488
u_32 = 0;
1489
{
1490
U_32 result1 = base + u_32;
1491
U_32 result2 = u_32 + base;
1492
cout << "U_32," << hex << base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1493
}
1494
base = 0;
1495
u_32 = 1;
1496
{
1497
U_32 result1 = base + u_32;
1498
U_32 result2 = u_32 + base;
1499
cout << "U_32," << hex << base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1500
}
1501
base = 0;
1502
u_32 = 2;
1503
{
1504
U_32 result1 = base + u_32;
1505
U_32 result2 = u_32 + base;
1506
cout << "U_32," << hex << base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1507
}
1508
base = 0xffffffff;
1509
u_32 = 1;
1510
{
1511
U_32 result1 = base + u_32;
1512
U_32 result2 = u_32 + base;
1513
cout << "U_32," << hex << base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1514
}
1515
1516
cout << "SUBSECTION U_32 WITH U_64" << endl;
1517
base = 0;
1518
u_64 = 0;
1519
{
1520
U_64 result1 = base + u_64;
1521
U_64 result2 = u_64 + base;
1522
cout << "U_32," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
1523
}
1524
base = 0;
1525
u_64 = 1;
1526
{
1527
U_64 result1 = base + u_64;
1528
U_64 result2 = u_64 + base;
1529
cout << "U_32," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
1530
}
1531
base = 0;
1532
u_64 = 2;
1533
{
1534
U_64 result1 = base + u_64;
1535
U_64 result2 = u_64 + base;
1536
cout << "U_32," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
1537
}
1538
base = 0xffffffff;
1539
u_64 = 1;
1540
{
1541
U_64 result1 = base + u_64;
1542
U_64 result2 = u_64 + base;
1543
cout << "U_32," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
1544
}
1545
1546
cout << "SUBSECTION U_32 WITH I_16" << endl;
1547
base = 0;
1548
i_16 = 0;
1549
{
1550
U_32 result1 = base + i_16;
1551
U_32 result2 = i_16 + base;
1552
cout << "U_32," << hex << base << ",add,I_16," << hex << i_16 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1553
}
1554
base = 0;
1555
i_16 = 1;
1556
{
1557
U_32 result1 = base + i_16;
1558
U_32 result2 = i_16 + base;
1559
cout << "U_32," << hex << base << ",add,I_16," << hex << i_16 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1560
}
1561
base = 0;
1562
i_16 = 2;
1563
{
1564
U_32 result1 = base + i_16;
1565
U_32 result2 = i_16 + base;
1566
cout << "U_32," << hex << base << ",add,I_16," << hex << i_16 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1567
}
1568
base = 0;
1569
i_16 = -1;
1570
{
1571
U_32 result1 = base + i_16;
1572
U_32 result2 = i_16 + base;
1573
cout << "U_32," << hex << base << ",add,I_16," << hex << i_16 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1574
}
1575
base = 0xffffffff;
1576
i_16 = 1;
1577
{
1578
U_32 result1 = base + i_16;
1579
U_32 result2 = i_16 + base;
1580
cout << "U_32," << hex << base << ",add,I_16," << hex << i_16 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1581
}
1582
base = 0xffffffff;
1583
i_16 = -1;
1584
{
1585
U_32 result1 = base + i_16;
1586
U_32 result2 = i_16 + base;
1587
cout << "U_32," << hex << base << ",add,I_16," << hex << i_16 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1588
}
1589
1590
cout << "SUBSECTION U_32 WITH I_32" << endl;
1591
base = 0;
1592
i_32 = 0;
1593
{
1594
U_32 result1 = base + i_32;
1595
U_32 result2 = i_32 + base;
1596
cout << "U_32," << hex << base << ",add,I_32," << hex << i_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1597
}
1598
base = 0;
1599
i_32 = 1;
1600
{
1601
U_32 result1 = base + i_32;
1602
U_32 result2 = i_32 + base;
1603
cout << "U_32," << hex << base << ",add,I_32," << hex << i_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1604
}
1605
base = 0;
1606
i_32 = 2;
1607
{
1608
U_32 result1 = base + i_32;
1609
U_32 result2 = i_32 + base;
1610
cout << "U_32," << hex << base << ",add,I_32," << hex << i_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1611
}
1612
base = 0;
1613
i_32 = -1;
1614
{
1615
U_32 result1 = base + i_32;
1616
U_32 result2 = i_32 + base;
1617
cout << "U_32," << hex << base << ",add,I_32," << hex << i_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1618
}
1619
base = 0xffffffff;
1620
i_32 = 1;
1621
{
1622
U_32 result1 = base + i_32;
1623
U_32 result2 = i_32 + base;
1624
cout << "U_32," << hex << base << ",add,I_32," << hex << i_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1625
}
1626
base = 0xffffffff;
1627
i_32 = -1;
1628
{
1629
U_32 result1 = base + i_32;
1630
U_32 result2 = i_32 + base;
1631
cout << "U_32," << hex << base << ",add,I_32," << hex << i_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1632
}
1633
1634
cout << "SUBSECTION U_32 WITH I_64" << endl;
1635
base = 0;
1636
i_64 = 0;
1637
{
1638
I_64 result1 = base + i_64;
1639
I_64 result2 = i_64 + base;
1640
cout << "U_32," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
1641
}
1642
base = 0;
1643
i_64 = 1;
1644
{
1645
I_64 result1 = base + i_64;
1646
I_64 result2 = i_64 + base;
1647
cout << "U_32," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
1648
}
1649
base = 0;
1650
i_64 = 2;
1651
{
1652
I_64 result1 = base + i_64;
1653
I_64 result2 = i_64 + base;
1654
cout << "U_32," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
1655
}
1656
base = 0;
1657
i_64 = -1;
1658
{
1659
I_64 result1 = base + i_64;
1660
I_64 result2 = i_64 + base;
1661
cout << "U_32," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
1662
}
1663
base = 0xffffffff;
1664
i_64 = 1;
1665
{
1666
I_64 result1 = base + i_64;
1667
I_64 result2 = i_64 + base;
1668
cout << "U_32," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
1669
}
1670
base = 0xffffffff;
1671
i_64 = -1;
1672
{
1673
I_64 result1 = base + i_64;
1674
I_64 result2 = i_64 + base;
1675
cout << "U_32," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
1676
}
1677
1678
cout << "SUBSECTION U_32 WITH UDATA" << endl;
1679
base = 0;
1680
udata = 0;
1681
{
1682
UDATA result1 = base + udata;
1683
UDATA result2 = udata + base;
1684
cout << "U_32," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
1685
}
1686
base = 0;
1687
udata = 1;
1688
{
1689
UDATA result1 = base + udata;
1690
UDATA result2 = udata + base;
1691
cout << "U_32," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
1692
}
1693
base = 0;
1694
udata = 2;
1695
{
1696
UDATA result1 = base + udata;
1697
UDATA result2 = udata + base;
1698
cout << "U_32," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
1699
}
1700
base = 0xffffffff;
1701
udata = 1;
1702
{
1703
UDATA result1 = base + udata;
1704
UDATA result2 = udata + base;
1705
cout << "U_32," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
1706
}
1707
1708
cout << "SUBSECTION U_32 WITH IDATA" << endl;
1709
base = 0;
1710
idata = 0;
1711
{
1712
IDATA result1 = base + idata;
1713
IDATA result2 = idata + base;
1714
cout << "U_32," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
1715
}
1716
base = 0;
1717
idata = 1;
1718
{
1719
IDATA result1 = base + idata;
1720
IDATA result2 = idata + base;
1721
cout << "U_32," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
1722
}
1723
base = 0;
1724
idata = 2;
1725
{
1726
IDATA result1 = base + idata;
1727
IDATA result2 = idata + base;
1728
cout << "U_32," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
1729
}
1730
base = 0;
1731
idata = -1;
1732
{
1733
IDATA result1 = base + idata;
1734
IDATA result2 = idata + base;
1735
cout << "U_32," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
1736
}
1737
base = 0xffffffff;
1738
idata = 1;
1739
{
1740
IDATA result1 = base + idata;
1741
IDATA result2 = idata + base;
1742
cout << "U_32," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
1743
}
1744
base = 0xffffffff;
1745
idata = -1;
1746
{
1747
IDATA result1 = base + idata;
1748
IDATA result2 = idata + base;
1749
cout << "U_32," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
1750
}
1751
1752
}
1753
1754
static void testsubU_32(void)
1755
{
1756
//Locals
1757
U_32 base;
1758
U_8 u_8;
1759
U_16 u_16;
1760
U_32 u_32;
1761
U_64 u_64;
1762
I_16 i_16;
1763
I_32 i_32;
1764
I_64 i_64;
1765
UDATA udata;
1766
IDATA idata;
1767
1768
cout << "START SECTION U_32 sub" << endl;
1769
1770
cout << "SUBSECTION U_32 WITH U_8" << endl;
1771
base = 0;
1772
u_8 = 0;
1773
{
1774
U_32 result1 = base - u_8;
1775
U_32 result2 = u_8 - base;
1776
cout << "U_32," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1777
}
1778
base = 0;
1779
u_8 = 1;
1780
{
1781
U_32 result1 = base - u_8;
1782
U_32 result2 = u_8 - base;
1783
cout << "U_32," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1784
}
1785
base = 0;
1786
u_8 = 2;
1787
{
1788
U_32 result1 = base - u_8;
1789
U_32 result2 = u_8 - base;
1790
cout << "U_32," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1791
}
1792
base = 0xffffffff;
1793
u_8 = 1;
1794
{
1795
U_32 result1 = base - u_8;
1796
U_32 result2 = u_8 - base;
1797
cout << "U_32," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1798
}
1799
1800
cout << "SUBSECTION U_32 WITH U_16" << endl;
1801
base = 0;
1802
u_16 = 0;
1803
{
1804
U_32 result1 = base - u_16;
1805
U_32 result2 = u_16 - base;
1806
cout << "U_32," << hex << base << ",sub,U_16," << hex << u_16 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1807
}
1808
base = 0;
1809
u_16 = 1;
1810
{
1811
U_32 result1 = base - u_16;
1812
U_32 result2 = u_16 - base;
1813
cout << "U_32," << hex << base << ",sub,U_16," << hex << u_16 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1814
}
1815
base = 0;
1816
u_16 = 2;
1817
{
1818
U_32 result1 = base - u_16;
1819
U_32 result2 = u_16 - base;
1820
cout << "U_32," << hex << base << ",sub,U_16," << hex << u_16 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1821
}
1822
base = 0xffffffff;
1823
u_16 = 1;
1824
{
1825
U_32 result1 = base - u_16;
1826
U_32 result2 = u_16 - base;
1827
cout << "U_32," << hex << base << ",sub,U_16," << hex << u_16 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1828
}
1829
1830
cout << "SUBSECTION U_32 WITH U_32" << endl;
1831
base = 0;
1832
u_32 = 0;
1833
{
1834
U_32 result1 = base - u_32;
1835
U_32 result2 = u_32 - base;
1836
cout << "U_32," << hex << base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1837
}
1838
base = 0;
1839
u_32 = 1;
1840
{
1841
U_32 result1 = base - u_32;
1842
U_32 result2 = u_32 - base;
1843
cout << "U_32," << hex << base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1844
}
1845
base = 0;
1846
u_32 = 2;
1847
{
1848
U_32 result1 = base - u_32;
1849
U_32 result2 = u_32 - base;
1850
cout << "U_32," << hex << base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1851
}
1852
base = 0xffffffff;
1853
u_32 = 1;
1854
{
1855
U_32 result1 = base - u_32;
1856
U_32 result2 = u_32 - base;
1857
cout << "U_32," << hex << base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1858
}
1859
1860
cout << "SUBSECTION U_32 WITH U_64" << endl;
1861
base = 0;
1862
u_64 = 0;
1863
{
1864
U_64 result1 = base - u_64;
1865
U_64 result2 = u_64 - base;
1866
cout << "U_32," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
1867
}
1868
base = 0;
1869
u_64 = 1;
1870
{
1871
U_64 result1 = base - u_64;
1872
U_64 result2 = u_64 - base;
1873
cout << "U_32," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
1874
}
1875
base = 0;
1876
u_64 = 2;
1877
{
1878
U_64 result1 = base - u_64;
1879
U_64 result2 = u_64 - base;
1880
cout << "U_32," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
1881
}
1882
base = 0xffffffff;
1883
u_64 = 1;
1884
{
1885
U_64 result1 = base - u_64;
1886
U_64 result2 = u_64 - base;
1887
cout << "U_32," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
1888
}
1889
1890
cout << "SUBSECTION U_32 WITH I_16" << endl;
1891
base = 0;
1892
i_16 = 0;
1893
{
1894
U_32 result1 = base - i_16;
1895
U_32 result2 = i_16 - base;
1896
cout << "U_32," << hex << base << ",sub,I_16," << hex << i_16 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1897
}
1898
base = 0;
1899
i_16 = 1;
1900
{
1901
U_32 result1 = base - i_16;
1902
U_32 result2 = i_16 - base;
1903
cout << "U_32," << hex << base << ",sub,I_16," << hex << i_16 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1904
}
1905
base = 0;
1906
i_16 = 2;
1907
{
1908
U_32 result1 = base - i_16;
1909
U_32 result2 = i_16 - base;
1910
cout << "U_32," << hex << base << ",sub,I_16," << hex << i_16 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1911
}
1912
base = 0;
1913
i_16 = -1;
1914
{
1915
U_32 result1 = base - i_16;
1916
U_32 result2 = i_16 - base;
1917
cout << "U_32," << hex << base << ",sub,I_16," << hex << i_16 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1918
}
1919
base = 0xffffffff;
1920
i_16 = 1;
1921
{
1922
U_32 result1 = base - i_16;
1923
U_32 result2 = i_16 - base;
1924
cout << "U_32," << hex << base << ",sub,I_16," << hex << i_16 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1925
}
1926
base = 0xffffffff;
1927
i_16 = -1;
1928
{
1929
U_32 result1 = base - i_16;
1930
U_32 result2 = i_16 - base;
1931
cout << "U_32," << hex << base << ",sub,I_16," << hex << i_16 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1932
}
1933
1934
cout << "SUBSECTION U_32 WITH I_32" << endl;
1935
base = 0;
1936
i_32 = 0;
1937
{
1938
U_32 result1 = base - i_32;
1939
U_32 result2 = i_32 - base;
1940
cout << "U_32," << hex << base << ",sub,I_32," << hex << i_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1941
}
1942
base = 0;
1943
i_32 = 1;
1944
{
1945
U_32 result1 = base - i_32;
1946
U_32 result2 = i_32 - base;
1947
cout << "U_32," << hex << base << ",sub,I_32," << hex << i_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1948
}
1949
base = 0;
1950
i_32 = 2;
1951
{
1952
U_32 result1 = base - i_32;
1953
U_32 result2 = i_32 - base;
1954
cout << "U_32," << hex << base << ",sub,I_32," << hex << i_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1955
}
1956
base = 0;
1957
i_32 = -1;
1958
{
1959
U_32 result1 = base - i_32;
1960
U_32 result2 = i_32 - base;
1961
cout << "U_32," << hex << base << ",sub,I_32," << hex << i_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1962
}
1963
base = 0xffffffff;
1964
i_32 = 1;
1965
{
1966
U_32 result1 = base - i_32;
1967
U_32 result2 = i_32 - base;
1968
cout << "U_32," << hex << base << ",sub,I_32," << hex << i_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1969
}
1970
base = 0xffffffff;
1971
i_32 = -1;
1972
{
1973
U_32 result1 = base - i_32;
1974
U_32 result2 = i_32 - base;
1975
cout << "U_32," << hex << base << ",sub,I_32," << hex << i_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
1976
}
1977
1978
cout << "SUBSECTION U_32 WITH I_64" << endl;
1979
base = 0;
1980
i_64 = 0;
1981
{
1982
I_64 result1 = base - i_64;
1983
I_64 result2 = i_64 - base;
1984
cout << "U_32," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
1985
}
1986
base = 0;
1987
i_64 = 1;
1988
{
1989
I_64 result1 = base - i_64;
1990
I_64 result2 = i_64 - base;
1991
cout << "U_32," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
1992
}
1993
base = 0;
1994
i_64 = 2;
1995
{
1996
I_64 result1 = base - i_64;
1997
I_64 result2 = i_64 - base;
1998
cout << "U_32," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
1999
}
2000
base = 0;
2001
i_64 = -1;
2002
{
2003
I_64 result1 = base - i_64;
2004
I_64 result2 = i_64 - base;
2005
cout << "U_32," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
2006
}
2007
base = 0xffffffff;
2008
i_64 = 1;
2009
{
2010
I_64 result1 = base - i_64;
2011
I_64 result2 = i_64 - base;
2012
cout << "U_32," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
2013
}
2014
base = 0xffffffff;
2015
i_64 = -1;
2016
{
2017
I_64 result1 = base - i_64;
2018
I_64 result2 = i_64 - base;
2019
cout << "U_32," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
2020
}
2021
2022
cout << "SUBSECTION U_32 WITH UDATA" << endl;
2023
base = 0;
2024
udata = 0;
2025
{
2026
UDATA result1 = base - udata;
2027
UDATA result2 = udata - base;
2028
cout << "U_32," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
2029
}
2030
base = 0;
2031
udata = 1;
2032
{
2033
UDATA result1 = base - udata;
2034
UDATA result2 = udata - base;
2035
cout << "U_32," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
2036
}
2037
base = 0;
2038
udata = 2;
2039
{
2040
UDATA result1 = base - udata;
2041
UDATA result2 = udata - base;
2042
cout << "U_32," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
2043
}
2044
base = 0xffffffff;
2045
udata = 1;
2046
{
2047
UDATA result1 = base - udata;
2048
UDATA result2 = udata - base;
2049
cout << "U_32," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
2050
}
2051
2052
cout << "SUBSECTION U_32 WITH IDATA" << endl;
2053
base = 0;
2054
idata = 0;
2055
{
2056
IDATA result1 = base - idata;
2057
IDATA result2 = idata - base;
2058
cout << "U_32," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
2059
}
2060
base = 0;
2061
idata = 1;
2062
{
2063
IDATA result1 = base - idata;
2064
IDATA result2 = idata - base;
2065
cout << "U_32," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
2066
}
2067
base = 0;
2068
idata = 2;
2069
{
2070
IDATA result1 = base - idata;
2071
IDATA result2 = idata - base;
2072
cout << "U_32," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
2073
}
2074
base = 0;
2075
idata = -1;
2076
{
2077
IDATA result1 = base - idata;
2078
IDATA result2 = idata - base;
2079
cout << "U_32," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
2080
}
2081
base = 0xffffffff;
2082
idata = 1;
2083
{
2084
IDATA result1 = base - idata;
2085
IDATA result2 = idata - base;
2086
cout << "U_32," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
2087
}
2088
base = 0xffffffff;
2089
idata = -1;
2090
{
2091
IDATA result1 = base - idata;
2092
IDATA result2 = idata - base;
2093
cout << "U_32," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
2094
}
2095
2096
}
2097
2098
static void testaddU_64(void)
2099
{
2100
//Locals
2101
U_64 base;
2102
U_8 u_8;
2103
U_16 u_16;
2104
U_32 u_32;
2105
U_64 u_64;
2106
I_16 i_16;
2107
I_32 i_32;
2108
I_64 i_64;
2109
UDATA udata;
2110
IDATA idata;
2111
2112
cout << "START SECTION U_64 add" << endl;
2113
2114
cout << "SUBSECTION U_64 WITH U_8" << endl;
2115
base = 0;
2116
u_8 = 0;
2117
{
2118
U_64 result1 = base + u_8;
2119
U_64 result2 = u_8 + base;
2120
cout << "U_64," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2121
}
2122
base = 0;
2123
u_8 = 1;
2124
{
2125
U_64 result1 = base + u_8;
2126
U_64 result2 = u_8 + base;
2127
cout << "U_64," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2128
}
2129
base = 0;
2130
u_8 = 2;
2131
{
2132
U_64 result1 = base + u_8;
2133
U_64 result2 = u_8 + base;
2134
cout << "U_64," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2135
}
2136
base = 0xffffffffffffffff;
2137
u_8 = 1;
2138
{
2139
U_64 result1 = base + u_8;
2140
U_64 result2 = u_8 + base;
2141
cout << "U_64," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2142
}
2143
2144
cout << "SUBSECTION U_64 WITH U_16" << endl;
2145
base = 0;
2146
u_16 = 0;
2147
{
2148
U_64 result1 = base + u_16;
2149
U_64 result2 = u_16 + base;
2150
cout << "U_64," << hex << base << ",add,U_16," << hex << u_16 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2151
}
2152
base = 0;
2153
u_16 = 1;
2154
{
2155
U_64 result1 = base + u_16;
2156
U_64 result2 = u_16 + base;
2157
cout << "U_64," << hex << base << ",add,U_16," << hex << u_16 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2158
}
2159
base = 0;
2160
u_16 = 2;
2161
{
2162
U_64 result1 = base + u_16;
2163
U_64 result2 = u_16 + base;
2164
cout << "U_64," << hex << base << ",add,U_16," << hex << u_16 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2165
}
2166
base = 0xffffffffffffffff;
2167
u_16 = 1;
2168
{
2169
U_64 result1 = base + u_16;
2170
U_64 result2 = u_16 + base;
2171
cout << "U_64," << hex << base << ",add,U_16," << hex << u_16 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2172
}
2173
2174
cout << "SUBSECTION U_64 WITH U_32" << endl;
2175
base = 0;
2176
u_32 = 0;
2177
{
2178
U_64 result1 = base + u_32;
2179
U_64 result2 = u_32 + base;
2180
cout << "U_64," << hex << base << ",add,U_32," << hex << u_32 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2181
}
2182
base = 0;
2183
u_32 = 1;
2184
{
2185
U_64 result1 = base + u_32;
2186
U_64 result2 = u_32 + base;
2187
cout << "U_64," << hex << base << ",add,U_32," << hex << u_32 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2188
}
2189
base = 0;
2190
u_32 = 2;
2191
{
2192
U_64 result1 = base + u_32;
2193
U_64 result2 = u_32 + base;
2194
cout << "U_64," << hex << base << ",add,U_32," << hex << u_32 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2195
}
2196
base = 0xffffffffffffffff;
2197
u_32 = 1;
2198
{
2199
U_64 result1 = base + u_32;
2200
U_64 result2 = u_32 + base;
2201
cout << "U_64," << hex << base << ",add,U_32," << hex << u_32 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2202
}
2203
2204
cout << "SUBSECTION U_64 WITH U_64" << endl;
2205
base = 0;
2206
u_64 = 0;
2207
{
2208
U_64 result1 = base + u_64;
2209
U_64 result2 = u_64 + base;
2210
cout << "U_64," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2211
}
2212
base = 0;
2213
u_64 = 1;
2214
{
2215
U_64 result1 = base + u_64;
2216
U_64 result2 = u_64 + base;
2217
cout << "U_64," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2218
}
2219
base = 0;
2220
u_64 = 2;
2221
{
2222
U_64 result1 = base + u_64;
2223
U_64 result2 = u_64 + base;
2224
cout << "U_64," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2225
}
2226
base = 0xffffffffffffffff;
2227
u_64 = 1;
2228
{
2229
U_64 result1 = base + u_64;
2230
U_64 result2 = u_64 + base;
2231
cout << "U_64," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2232
}
2233
2234
cout << "SUBSECTION U_64 WITH I_16" << endl;
2235
base = 0;
2236
i_16 = 0;
2237
{
2238
U_64 result1 = base + i_16;
2239
U_64 result2 = i_16 + base;
2240
cout << "U_64," << hex << base << ",add,I_16," << hex << i_16 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2241
}
2242
base = 0;
2243
i_16 = 1;
2244
{
2245
U_64 result1 = base + i_16;
2246
U_64 result2 = i_16 + base;
2247
cout << "U_64," << hex << base << ",add,I_16," << hex << i_16 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2248
}
2249
base = 0;
2250
i_16 = 2;
2251
{
2252
U_64 result1 = base + i_16;
2253
U_64 result2 = i_16 + base;
2254
cout << "U_64," << hex << base << ",add,I_16," << hex << i_16 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2255
}
2256
base = 0;
2257
i_16 = -1;
2258
{
2259
U_64 result1 = base + i_16;
2260
U_64 result2 = i_16 + base;
2261
cout << "U_64," << hex << base << ",add,I_16," << hex << i_16 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2262
}
2263
base = 0xffffffffffffffff;
2264
i_16 = 1;
2265
{
2266
U_64 result1 = base + i_16;
2267
U_64 result2 = i_16 + base;
2268
cout << "U_64," << hex << base << ",add,I_16," << hex << i_16 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2269
}
2270
base = 0xffffffffffffffff;
2271
i_16 = -1;
2272
{
2273
U_64 result1 = base + i_16;
2274
U_64 result2 = i_16 + base;
2275
cout << "U_64," << hex << base << ",add,I_16," << hex << i_16 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2276
}
2277
2278
cout << "SUBSECTION U_64 WITH I_32" << endl;
2279
base = 0;
2280
i_32 = 0;
2281
{
2282
U_64 result1 = base + i_32;
2283
U_64 result2 = i_32 + base;
2284
cout << "U_64," << hex << base << ",add,I_32," << hex << i_32 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2285
}
2286
base = 0;
2287
i_32 = 1;
2288
{
2289
U_64 result1 = base + i_32;
2290
U_64 result2 = i_32 + base;
2291
cout << "U_64," << hex << base << ",add,I_32," << hex << i_32 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2292
}
2293
base = 0;
2294
i_32 = 2;
2295
{
2296
U_64 result1 = base + i_32;
2297
U_64 result2 = i_32 + base;
2298
cout << "U_64," << hex << base << ",add,I_32," << hex << i_32 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2299
}
2300
base = 0;
2301
i_32 = -1;
2302
{
2303
U_64 result1 = base + i_32;
2304
U_64 result2 = i_32 + base;
2305
cout << "U_64," << hex << base << ",add,I_32," << hex << i_32 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2306
}
2307
base = 0xffffffffffffffff;
2308
i_32 = 1;
2309
{
2310
U_64 result1 = base + i_32;
2311
U_64 result2 = i_32 + base;
2312
cout << "U_64," << hex << base << ",add,I_32," << hex << i_32 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2313
}
2314
base = 0xffffffffffffffff;
2315
i_32 = -1;
2316
{
2317
U_64 result1 = base + i_32;
2318
U_64 result2 = i_32 + base;
2319
cout << "U_64," << hex << base << ",add,I_32," << hex << i_32 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2320
}
2321
2322
cout << "SUBSECTION U_64 WITH I_64" << endl;
2323
base = 0;
2324
i_64 = 0;
2325
{
2326
U_64 result1 = base + i_64;
2327
U_64 result2 = i_64 + base;
2328
cout << "U_64," << hex << base << ",add,I_64," << hex << i_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2329
}
2330
base = 0;
2331
i_64 = 1;
2332
{
2333
U_64 result1 = base + i_64;
2334
U_64 result2 = i_64 + base;
2335
cout << "U_64," << hex << base << ",add,I_64," << hex << i_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2336
}
2337
base = 0;
2338
i_64 = 2;
2339
{
2340
U_64 result1 = base + i_64;
2341
U_64 result2 = i_64 + base;
2342
cout << "U_64," << hex << base << ",add,I_64," << hex << i_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2343
}
2344
base = 0;
2345
i_64 = -1;
2346
{
2347
U_64 result1 = base + i_64;
2348
U_64 result2 = i_64 + base;
2349
cout << "U_64," << hex << base << ",add,I_64," << hex << i_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2350
}
2351
base = 0xffffffffffffffff;
2352
i_64 = 1;
2353
{
2354
U_64 result1 = base + i_64;
2355
U_64 result2 = i_64 + base;
2356
cout << "U_64," << hex << base << ",add,I_64," << hex << i_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2357
}
2358
base = 0xffffffffffffffff;
2359
i_64 = -1;
2360
{
2361
U_64 result1 = base + i_64;
2362
U_64 result2 = i_64 + base;
2363
cout << "U_64," << hex << base << ",add,I_64," << hex << i_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2364
}
2365
2366
cout << "SUBSECTION U_64 WITH UDATA" << endl;
2367
base = 0;
2368
udata = 0;
2369
{
2370
U_64 result1 = base + udata;
2371
U_64 result2 = udata + base;
2372
cout << "U_64," << hex << base << ",add,UDATA," << hex << udata << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2373
}
2374
base = 0;
2375
udata = 1;
2376
{
2377
U_64 result1 = base + udata;
2378
U_64 result2 = udata + base;
2379
cout << "U_64," << hex << base << ",add,UDATA," << hex << udata << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2380
}
2381
base = 0;
2382
udata = 2;
2383
{
2384
U_64 result1 = base + udata;
2385
U_64 result2 = udata + base;
2386
cout << "U_64," << hex << base << ",add,UDATA," << hex << udata << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2387
}
2388
base = 0xffffffffffffffff;
2389
udata = 1;
2390
{
2391
U_64 result1 = base + udata;
2392
U_64 result2 = udata + base;
2393
cout << "U_64," << hex << base << ",add,UDATA," << hex << udata << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2394
}
2395
2396
cout << "SUBSECTION U_64 WITH IDATA" << endl;
2397
2398
cout << "INVALID: U_64,add,IDATA" << endl;
2399
2400
2401
}
2402
2403
static void testsubU_64(void)
2404
{
2405
//Locals
2406
U_64 base;
2407
U_8 u_8;
2408
U_16 u_16;
2409
U_32 u_32;
2410
U_64 u_64;
2411
I_16 i_16;
2412
I_32 i_32;
2413
I_64 i_64;
2414
UDATA udata;
2415
IDATA idata;
2416
2417
cout << "START SECTION U_64 sub" << endl;
2418
2419
cout << "SUBSECTION U_64 WITH U_8" << endl;
2420
base = 0;
2421
u_8 = 0;
2422
{
2423
U_64 result1 = base - u_8;
2424
U_64 result2 = u_8 - base;
2425
cout << "U_64," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2426
}
2427
base = 0;
2428
u_8 = 1;
2429
{
2430
U_64 result1 = base - u_8;
2431
U_64 result2 = u_8 - base;
2432
cout << "U_64," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2433
}
2434
base = 0;
2435
u_8 = 2;
2436
{
2437
U_64 result1 = base - u_8;
2438
U_64 result2 = u_8 - base;
2439
cout << "U_64," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2440
}
2441
base = 0xffffffffffffffff;
2442
u_8 = 1;
2443
{
2444
U_64 result1 = base - u_8;
2445
U_64 result2 = u_8 - base;
2446
cout << "U_64," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2447
}
2448
2449
cout << "SUBSECTION U_64 WITH U_16" << endl;
2450
base = 0;
2451
u_16 = 0;
2452
{
2453
U_64 result1 = base - u_16;
2454
U_64 result2 = u_16 - base;
2455
cout << "U_64," << hex << base << ",sub,U_16," << hex << u_16 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2456
}
2457
base = 0;
2458
u_16 = 1;
2459
{
2460
U_64 result1 = base - u_16;
2461
U_64 result2 = u_16 - base;
2462
cout << "U_64," << hex << base << ",sub,U_16," << hex << u_16 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2463
}
2464
base = 0;
2465
u_16 = 2;
2466
{
2467
U_64 result1 = base - u_16;
2468
U_64 result2 = u_16 - base;
2469
cout << "U_64," << hex << base << ",sub,U_16," << hex << u_16 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2470
}
2471
base = 0xffffffffffffffff;
2472
u_16 = 1;
2473
{
2474
U_64 result1 = base - u_16;
2475
U_64 result2 = u_16 - base;
2476
cout << "U_64," << hex << base << ",sub,U_16," << hex << u_16 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2477
}
2478
2479
cout << "SUBSECTION U_64 WITH U_32" << endl;
2480
base = 0;
2481
u_32 = 0;
2482
{
2483
U_64 result1 = base - u_32;
2484
U_64 result2 = u_32 - base;
2485
cout << "U_64," << hex << base << ",sub,U_32," << hex << u_32 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2486
}
2487
base = 0;
2488
u_32 = 1;
2489
{
2490
U_64 result1 = base - u_32;
2491
U_64 result2 = u_32 - base;
2492
cout << "U_64," << hex << base << ",sub,U_32," << hex << u_32 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2493
}
2494
base = 0;
2495
u_32 = 2;
2496
{
2497
U_64 result1 = base - u_32;
2498
U_64 result2 = u_32 - base;
2499
cout << "U_64," << hex << base << ",sub,U_32," << hex << u_32 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2500
}
2501
base = 0xffffffffffffffff;
2502
u_32 = 1;
2503
{
2504
U_64 result1 = base - u_32;
2505
U_64 result2 = u_32 - base;
2506
cout << "U_64," << hex << base << ",sub,U_32," << hex << u_32 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2507
}
2508
2509
cout << "SUBSECTION U_64 WITH U_64" << endl;
2510
base = 0;
2511
u_64 = 0;
2512
{
2513
U_64 result1 = base - u_64;
2514
U_64 result2 = u_64 - base;
2515
cout << "U_64," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2516
}
2517
base = 0;
2518
u_64 = 1;
2519
{
2520
U_64 result1 = base - u_64;
2521
U_64 result2 = u_64 - base;
2522
cout << "U_64," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2523
}
2524
base = 0;
2525
u_64 = 2;
2526
{
2527
U_64 result1 = base - u_64;
2528
U_64 result2 = u_64 - base;
2529
cout << "U_64," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2530
}
2531
base = 0xffffffffffffffff;
2532
u_64 = 1;
2533
{
2534
U_64 result1 = base - u_64;
2535
U_64 result2 = u_64 - base;
2536
cout << "U_64," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2537
}
2538
2539
cout << "SUBSECTION U_64 WITH I_16" << endl;
2540
base = 0;
2541
i_16 = 0;
2542
{
2543
U_64 result1 = base - i_16;
2544
U_64 result2 = i_16 - base;
2545
cout << "U_64," << hex << base << ",sub,I_16," << hex << i_16 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2546
}
2547
base = 0;
2548
i_16 = 1;
2549
{
2550
U_64 result1 = base - i_16;
2551
U_64 result2 = i_16 - base;
2552
cout << "U_64," << hex << base << ",sub,I_16," << hex << i_16 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2553
}
2554
base = 0;
2555
i_16 = 2;
2556
{
2557
U_64 result1 = base - i_16;
2558
U_64 result2 = i_16 - base;
2559
cout << "U_64," << hex << base << ",sub,I_16," << hex << i_16 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2560
}
2561
base = 0;
2562
i_16 = -1;
2563
{
2564
U_64 result1 = base - i_16;
2565
U_64 result2 = i_16 - base;
2566
cout << "U_64," << hex << base << ",sub,I_16," << hex << i_16 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2567
}
2568
base = 0xffffffffffffffff;
2569
i_16 = 1;
2570
{
2571
U_64 result1 = base - i_16;
2572
U_64 result2 = i_16 - base;
2573
cout << "U_64," << hex << base << ",sub,I_16," << hex << i_16 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2574
}
2575
base = 0xffffffffffffffff;
2576
i_16 = -1;
2577
{
2578
U_64 result1 = base - i_16;
2579
U_64 result2 = i_16 - base;
2580
cout << "U_64," << hex << base << ",sub,I_16," << hex << i_16 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2581
}
2582
2583
cout << "SUBSECTION U_64 WITH I_32" << endl;
2584
base = 0;
2585
i_32 = 0;
2586
{
2587
U_64 result1 = base - i_32;
2588
U_64 result2 = i_32 - base;
2589
cout << "U_64," << hex << base << ",sub,I_32," << hex << i_32 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2590
}
2591
base = 0;
2592
i_32 = 1;
2593
{
2594
U_64 result1 = base - i_32;
2595
U_64 result2 = i_32 - base;
2596
cout << "U_64," << hex << base << ",sub,I_32," << hex << i_32 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2597
}
2598
base = 0;
2599
i_32 = 2;
2600
{
2601
U_64 result1 = base - i_32;
2602
U_64 result2 = i_32 - base;
2603
cout << "U_64," << hex << base << ",sub,I_32," << hex << i_32 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2604
}
2605
base = 0;
2606
i_32 = -1;
2607
{
2608
U_64 result1 = base - i_32;
2609
U_64 result2 = i_32 - base;
2610
cout << "U_64," << hex << base << ",sub,I_32," << hex << i_32 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2611
}
2612
base = 0xffffffffffffffff;
2613
i_32 = 1;
2614
{
2615
U_64 result1 = base - i_32;
2616
U_64 result2 = i_32 - base;
2617
cout << "U_64," << hex << base << ",sub,I_32," << hex << i_32 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2618
}
2619
base = 0xffffffffffffffff;
2620
i_32 = -1;
2621
{
2622
U_64 result1 = base - i_32;
2623
U_64 result2 = i_32 - base;
2624
cout << "U_64," << hex << base << ",sub,I_32," << hex << i_32 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2625
}
2626
2627
cout << "SUBSECTION U_64 WITH I_64" << endl;
2628
base = 0;
2629
i_64 = 0;
2630
{
2631
U_64 result1 = base - i_64;
2632
U_64 result2 = i_64 - base;
2633
cout << "U_64," << hex << base << ",sub,I_64," << hex << i_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2634
}
2635
base = 0;
2636
i_64 = 1;
2637
{
2638
U_64 result1 = base - i_64;
2639
U_64 result2 = i_64 - base;
2640
cout << "U_64," << hex << base << ",sub,I_64," << hex << i_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2641
}
2642
base = 0;
2643
i_64 = 2;
2644
{
2645
U_64 result1 = base - i_64;
2646
U_64 result2 = i_64 - base;
2647
cout << "U_64," << hex << base << ",sub,I_64," << hex << i_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2648
}
2649
base = 0;
2650
i_64 = -1;
2651
{
2652
U_64 result1 = base - i_64;
2653
U_64 result2 = i_64 - base;
2654
cout << "U_64," << hex << base << ",sub,I_64," << hex << i_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2655
}
2656
base = 0xffffffffffffffff;
2657
i_64 = 1;
2658
{
2659
U_64 result1 = base - i_64;
2660
U_64 result2 = i_64 - base;
2661
cout << "U_64," << hex << base << ",sub,I_64," << hex << i_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2662
}
2663
base = 0xffffffffffffffff;
2664
i_64 = -1;
2665
{
2666
U_64 result1 = base - i_64;
2667
U_64 result2 = i_64 - base;
2668
cout << "U_64," << hex << base << ",sub,I_64," << hex << i_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2669
}
2670
2671
cout << "SUBSECTION U_64 WITH UDATA" << endl;
2672
base = 0;
2673
udata = 0;
2674
{
2675
U_64 result1 = base - udata;
2676
U_64 result2 = udata - base;
2677
cout << "U_64," << hex << base << ",sub,UDATA," << hex << udata << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2678
}
2679
base = 0;
2680
udata = 1;
2681
{
2682
U_64 result1 = base - udata;
2683
U_64 result2 = udata - base;
2684
cout << "U_64," << hex << base << ",sub,UDATA," << hex << udata << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2685
}
2686
base = 0;
2687
udata = 2;
2688
{
2689
U_64 result1 = base - udata;
2690
U_64 result2 = udata - base;
2691
cout << "U_64," << hex << base << ",sub,UDATA," << hex << udata << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2692
}
2693
base = 0xffffffffffffffff;
2694
udata = 1;
2695
{
2696
U_64 result1 = base - udata;
2697
U_64 result2 = udata - base;
2698
cout << "U_64," << hex << base << ",sub,UDATA," << hex << udata << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2699
}
2700
2701
cout << "SUBSECTION U_64 WITH IDATA" << endl;
2702
2703
cout << "INVALID: U_64,sub,IDATA" << endl;
2704
2705
2706
}
2707
2708
static void testaddI_16(void)
2709
{
2710
//Locals
2711
I_16 base;
2712
U_8 u_8;
2713
U_16 u_16;
2714
U_32 u_32;
2715
U_64 u_64;
2716
I_16 i_16;
2717
I_32 i_32;
2718
I_64 i_64;
2719
UDATA udata;
2720
IDATA idata;
2721
2722
cout << "START SECTION I_16 add" << endl;
2723
2724
cout << "SUBSECTION I_16 WITH U_8" << endl;
2725
base = 0;
2726
u_8 = 0;
2727
{
2728
I_32 result1 = base + u_8;
2729
I_32 result2 = u_8 + base;
2730
cout << "I_16," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
2731
}
2732
base = 0;
2733
u_8 = 1;
2734
{
2735
I_32 result1 = base + u_8;
2736
I_32 result2 = u_8 + base;
2737
cout << "I_16," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
2738
}
2739
base = 0;
2740
u_8 = 2;
2741
{
2742
I_32 result1 = base + u_8;
2743
I_32 result2 = u_8 + base;
2744
cout << "I_16," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
2745
}
2746
base = 0x8000;
2747
u_8 = 1;
2748
{
2749
I_32 result1 = base + u_8;
2750
I_32 result2 = u_8 + base;
2751
cout << "I_16," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
2752
}
2753
base = 0x7fff;
2754
u_8 = 1;
2755
{
2756
I_32 result1 = base + u_8;
2757
I_32 result2 = u_8 + base;
2758
cout << "I_16," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
2759
}
2760
2761
cout << "SUBSECTION I_16 WITH U_16" << endl;
2762
base = 0;
2763
u_16 = 0;
2764
{
2765
I_32 result1 = base + u_16;
2766
I_32 result2 = u_16 + base;
2767
cout << "I_16," << hex << base << ",add,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
2768
}
2769
base = 0;
2770
u_16 = 1;
2771
{
2772
I_32 result1 = base + u_16;
2773
I_32 result2 = u_16 + base;
2774
cout << "I_16," << hex << base << ",add,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
2775
}
2776
base = 0;
2777
u_16 = 2;
2778
{
2779
I_32 result1 = base + u_16;
2780
I_32 result2 = u_16 + base;
2781
cout << "I_16," << hex << base << ",add,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
2782
}
2783
base = 0x8000;
2784
u_16 = 1;
2785
{
2786
I_32 result1 = base + u_16;
2787
I_32 result2 = u_16 + base;
2788
cout << "I_16," << hex << base << ",add,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
2789
}
2790
base = 0x7fff;
2791
u_16 = 1;
2792
{
2793
I_32 result1 = base + u_16;
2794
I_32 result2 = u_16 + base;
2795
cout << "I_16," << hex << base << ",add,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
2796
}
2797
2798
cout << "SUBSECTION I_16 WITH U_32" << endl;
2799
base = 0;
2800
u_32 = 0;
2801
{
2802
U_32 result1 = base + u_32;
2803
U_32 result2 = u_32 + base;
2804
cout << "I_16," << hex << base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
2805
}
2806
base = 0;
2807
u_32 = 1;
2808
{
2809
U_32 result1 = base + u_32;
2810
U_32 result2 = u_32 + base;
2811
cout << "I_16," << hex << base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
2812
}
2813
base = 0;
2814
u_32 = 2;
2815
{
2816
U_32 result1 = base + u_32;
2817
U_32 result2 = u_32 + base;
2818
cout << "I_16," << hex << base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
2819
}
2820
base = 0x8000;
2821
u_32 = 1;
2822
{
2823
U_32 result1 = base + u_32;
2824
U_32 result2 = u_32 + base;
2825
cout << "I_16," << hex << base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
2826
}
2827
base = 0x7fff;
2828
u_32 = 1;
2829
{
2830
U_32 result1 = base + u_32;
2831
U_32 result2 = u_32 + base;
2832
cout << "I_16," << hex << base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
2833
}
2834
2835
cout << "SUBSECTION I_16 WITH U_64" << endl;
2836
base = 0;
2837
u_64 = 0;
2838
{
2839
U_64 result1 = base + u_64;
2840
U_64 result2 = u_64 + base;
2841
cout << "I_16," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2842
}
2843
base = 0;
2844
u_64 = 1;
2845
{
2846
U_64 result1 = base + u_64;
2847
U_64 result2 = u_64 + base;
2848
cout << "I_16," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2849
}
2850
base = 0;
2851
u_64 = 2;
2852
{
2853
U_64 result1 = base + u_64;
2854
U_64 result2 = u_64 + base;
2855
cout << "I_16," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2856
}
2857
base = 0x8000;
2858
u_64 = 1;
2859
{
2860
U_64 result1 = base + u_64;
2861
U_64 result2 = u_64 + base;
2862
cout << "I_16," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2863
}
2864
base = 0x7fff;
2865
u_64 = 1;
2866
{
2867
U_64 result1 = base + u_64;
2868
U_64 result2 = u_64 + base;
2869
cout << "I_16," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
2870
}
2871
2872
cout << "SUBSECTION I_16 WITH I_16" << endl;
2873
base = 0;
2874
i_16 = 0;
2875
{
2876
I_16 result1 = base + i_16;
2877
I_16 result2 = i_16 + base;
2878
cout << "I_16," << hex << base << ",add,I_16," << hex << i_16 << ",I_16," << hex << result1 << "," << hex << result2 << endl;
2879
}
2880
base = 0;
2881
i_16 = 1;
2882
{
2883
I_16 result1 = base + i_16;
2884
I_16 result2 = i_16 + base;
2885
cout << "I_16," << hex << base << ",add,I_16," << hex << i_16 << ",I_16," << hex << result1 << "," << hex << result2 << endl;
2886
}
2887
base = 0;
2888
i_16 = 2;
2889
{
2890
I_16 result1 = base + i_16;
2891
I_16 result2 = i_16 + base;
2892
cout << "I_16," << hex << base << ",add,I_16," << hex << i_16 << ",I_16," << hex << result1 << "," << hex << result2 << endl;
2893
}
2894
base = 0;
2895
i_16 = -1;
2896
{
2897
I_16 result1 = base + i_16;
2898
I_16 result2 = i_16 + base;
2899
cout << "I_16," << hex << base << ",add,I_16," << hex << i_16 << ",I_16," << hex << result1 << "," << hex << result2 << endl;
2900
}
2901
base = 0x8000;
2902
i_16 = 1;
2903
{
2904
I_16 result1 = base + i_16;
2905
I_16 result2 = i_16 + base;
2906
cout << "I_16," << hex << base << ",add,I_16," << hex << i_16 << ",I_16," << hex << result1 << "," << hex << result2 << endl;
2907
}
2908
base = 0x8000;
2909
i_16 = -1;
2910
{
2911
I_16 result1 = base + i_16;
2912
I_16 result2 = i_16 + base;
2913
cout << "I_16," << hex << base << ",add,I_16," << hex << i_16 << ",I_16," << hex << result1 << "," << hex << result2 << endl;
2914
}
2915
base = 0x7fff;
2916
i_16 = 1;
2917
{
2918
I_16 result1 = base + i_16;
2919
I_16 result2 = i_16 + base;
2920
cout << "I_16," << hex << base << ",add,I_16," << hex << i_16 << ",I_16," << hex << result1 << "," << hex << result2 << endl;
2921
}
2922
base = 0x7fff;
2923
i_16 = -1;
2924
{
2925
I_16 result1 = base + i_16;
2926
I_16 result2 = i_16 + base;
2927
cout << "I_16," << hex << base << ",add,I_16," << hex << i_16 << ",I_16," << hex << result1 << "," << hex << result2 << endl;
2928
}
2929
2930
cout << "SUBSECTION I_16 WITH I_32" << endl;
2931
base = 0;
2932
i_32 = 0;
2933
{
2934
I_32 result1 = base + i_32;
2935
I_32 result2 = i_32 + base;
2936
cout << "I_16," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
2937
}
2938
base = 0;
2939
i_32 = 1;
2940
{
2941
I_32 result1 = base + i_32;
2942
I_32 result2 = i_32 + base;
2943
cout << "I_16," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
2944
}
2945
base = 0;
2946
i_32 = 2;
2947
{
2948
I_32 result1 = base + i_32;
2949
I_32 result2 = i_32 + base;
2950
cout << "I_16," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
2951
}
2952
base = 0;
2953
i_32 = -1;
2954
{
2955
I_32 result1 = base + i_32;
2956
I_32 result2 = i_32 + base;
2957
cout << "I_16," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
2958
}
2959
base = 0x8000;
2960
i_32 = 1;
2961
{
2962
I_32 result1 = base + i_32;
2963
I_32 result2 = i_32 + base;
2964
cout << "I_16," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
2965
}
2966
base = 0x8000;
2967
i_32 = -1;
2968
{
2969
I_32 result1 = base + i_32;
2970
I_32 result2 = i_32 + base;
2971
cout << "I_16," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
2972
}
2973
base = 0x7fff;
2974
i_32 = 1;
2975
{
2976
I_32 result1 = base + i_32;
2977
I_32 result2 = i_32 + base;
2978
cout << "I_16," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
2979
}
2980
base = 0x7fff;
2981
i_32 = -1;
2982
{
2983
I_32 result1 = base + i_32;
2984
I_32 result2 = i_32 + base;
2985
cout << "I_16," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
2986
}
2987
2988
cout << "SUBSECTION I_16 WITH I_64" << endl;
2989
base = 0;
2990
i_64 = 0;
2991
{
2992
I_64 result1 = base + i_64;
2993
I_64 result2 = i_64 + base;
2994
cout << "I_16," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
2995
}
2996
base = 0;
2997
i_64 = 1;
2998
{
2999
I_64 result1 = base + i_64;
3000
I_64 result2 = i_64 + base;
3001
cout << "I_16," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3002
}
3003
base = 0;
3004
i_64 = 2;
3005
{
3006
I_64 result1 = base + i_64;
3007
I_64 result2 = i_64 + base;
3008
cout << "I_16," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3009
}
3010
base = 0;
3011
i_64 = -1;
3012
{
3013
I_64 result1 = base + i_64;
3014
I_64 result2 = i_64 + base;
3015
cout << "I_16," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3016
}
3017
base = 0x8000;
3018
i_64 = 1;
3019
{
3020
I_64 result1 = base + i_64;
3021
I_64 result2 = i_64 + base;
3022
cout << "I_16," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3023
}
3024
base = 0x8000;
3025
i_64 = -1;
3026
{
3027
I_64 result1 = base + i_64;
3028
I_64 result2 = i_64 + base;
3029
cout << "I_16," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3030
}
3031
base = 0x7fff;
3032
i_64 = 1;
3033
{
3034
I_64 result1 = base + i_64;
3035
I_64 result2 = i_64 + base;
3036
cout << "I_16," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3037
}
3038
base = 0x7fff;
3039
i_64 = -1;
3040
{
3041
I_64 result1 = base + i_64;
3042
I_64 result2 = i_64 + base;
3043
cout << "I_16," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3044
}
3045
3046
cout << "SUBSECTION I_16 WITH UDATA" << endl;
3047
base = 0;
3048
udata = 0;
3049
{
3050
UDATA result1 = base + udata;
3051
UDATA result2 = udata + base;
3052
cout << "I_16," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
3053
}
3054
base = 0;
3055
udata = 1;
3056
{
3057
UDATA result1 = base + udata;
3058
UDATA result2 = udata + base;
3059
cout << "I_16," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
3060
}
3061
base = 0;
3062
udata = 2;
3063
{
3064
UDATA result1 = base + udata;
3065
UDATA result2 = udata + base;
3066
cout << "I_16," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
3067
}
3068
base = 0x8000;
3069
udata = 1;
3070
{
3071
UDATA result1 = base + udata;
3072
UDATA result2 = udata + base;
3073
cout << "I_16," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
3074
}
3075
base = 0x7fff;
3076
udata = 1;
3077
{
3078
UDATA result1 = base + udata;
3079
UDATA result2 = udata + base;
3080
cout << "I_16," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
3081
}
3082
3083
cout << "SUBSECTION I_16 WITH IDATA" << endl;
3084
base = 0;
3085
idata = 0;
3086
{
3087
IDATA result1 = base + idata;
3088
IDATA result2 = idata + base;
3089
cout << "I_16," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3090
}
3091
base = 0;
3092
idata = 1;
3093
{
3094
IDATA result1 = base + idata;
3095
IDATA result2 = idata + base;
3096
cout << "I_16," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3097
}
3098
base = 0;
3099
idata = 2;
3100
{
3101
IDATA result1 = base + idata;
3102
IDATA result2 = idata + base;
3103
cout << "I_16," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3104
}
3105
base = 0;
3106
idata = -1;
3107
{
3108
IDATA result1 = base + idata;
3109
IDATA result2 = idata + base;
3110
cout << "I_16," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3111
}
3112
base = 0x8000;
3113
idata = 1;
3114
{
3115
IDATA result1 = base + idata;
3116
IDATA result2 = idata + base;
3117
cout << "I_16," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3118
}
3119
base = 0x8000;
3120
idata = -1;
3121
{
3122
IDATA result1 = base + idata;
3123
IDATA result2 = idata + base;
3124
cout << "I_16," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3125
}
3126
base = 0x7fff;
3127
idata = 1;
3128
{
3129
IDATA result1 = base + idata;
3130
IDATA result2 = idata + base;
3131
cout << "I_16," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3132
}
3133
base = 0x7fff;
3134
idata = -1;
3135
{
3136
IDATA result1 = base + idata;
3137
IDATA result2 = idata + base;
3138
cout << "I_16," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3139
}
3140
3141
}
3142
3143
static void testsubI_16(void)
3144
{
3145
//Locals
3146
I_16 base;
3147
U_8 u_8;
3148
U_16 u_16;
3149
U_32 u_32;
3150
U_64 u_64;
3151
I_16 i_16;
3152
I_32 i_32;
3153
I_64 i_64;
3154
UDATA udata;
3155
IDATA idata;
3156
3157
cout << "START SECTION I_16 sub" << endl;
3158
3159
cout << "SUBSECTION I_16 WITH U_8" << endl;
3160
base = 0;
3161
u_8 = 0;
3162
{
3163
I_32 result1 = base - u_8;
3164
I_32 result2 = u_8 - base;
3165
cout << "I_16," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3166
}
3167
base = 0;
3168
u_8 = 1;
3169
{
3170
I_32 result1 = base - u_8;
3171
I_32 result2 = u_8 - base;
3172
cout << "I_16," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3173
}
3174
base = 0;
3175
u_8 = 2;
3176
{
3177
I_32 result1 = base - u_8;
3178
I_32 result2 = u_8 - base;
3179
cout << "I_16," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3180
}
3181
base = 0x8000;
3182
u_8 = 1;
3183
{
3184
I_32 result1 = base - u_8;
3185
I_32 result2 = u_8 - base;
3186
cout << "I_16," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3187
}
3188
base = 0x7fff;
3189
u_8 = 1;
3190
{
3191
I_32 result1 = base - u_8;
3192
I_32 result2 = u_8 - base;
3193
cout << "I_16," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3194
}
3195
3196
cout << "SUBSECTION I_16 WITH U_16" << endl;
3197
base = 0;
3198
u_16 = 0;
3199
{
3200
I_32 result1 = base - u_16;
3201
I_32 result2 = u_16 - base;
3202
cout << "I_16," << hex << base << ",sub,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3203
}
3204
base = 0;
3205
u_16 = 1;
3206
{
3207
I_32 result1 = base - u_16;
3208
I_32 result2 = u_16 - base;
3209
cout << "I_16," << hex << base << ",sub,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3210
}
3211
base = 0;
3212
u_16 = 2;
3213
{
3214
I_32 result1 = base - u_16;
3215
I_32 result2 = u_16 - base;
3216
cout << "I_16," << hex << base << ",sub,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3217
}
3218
base = 0x8000;
3219
u_16 = 1;
3220
{
3221
I_32 result1 = base - u_16;
3222
I_32 result2 = u_16 - base;
3223
cout << "I_16," << hex << base << ",sub,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3224
}
3225
base = 0x7fff;
3226
u_16 = 1;
3227
{
3228
I_32 result1 = base - u_16;
3229
I_32 result2 = u_16 - base;
3230
cout << "I_16," << hex << base << ",sub,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3231
}
3232
3233
cout << "SUBSECTION I_16 WITH U_32" << endl;
3234
base = 0;
3235
u_32 = 0;
3236
{
3237
U_32 result1 = base - u_32;
3238
U_32 result2 = u_32 - base;
3239
cout << "I_16," << hex << base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
3240
}
3241
base = 0;
3242
u_32 = 1;
3243
{
3244
U_32 result1 = base - u_32;
3245
U_32 result2 = u_32 - base;
3246
cout << "I_16," << hex << base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
3247
}
3248
base = 0;
3249
u_32 = 2;
3250
{
3251
U_32 result1 = base - u_32;
3252
U_32 result2 = u_32 - base;
3253
cout << "I_16," << hex << base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
3254
}
3255
base = 0x8000;
3256
u_32 = 1;
3257
{
3258
U_32 result1 = base - u_32;
3259
U_32 result2 = u_32 - base;
3260
cout << "I_16," << hex << base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
3261
}
3262
base = 0x7fff;
3263
u_32 = 1;
3264
{
3265
U_32 result1 = base - u_32;
3266
U_32 result2 = u_32 - base;
3267
cout << "I_16," << hex << base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
3268
}
3269
3270
cout << "SUBSECTION I_16 WITH U_64" << endl;
3271
base = 0;
3272
u_64 = 0;
3273
{
3274
U_64 result1 = base - u_64;
3275
U_64 result2 = u_64 - base;
3276
cout << "I_16," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
3277
}
3278
base = 0;
3279
u_64 = 1;
3280
{
3281
U_64 result1 = base - u_64;
3282
U_64 result2 = u_64 - base;
3283
cout << "I_16," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
3284
}
3285
base = 0;
3286
u_64 = 2;
3287
{
3288
U_64 result1 = base - u_64;
3289
U_64 result2 = u_64 - base;
3290
cout << "I_16," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
3291
}
3292
base = 0x8000;
3293
u_64 = 1;
3294
{
3295
U_64 result1 = base - u_64;
3296
U_64 result2 = u_64 - base;
3297
cout << "I_16," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
3298
}
3299
base = 0x7fff;
3300
u_64 = 1;
3301
{
3302
U_64 result1 = base - u_64;
3303
U_64 result2 = u_64 - base;
3304
cout << "I_16," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
3305
}
3306
3307
cout << "SUBSECTION I_16 WITH I_16" << endl;
3308
base = 0;
3309
i_16 = 0;
3310
{
3311
I_16 result1 = base - i_16;
3312
I_16 result2 = i_16 - base;
3313
cout << "I_16," << hex << base << ",sub,I_16," << hex << i_16 << ",I_16," << hex << result1 << "," << hex << result2 << endl;
3314
}
3315
base = 0;
3316
i_16 = 1;
3317
{
3318
I_16 result1 = base - i_16;
3319
I_16 result2 = i_16 - base;
3320
cout << "I_16," << hex << base << ",sub,I_16," << hex << i_16 << ",I_16," << hex << result1 << "," << hex << result2 << endl;
3321
}
3322
base = 0;
3323
i_16 = 2;
3324
{
3325
I_16 result1 = base - i_16;
3326
I_16 result2 = i_16 - base;
3327
cout << "I_16," << hex << base << ",sub,I_16," << hex << i_16 << ",I_16," << hex << result1 << "," << hex << result2 << endl;
3328
}
3329
base = 0;
3330
i_16 = -1;
3331
{
3332
I_16 result1 = base - i_16;
3333
I_16 result2 = i_16 - base;
3334
cout << "I_16," << hex << base << ",sub,I_16," << hex << i_16 << ",I_16," << hex << result1 << "," << hex << result2 << endl;
3335
}
3336
base = 0x8000;
3337
i_16 = 1;
3338
{
3339
I_16 result1 = base - i_16;
3340
I_16 result2 = i_16 - base;
3341
cout << "I_16," << hex << base << ",sub,I_16," << hex << i_16 << ",I_16," << hex << result1 << "," << hex << result2 << endl;
3342
}
3343
base = 0x8000;
3344
i_16 = -1;
3345
{
3346
I_16 result1 = base - i_16;
3347
I_16 result2 = i_16 - base;
3348
cout << "I_16," << hex << base << ",sub,I_16," << hex << i_16 << ",I_16," << hex << result1 << "," << hex << result2 << endl;
3349
}
3350
base = 0x7fff;
3351
i_16 = 1;
3352
{
3353
I_16 result1 = base - i_16;
3354
I_16 result2 = i_16 - base;
3355
cout << "I_16," << hex << base << ",sub,I_16," << hex << i_16 << ",I_16," << hex << result1 << "," << hex << result2 << endl;
3356
}
3357
base = 0x7fff;
3358
i_16 = -1;
3359
{
3360
I_16 result1 = base - i_16;
3361
I_16 result2 = i_16 - base;
3362
cout << "I_16," << hex << base << ",sub,I_16," << hex << i_16 << ",I_16," << hex << result1 << "," << hex << result2 << endl;
3363
}
3364
3365
cout << "SUBSECTION I_16 WITH I_32" << endl;
3366
base = 0;
3367
i_32 = 0;
3368
{
3369
I_32 result1 = base - i_32;
3370
I_32 result2 = i_32 - base;
3371
cout << "I_16," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3372
}
3373
base = 0;
3374
i_32 = 1;
3375
{
3376
I_32 result1 = base - i_32;
3377
I_32 result2 = i_32 - base;
3378
cout << "I_16," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3379
}
3380
base = 0;
3381
i_32 = 2;
3382
{
3383
I_32 result1 = base - i_32;
3384
I_32 result2 = i_32 - base;
3385
cout << "I_16," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3386
}
3387
base = 0;
3388
i_32 = -1;
3389
{
3390
I_32 result1 = base - i_32;
3391
I_32 result2 = i_32 - base;
3392
cout << "I_16," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3393
}
3394
base = 0x8000;
3395
i_32 = 1;
3396
{
3397
I_32 result1 = base - i_32;
3398
I_32 result2 = i_32 - base;
3399
cout << "I_16," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3400
}
3401
base = 0x8000;
3402
i_32 = -1;
3403
{
3404
I_32 result1 = base - i_32;
3405
I_32 result2 = i_32 - base;
3406
cout << "I_16," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3407
}
3408
base = 0x7fff;
3409
i_32 = 1;
3410
{
3411
I_32 result1 = base - i_32;
3412
I_32 result2 = i_32 - base;
3413
cout << "I_16," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3414
}
3415
base = 0x7fff;
3416
i_32 = -1;
3417
{
3418
I_32 result1 = base - i_32;
3419
I_32 result2 = i_32 - base;
3420
cout << "I_16," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3421
}
3422
3423
cout << "SUBSECTION I_16 WITH I_64" << endl;
3424
base = 0;
3425
i_64 = 0;
3426
{
3427
I_64 result1 = base - i_64;
3428
I_64 result2 = i_64 - base;
3429
cout << "I_16," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3430
}
3431
base = 0;
3432
i_64 = 1;
3433
{
3434
I_64 result1 = base - i_64;
3435
I_64 result2 = i_64 - base;
3436
cout << "I_16," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3437
}
3438
base = 0;
3439
i_64 = 2;
3440
{
3441
I_64 result1 = base - i_64;
3442
I_64 result2 = i_64 - base;
3443
cout << "I_16," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3444
}
3445
base = 0;
3446
i_64 = -1;
3447
{
3448
I_64 result1 = base - i_64;
3449
I_64 result2 = i_64 - base;
3450
cout << "I_16," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3451
}
3452
base = 0x8000;
3453
i_64 = 1;
3454
{
3455
I_64 result1 = base - i_64;
3456
I_64 result2 = i_64 - base;
3457
cout << "I_16," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3458
}
3459
base = 0x8000;
3460
i_64 = -1;
3461
{
3462
I_64 result1 = base - i_64;
3463
I_64 result2 = i_64 - base;
3464
cout << "I_16," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3465
}
3466
base = 0x7fff;
3467
i_64 = 1;
3468
{
3469
I_64 result1 = base - i_64;
3470
I_64 result2 = i_64 - base;
3471
cout << "I_16," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3472
}
3473
base = 0x7fff;
3474
i_64 = -1;
3475
{
3476
I_64 result1 = base - i_64;
3477
I_64 result2 = i_64 - base;
3478
cout << "I_16," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3479
}
3480
3481
cout << "SUBSECTION I_16 WITH UDATA" << endl;
3482
base = 0;
3483
udata = 0;
3484
{
3485
UDATA result1 = base - udata;
3486
UDATA result2 = udata - base;
3487
cout << "I_16," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
3488
}
3489
base = 0;
3490
udata = 1;
3491
{
3492
UDATA result1 = base - udata;
3493
UDATA result2 = udata - base;
3494
cout << "I_16," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
3495
}
3496
base = 0;
3497
udata = 2;
3498
{
3499
UDATA result1 = base - udata;
3500
UDATA result2 = udata - base;
3501
cout << "I_16," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
3502
}
3503
base = 0x8000;
3504
udata = 1;
3505
{
3506
UDATA result1 = base - udata;
3507
UDATA result2 = udata - base;
3508
cout << "I_16," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
3509
}
3510
base = 0x7fff;
3511
udata = 1;
3512
{
3513
UDATA result1 = base - udata;
3514
UDATA result2 = udata - base;
3515
cout << "I_16," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
3516
}
3517
3518
cout << "SUBSECTION I_16 WITH IDATA" << endl;
3519
base = 0;
3520
idata = 0;
3521
{
3522
IDATA result1 = base - idata;
3523
IDATA result2 = idata - base;
3524
cout << "I_16," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3525
}
3526
base = 0;
3527
idata = 1;
3528
{
3529
IDATA result1 = base - idata;
3530
IDATA result2 = idata - base;
3531
cout << "I_16," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3532
}
3533
base = 0;
3534
idata = 2;
3535
{
3536
IDATA result1 = base - idata;
3537
IDATA result2 = idata - base;
3538
cout << "I_16," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3539
}
3540
base = 0;
3541
idata = -1;
3542
{
3543
IDATA result1 = base - idata;
3544
IDATA result2 = idata - base;
3545
cout << "I_16," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3546
}
3547
base = 0x8000;
3548
idata = 1;
3549
{
3550
IDATA result1 = base - idata;
3551
IDATA result2 = idata - base;
3552
cout << "I_16," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3553
}
3554
base = 0x8000;
3555
idata = -1;
3556
{
3557
IDATA result1 = base - idata;
3558
IDATA result2 = idata - base;
3559
cout << "I_16," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3560
}
3561
base = 0x7fff;
3562
idata = 1;
3563
{
3564
IDATA result1 = base - idata;
3565
IDATA result2 = idata - base;
3566
cout << "I_16," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3567
}
3568
base = 0x7fff;
3569
idata = -1;
3570
{
3571
IDATA result1 = base - idata;
3572
IDATA result2 = idata - base;
3573
cout << "I_16," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3574
}
3575
3576
}
3577
3578
static void testaddI_32(void)
3579
{
3580
//Locals
3581
I_32 base;
3582
U_8 u_8;
3583
U_16 u_16;
3584
U_32 u_32;
3585
U_64 u_64;
3586
I_16 i_16;
3587
I_32 i_32;
3588
I_64 i_64;
3589
UDATA udata;
3590
IDATA idata;
3591
3592
cout << "START SECTION I_32 add" << endl;
3593
3594
cout << "SUBSECTION I_32 WITH U_8" << endl;
3595
base = 0;
3596
u_8 = 0;
3597
{
3598
I_32 result1 = base + u_8;
3599
I_32 result2 = u_8 + base;
3600
cout << "I_32," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3601
}
3602
base = 0;
3603
u_8 = 1;
3604
{
3605
I_32 result1 = base + u_8;
3606
I_32 result2 = u_8 + base;
3607
cout << "I_32," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3608
}
3609
base = 0;
3610
u_8 = 2;
3611
{
3612
I_32 result1 = base + u_8;
3613
I_32 result2 = u_8 + base;
3614
cout << "I_32," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3615
}
3616
base = 0x80000000;
3617
u_8 = 1;
3618
{
3619
I_32 result1 = base + u_8;
3620
I_32 result2 = u_8 + base;
3621
cout << "I_32," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3622
}
3623
base = 0x7fffffff;
3624
u_8 = 1;
3625
{
3626
I_32 result1 = base + u_8;
3627
I_32 result2 = u_8 + base;
3628
cout << "I_32," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3629
}
3630
3631
cout << "SUBSECTION I_32 WITH U_16" << endl;
3632
base = 0;
3633
u_16 = 0;
3634
{
3635
I_32 result1 = base + u_16;
3636
I_32 result2 = u_16 + base;
3637
cout << "I_32," << hex << base << ",add,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3638
}
3639
base = 0;
3640
u_16 = 1;
3641
{
3642
I_32 result1 = base + u_16;
3643
I_32 result2 = u_16 + base;
3644
cout << "I_32," << hex << base << ",add,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3645
}
3646
base = 0;
3647
u_16 = 2;
3648
{
3649
I_32 result1 = base + u_16;
3650
I_32 result2 = u_16 + base;
3651
cout << "I_32," << hex << base << ",add,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3652
}
3653
base = 0x80000000;
3654
u_16 = 1;
3655
{
3656
I_32 result1 = base + u_16;
3657
I_32 result2 = u_16 + base;
3658
cout << "I_32," << hex << base << ",add,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3659
}
3660
base = 0x7fffffff;
3661
u_16 = 1;
3662
{
3663
I_32 result1 = base + u_16;
3664
I_32 result2 = u_16 + base;
3665
cout << "I_32," << hex << base << ",add,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3666
}
3667
3668
cout << "SUBSECTION I_32 WITH U_32" << endl;
3669
base = 0;
3670
u_32 = 0;
3671
{
3672
U_32 result1 = base + u_32;
3673
U_32 result2 = u_32 + base;
3674
cout << "I_32," << hex << base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
3675
}
3676
base = 0;
3677
u_32 = 1;
3678
{
3679
U_32 result1 = base + u_32;
3680
U_32 result2 = u_32 + base;
3681
cout << "I_32," << hex << base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
3682
}
3683
base = 0;
3684
u_32 = 2;
3685
{
3686
U_32 result1 = base + u_32;
3687
U_32 result2 = u_32 + base;
3688
cout << "I_32," << hex << base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
3689
}
3690
base = 0x80000000;
3691
u_32 = 1;
3692
{
3693
U_32 result1 = base + u_32;
3694
U_32 result2 = u_32 + base;
3695
cout << "I_32," << hex << base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
3696
}
3697
base = 0x7fffffff;
3698
u_32 = 1;
3699
{
3700
U_32 result1 = base + u_32;
3701
U_32 result2 = u_32 + base;
3702
cout << "I_32," << hex << base << ",add,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
3703
}
3704
3705
cout << "SUBSECTION I_32 WITH U_64" << endl;
3706
base = 0;
3707
u_64 = 0;
3708
{
3709
U_64 result1 = base + u_64;
3710
U_64 result2 = u_64 + base;
3711
cout << "I_32," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
3712
}
3713
base = 0;
3714
u_64 = 1;
3715
{
3716
U_64 result1 = base + u_64;
3717
U_64 result2 = u_64 + base;
3718
cout << "I_32," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
3719
}
3720
base = 0;
3721
u_64 = 2;
3722
{
3723
U_64 result1 = base + u_64;
3724
U_64 result2 = u_64 + base;
3725
cout << "I_32," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
3726
}
3727
base = 0x80000000;
3728
u_64 = 1;
3729
{
3730
U_64 result1 = base + u_64;
3731
U_64 result2 = u_64 + base;
3732
cout << "I_32," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
3733
}
3734
base = 0x7fffffff;
3735
u_64 = 1;
3736
{
3737
U_64 result1 = base + u_64;
3738
U_64 result2 = u_64 + base;
3739
cout << "I_32," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
3740
}
3741
3742
cout << "SUBSECTION I_32 WITH I_16" << endl;
3743
base = 0;
3744
i_16 = 0;
3745
{
3746
I_32 result1 = base + i_16;
3747
I_32 result2 = i_16 + base;
3748
cout << "I_32," << hex << base << ",add,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3749
}
3750
base = 0;
3751
i_16 = 1;
3752
{
3753
I_32 result1 = base + i_16;
3754
I_32 result2 = i_16 + base;
3755
cout << "I_32," << hex << base << ",add,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3756
}
3757
base = 0;
3758
i_16 = 2;
3759
{
3760
I_32 result1 = base + i_16;
3761
I_32 result2 = i_16 + base;
3762
cout << "I_32," << hex << base << ",add,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3763
}
3764
base = 0;
3765
i_16 = -1;
3766
{
3767
I_32 result1 = base + i_16;
3768
I_32 result2 = i_16 + base;
3769
cout << "I_32," << hex << base << ",add,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3770
}
3771
base = 0x80000000;
3772
i_16 = 1;
3773
{
3774
I_32 result1 = base + i_16;
3775
I_32 result2 = i_16 + base;
3776
cout << "I_32," << hex << base << ",add,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3777
}
3778
base = 0x80000000;
3779
i_16 = -1;
3780
{
3781
I_32 result1 = base + i_16;
3782
I_32 result2 = i_16 + base;
3783
cout << "I_32," << hex << base << ",add,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3784
}
3785
base = 0x7fffffff;
3786
i_16 = 1;
3787
{
3788
I_32 result1 = base + i_16;
3789
I_32 result2 = i_16 + base;
3790
cout << "I_32," << hex << base << ",add,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3791
}
3792
base = 0x7fffffff;
3793
i_16 = -1;
3794
{
3795
I_32 result1 = base + i_16;
3796
I_32 result2 = i_16 + base;
3797
cout << "I_32," << hex << base << ",add,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3798
}
3799
3800
cout << "SUBSECTION I_32 WITH I_32" << endl;
3801
base = 0;
3802
i_32 = 0;
3803
{
3804
I_32 result1 = base + i_32;
3805
I_32 result2 = i_32 + base;
3806
cout << "I_32," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3807
}
3808
base = 0;
3809
i_32 = 1;
3810
{
3811
I_32 result1 = base + i_32;
3812
I_32 result2 = i_32 + base;
3813
cout << "I_32," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3814
}
3815
base = 0;
3816
i_32 = 2;
3817
{
3818
I_32 result1 = base + i_32;
3819
I_32 result2 = i_32 + base;
3820
cout << "I_32," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3821
}
3822
base = 0;
3823
i_32 = -1;
3824
{
3825
I_32 result1 = base + i_32;
3826
I_32 result2 = i_32 + base;
3827
cout << "I_32," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3828
}
3829
base = 0x80000000;
3830
i_32 = 1;
3831
{
3832
I_32 result1 = base + i_32;
3833
I_32 result2 = i_32 + base;
3834
cout << "I_32," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3835
}
3836
base = 0x80000000;
3837
i_32 = -1;
3838
{
3839
I_32 result1 = base + i_32;
3840
I_32 result2 = i_32 + base;
3841
cout << "I_32," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3842
}
3843
base = 0x7fffffff;
3844
i_32 = 1;
3845
{
3846
I_32 result1 = base + i_32;
3847
I_32 result2 = i_32 + base;
3848
cout << "I_32," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3849
}
3850
base = 0x7fffffff;
3851
i_32 = -1;
3852
{
3853
I_32 result1 = base + i_32;
3854
I_32 result2 = i_32 + base;
3855
cout << "I_32," << hex << base << ",add,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
3856
}
3857
3858
cout << "SUBSECTION I_32 WITH I_64" << endl;
3859
base = 0;
3860
i_64 = 0;
3861
{
3862
I_64 result1 = base + i_64;
3863
I_64 result2 = i_64 + base;
3864
cout << "I_32," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3865
}
3866
base = 0;
3867
i_64 = 1;
3868
{
3869
I_64 result1 = base + i_64;
3870
I_64 result2 = i_64 + base;
3871
cout << "I_32," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3872
}
3873
base = 0;
3874
i_64 = 2;
3875
{
3876
I_64 result1 = base + i_64;
3877
I_64 result2 = i_64 + base;
3878
cout << "I_32," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3879
}
3880
base = 0;
3881
i_64 = -1;
3882
{
3883
I_64 result1 = base + i_64;
3884
I_64 result2 = i_64 + base;
3885
cout << "I_32," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3886
}
3887
base = 0x80000000;
3888
i_64 = 1;
3889
{
3890
I_64 result1 = base + i_64;
3891
I_64 result2 = i_64 + base;
3892
cout << "I_32," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3893
}
3894
base = 0x80000000;
3895
i_64 = -1;
3896
{
3897
I_64 result1 = base + i_64;
3898
I_64 result2 = i_64 + base;
3899
cout << "I_32," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3900
}
3901
base = 0x7fffffff;
3902
i_64 = 1;
3903
{
3904
I_64 result1 = base + i_64;
3905
I_64 result2 = i_64 + base;
3906
cout << "I_32," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3907
}
3908
base = 0x7fffffff;
3909
i_64 = -1;
3910
{
3911
I_64 result1 = base + i_64;
3912
I_64 result2 = i_64 + base;
3913
cout << "I_32," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
3914
}
3915
3916
cout << "SUBSECTION I_32 WITH UDATA" << endl;
3917
base = 0;
3918
udata = 0;
3919
{
3920
UDATA result1 = base + udata;
3921
UDATA result2 = udata + base;
3922
cout << "I_32," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
3923
}
3924
base = 0;
3925
udata = 1;
3926
{
3927
UDATA result1 = base + udata;
3928
UDATA result2 = udata + base;
3929
cout << "I_32," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
3930
}
3931
base = 0;
3932
udata = 2;
3933
{
3934
UDATA result1 = base + udata;
3935
UDATA result2 = udata + base;
3936
cout << "I_32," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
3937
}
3938
base = 0x80000000;
3939
udata = 1;
3940
{
3941
UDATA result1 = base + udata;
3942
UDATA result2 = udata + base;
3943
cout << "I_32," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
3944
}
3945
base = 0x7fffffff;
3946
udata = 1;
3947
{
3948
UDATA result1 = base + udata;
3949
UDATA result2 = udata + base;
3950
cout << "I_32," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
3951
}
3952
3953
cout << "SUBSECTION I_32 WITH IDATA" << endl;
3954
base = 0;
3955
idata = 0;
3956
{
3957
IDATA result1 = base + idata;
3958
IDATA result2 = idata + base;
3959
cout << "I_32," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3960
}
3961
base = 0;
3962
idata = 1;
3963
{
3964
IDATA result1 = base + idata;
3965
IDATA result2 = idata + base;
3966
cout << "I_32," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3967
}
3968
base = 0;
3969
idata = 2;
3970
{
3971
IDATA result1 = base + idata;
3972
IDATA result2 = idata + base;
3973
cout << "I_32," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3974
}
3975
base = 0;
3976
idata = -1;
3977
{
3978
IDATA result1 = base + idata;
3979
IDATA result2 = idata + base;
3980
cout << "I_32," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3981
}
3982
base = 0x80000000;
3983
idata = 1;
3984
{
3985
IDATA result1 = base + idata;
3986
IDATA result2 = idata + base;
3987
cout << "I_32," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3988
}
3989
base = 0x80000000;
3990
idata = -1;
3991
{
3992
IDATA result1 = base + idata;
3993
IDATA result2 = idata + base;
3994
cout << "I_32," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
3995
}
3996
base = 0x7fffffff;
3997
idata = 1;
3998
{
3999
IDATA result1 = base + idata;
4000
IDATA result2 = idata + base;
4001
cout << "I_32," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
4002
}
4003
base = 0x7fffffff;
4004
idata = -1;
4005
{
4006
IDATA result1 = base + idata;
4007
IDATA result2 = idata + base;
4008
cout << "I_32," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
4009
}
4010
4011
}
4012
4013
static void testsubI_32(void)
4014
{
4015
//Locals
4016
I_32 base;
4017
U_8 u_8;
4018
U_16 u_16;
4019
U_32 u_32;
4020
U_64 u_64;
4021
I_16 i_16;
4022
I_32 i_32;
4023
I_64 i_64;
4024
UDATA udata;
4025
IDATA idata;
4026
4027
cout << "START SECTION I_32 sub" << endl;
4028
4029
cout << "SUBSECTION I_32 WITH U_8" << endl;
4030
base = 0;
4031
u_8 = 0;
4032
{
4033
I_32 result1 = base - u_8;
4034
I_32 result2 = u_8 - base;
4035
cout << "I_32," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4036
}
4037
base = 0;
4038
u_8 = 1;
4039
{
4040
I_32 result1 = base - u_8;
4041
I_32 result2 = u_8 - base;
4042
cout << "I_32," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4043
}
4044
base = 0;
4045
u_8 = 2;
4046
{
4047
I_32 result1 = base - u_8;
4048
I_32 result2 = u_8 - base;
4049
cout << "I_32," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4050
}
4051
base = 0x80000000;
4052
u_8 = 1;
4053
{
4054
I_32 result1 = base - u_8;
4055
I_32 result2 = u_8 - base;
4056
cout << "I_32," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4057
}
4058
base = 0x7fffffff;
4059
u_8 = 1;
4060
{
4061
I_32 result1 = base - u_8;
4062
I_32 result2 = u_8 - base;
4063
cout << "I_32," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4064
}
4065
4066
cout << "SUBSECTION I_32 WITH U_16" << endl;
4067
base = 0;
4068
u_16 = 0;
4069
{
4070
I_32 result1 = base - u_16;
4071
I_32 result2 = u_16 - base;
4072
cout << "I_32," << hex << base << ",sub,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4073
}
4074
base = 0;
4075
u_16 = 1;
4076
{
4077
I_32 result1 = base - u_16;
4078
I_32 result2 = u_16 - base;
4079
cout << "I_32," << hex << base << ",sub,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4080
}
4081
base = 0;
4082
u_16 = 2;
4083
{
4084
I_32 result1 = base - u_16;
4085
I_32 result2 = u_16 - base;
4086
cout << "I_32," << hex << base << ",sub,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4087
}
4088
base = 0x80000000;
4089
u_16 = 1;
4090
{
4091
I_32 result1 = base - u_16;
4092
I_32 result2 = u_16 - base;
4093
cout << "I_32," << hex << base << ",sub,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4094
}
4095
base = 0x7fffffff;
4096
u_16 = 1;
4097
{
4098
I_32 result1 = base - u_16;
4099
I_32 result2 = u_16 - base;
4100
cout << "I_32," << hex << base << ",sub,U_16," << hex << u_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4101
}
4102
4103
cout << "SUBSECTION I_32 WITH U_32" << endl;
4104
base = 0;
4105
u_32 = 0;
4106
{
4107
U_32 result1 = base - u_32;
4108
U_32 result2 = u_32 - base;
4109
cout << "I_32," << hex << base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
4110
}
4111
base = 0;
4112
u_32 = 1;
4113
{
4114
U_32 result1 = base - u_32;
4115
U_32 result2 = u_32 - base;
4116
cout << "I_32," << hex << base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
4117
}
4118
base = 0;
4119
u_32 = 2;
4120
{
4121
U_32 result1 = base - u_32;
4122
U_32 result2 = u_32 - base;
4123
cout << "I_32," << hex << base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
4124
}
4125
base = 0x80000000;
4126
u_32 = 1;
4127
{
4128
U_32 result1 = base - u_32;
4129
U_32 result2 = u_32 - base;
4130
cout << "I_32," << hex << base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
4131
}
4132
base = 0x7fffffff;
4133
u_32 = 1;
4134
{
4135
U_32 result1 = base - u_32;
4136
U_32 result2 = u_32 - base;
4137
cout << "I_32," << hex << base << ",sub,U_32," << hex << u_32 << ",U_32," << hex << result1 << "," << hex << result2 << endl;
4138
}
4139
4140
cout << "SUBSECTION I_32 WITH U_64" << endl;
4141
base = 0;
4142
u_64 = 0;
4143
{
4144
U_64 result1 = base - u_64;
4145
U_64 result2 = u_64 - base;
4146
cout << "I_32," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
4147
}
4148
base = 0;
4149
u_64 = 1;
4150
{
4151
U_64 result1 = base - u_64;
4152
U_64 result2 = u_64 - base;
4153
cout << "I_32," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
4154
}
4155
base = 0;
4156
u_64 = 2;
4157
{
4158
U_64 result1 = base - u_64;
4159
U_64 result2 = u_64 - base;
4160
cout << "I_32," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
4161
}
4162
base = 0x80000000;
4163
u_64 = 1;
4164
{
4165
U_64 result1 = base - u_64;
4166
U_64 result2 = u_64 - base;
4167
cout << "I_32," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
4168
}
4169
base = 0x7fffffff;
4170
u_64 = 1;
4171
{
4172
U_64 result1 = base - u_64;
4173
U_64 result2 = u_64 - base;
4174
cout << "I_32," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
4175
}
4176
4177
cout << "SUBSECTION I_32 WITH I_16" << endl;
4178
base = 0;
4179
i_16 = 0;
4180
{
4181
I_32 result1 = base - i_16;
4182
I_32 result2 = i_16 - base;
4183
cout << "I_32," << hex << base << ",sub,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4184
}
4185
base = 0;
4186
i_16 = 1;
4187
{
4188
I_32 result1 = base - i_16;
4189
I_32 result2 = i_16 - base;
4190
cout << "I_32," << hex << base << ",sub,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4191
}
4192
base = 0;
4193
i_16 = 2;
4194
{
4195
I_32 result1 = base - i_16;
4196
I_32 result2 = i_16 - base;
4197
cout << "I_32," << hex << base << ",sub,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4198
}
4199
base = 0;
4200
i_16 = -1;
4201
{
4202
I_32 result1 = base - i_16;
4203
I_32 result2 = i_16 - base;
4204
cout << "I_32," << hex << base << ",sub,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4205
}
4206
base = 0x80000000;
4207
i_16 = 1;
4208
{
4209
I_32 result1 = base - i_16;
4210
I_32 result2 = i_16 - base;
4211
cout << "I_32," << hex << base << ",sub,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4212
}
4213
base = 0x80000000;
4214
i_16 = -1;
4215
{
4216
I_32 result1 = base - i_16;
4217
I_32 result2 = i_16 - base;
4218
cout << "I_32," << hex << base << ",sub,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4219
}
4220
base = 0x7fffffff;
4221
i_16 = 1;
4222
{
4223
I_32 result1 = base - i_16;
4224
I_32 result2 = i_16 - base;
4225
cout << "I_32," << hex << base << ",sub,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4226
}
4227
base = 0x7fffffff;
4228
i_16 = -1;
4229
{
4230
I_32 result1 = base - i_16;
4231
I_32 result2 = i_16 - base;
4232
cout << "I_32," << hex << base << ",sub,I_16," << hex << i_16 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4233
}
4234
4235
cout << "SUBSECTION I_32 WITH I_32" << endl;
4236
base = 0;
4237
i_32 = 0;
4238
{
4239
I_32 result1 = base - i_32;
4240
I_32 result2 = i_32 - base;
4241
cout << "I_32," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4242
}
4243
base = 0;
4244
i_32 = 1;
4245
{
4246
I_32 result1 = base - i_32;
4247
I_32 result2 = i_32 - base;
4248
cout << "I_32," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4249
}
4250
base = 0;
4251
i_32 = 2;
4252
{
4253
I_32 result1 = base - i_32;
4254
I_32 result2 = i_32 - base;
4255
cout << "I_32," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4256
}
4257
base = 0;
4258
i_32 = -1;
4259
{
4260
I_32 result1 = base - i_32;
4261
I_32 result2 = i_32 - base;
4262
cout << "I_32," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4263
}
4264
base = 0x80000000;
4265
i_32 = 1;
4266
{
4267
I_32 result1 = base - i_32;
4268
I_32 result2 = i_32 - base;
4269
cout << "I_32," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4270
}
4271
base = 0x80000000;
4272
i_32 = -1;
4273
{
4274
I_32 result1 = base - i_32;
4275
I_32 result2 = i_32 - base;
4276
cout << "I_32," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4277
}
4278
base = 0x7fffffff;
4279
i_32 = 1;
4280
{
4281
I_32 result1 = base - i_32;
4282
I_32 result2 = i_32 - base;
4283
cout << "I_32," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4284
}
4285
base = 0x7fffffff;
4286
i_32 = -1;
4287
{
4288
I_32 result1 = base - i_32;
4289
I_32 result2 = i_32 - base;
4290
cout << "I_32," << hex << base << ",sub,I_32," << hex << i_32 << ",I_32," << hex << result1 << "," << hex << result2 << endl;
4291
}
4292
4293
cout << "SUBSECTION I_32 WITH I_64" << endl;
4294
base = 0;
4295
i_64 = 0;
4296
{
4297
I_64 result1 = base - i_64;
4298
I_64 result2 = i_64 - base;
4299
cout << "I_32," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4300
}
4301
base = 0;
4302
i_64 = 1;
4303
{
4304
I_64 result1 = base - i_64;
4305
I_64 result2 = i_64 - base;
4306
cout << "I_32," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4307
}
4308
base = 0;
4309
i_64 = 2;
4310
{
4311
I_64 result1 = base - i_64;
4312
I_64 result2 = i_64 - base;
4313
cout << "I_32," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4314
}
4315
base = 0;
4316
i_64 = -1;
4317
{
4318
I_64 result1 = base - i_64;
4319
I_64 result2 = i_64 - base;
4320
cout << "I_32," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4321
}
4322
base = 0x80000000;
4323
i_64 = 1;
4324
{
4325
I_64 result1 = base - i_64;
4326
I_64 result2 = i_64 - base;
4327
cout << "I_32," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4328
}
4329
base = 0x80000000;
4330
i_64 = -1;
4331
{
4332
I_64 result1 = base - i_64;
4333
I_64 result2 = i_64 - base;
4334
cout << "I_32," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4335
}
4336
base = 0x7fffffff;
4337
i_64 = 1;
4338
{
4339
I_64 result1 = base - i_64;
4340
I_64 result2 = i_64 - base;
4341
cout << "I_32," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4342
}
4343
base = 0x7fffffff;
4344
i_64 = -1;
4345
{
4346
I_64 result1 = base - i_64;
4347
I_64 result2 = i_64 - base;
4348
cout << "I_32," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4349
}
4350
4351
cout << "SUBSECTION I_32 WITH UDATA" << endl;
4352
base = 0;
4353
udata = 0;
4354
{
4355
UDATA result1 = base - udata;
4356
UDATA result2 = udata - base;
4357
cout << "I_32," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
4358
}
4359
base = 0;
4360
udata = 1;
4361
{
4362
UDATA result1 = base - udata;
4363
UDATA result2 = udata - base;
4364
cout << "I_32," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
4365
}
4366
base = 0;
4367
udata = 2;
4368
{
4369
UDATA result1 = base - udata;
4370
UDATA result2 = udata - base;
4371
cout << "I_32," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
4372
}
4373
base = 0x80000000;
4374
udata = 1;
4375
{
4376
UDATA result1 = base - udata;
4377
UDATA result2 = udata - base;
4378
cout << "I_32," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
4379
}
4380
base = 0x7fffffff;
4381
udata = 1;
4382
{
4383
UDATA result1 = base - udata;
4384
UDATA result2 = udata - base;
4385
cout << "I_32," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
4386
}
4387
4388
cout << "SUBSECTION I_32 WITH IDATA" << endl;
4389
base = 0;
4390
idata = 0;
4391
{
4392
IDATA result1 = base - idata;
4393
IDATA result2 = idata - base;
4394
cout << "I_32," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
4395
}
4396
base = 0;
4397
idata = 1;
4398
{
4399
IDATA result1 = base - idata;
4400
IDATA result2 = idata - base;
4401
cout << "I_32," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
4402
}
4403
base = 0;
4404
idata = 2;
4405
{
4406
IDATA result1 = base - idata;
4407
IDATA result2 = idata - base;
4408
cout << "I_32," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
4409
}
4410
base = 0;
4411
idata = -1;
4412
{
4413
IDATA result1 = base - idata;
4414
IDATA result2 = idata - base;
4415
cout << "I_32," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
4416
}
4417
base = 0x80000000;
4418
idata = 1;
4419
{
4420
IDATA result1 = base - idata;
4421
IDATA result2 = idata - base;
4422
cout << "I_32," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
4423
}
4424
base = 0x80000000;
4425
idata = -1;
4426
{
4427
IDATA result1 = base - idata;
4428
IDATA result2 = idata - base;
4429
cout << "I_32," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
4430
}
4431
base = 0x7fffffff;
4432
idata = 1;
4433
{
4434
IDATA result1 = base - idata;
4435
IDATA result2 = idata - base;
4436
cout << "I_32," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
4437
}
4438
base = 0x7fffffff;
4439
idata = -1;
4440
{
4441
IDATA result1 = base - idata;
4442
IDATA result2 = idata - base;
4443
cout << "I_32," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
4444
}
4445
4446
}
4447
4448
static void testaddI_64(void)
4449
{
4450
//Locals
4451
I_64 base;
4452
U_8 u_8;
4453
U_16 u_16;
4454
U_32 u_32;
4455
U_64 u_64;
4456
I_16 i_16;
4457
I_32 i_32;
4458
I_64 i_64;
4459
UDATA udata;
4460
IDATA idata;
4461
4462
cout << "START SECTION I_64 add" << endl;
4463
4464
cout << "SUBSECTION I_64 WITH U_8" << endl;
4465
base = 0;
4466
u_8 = 0;
4467
{
4468
I_64 result1 = base + u_8;
4469
I_64 result2 = u_8 + base;
4470
cout << "I_64," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4471
}
4472
base = 0;
4473
u_8 = 1;
4474
{
4475
I_64 result1 = base + u_8;
4476
I_64 result2 = u_8 + base;
4477
cout << "I_64," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4478
}
4479
base = 0;
4480
u_8 = 2;
4481
{
4482
I_64 result1 = base + u_8;
4483
I_64 result2 = u_8 + base;
4484
cout << "I_64," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4485
}
4486
base = 0x8000000000000000;
4487
u_8 = 1;
4488
{
4489
I_64 result1 = base + u_8;
4490
I_64 result2 = u_8 + base;
4491
cout << "I_64," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4492
}
4493
base = 0x7fffffffffffffff;
4494
u_8 = 1;
4495
{
4496
I_64 result1 = base + u_8;
4497
I_64 result2 = u_8 + base;
4498
cout << "I_64," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4499
}
4500
4501
cout << "SUBSECTION I_64 WITH U_16" << endl;
4502
base = 0;
4503
u_16 = 0;
4504
{
4505
I_64 result1 = base + u_16;
4506
I_64 result2 = u_16 + base;
4507
cout << "I_64," << hex << base << ",add,U_16," << hex << u_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4508
}
4509
base = 0;
4510
u_16 = 1;
4511
{
4512
I_64 result1 = base + u_16;
4513
I_64 result2 = u_16 + base;
4514
cout << "I_64," << hex << base << ",add,U_16," << hex << u_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4515
}
4516
base = 0;
4517
u_16 = 2;
4518
{
4519
I_64 result1 = base + u_16;
4520
I_64 result2 = u_16 + base;
4521
cout << "I_64," << hex << base << ",add,U_16," << hex << u_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4522
}
4523
base = 0x8000000000000000;
4524
u_16 = 1;
4525
{
4526
I_64 result1 = base + u_16;
4527
I_64 result2 = u_16 + base;
4528
cout << "I_64," << hex << base << ",add,U_16," << hex << u_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4529
}
4530
base = 0x7fffffffffffffff;
4531
u_16 = 1;
4532
{
4533
I_64 result1 = base + u_16;
4534
I_64 result2 = u_16 + base;
4535
cout << "I_64," << hex << base << ",add,U_16," << hex << u_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4536
}
4537
4538
cout << "SUBSECTION I_64 WITH U_32" << endl;
4539
base = 0;
4540
u_32 = 0;
4541
{
4542
I_64 result1 = base + u_32;
4543
I_64 result2 = u_32 + base;
4544
cout << "I_64," << hex << base << ",add,U_32," << hex << u_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4545
}
4546
base = 0;
4547
u_32 = 1;
4548
{
4549
I_64 result1 = base + u_32;
4550
I_64 result2 = u_32 + base;
4551
cout << "I_64," << hex << base << ",add,U_32," << hex << u_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4552
}
4553
base = 0;
4554
u_32 = 2;
4555
{
4556
I_64 result1 = base + u_32;
4557
I_64 result2 = u_32 + base;
4558
cout << "I_64," << hex << base << ",add,U_32," << hex << u_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4559
}
4560
base = 0x8000000000000000;
4561
u_32 = 1;
4562
{
4563
I_64 result1 = base + u_32;
4564
I_64 result2 = u_32 + base;
4565
cout << "I_64," << hex << base << ",add,U_32," << hex << u_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4566
}
4567
base = 0x7fffffffffffffff;
4568
u_32 = 1;
4569
{
4570
I_64 result1 = base + u_32;
4571
I_64 result2 = u_32 + base;
4572
cout << "I_64," << hex << base << ",add,U_32," << hex << u_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4573
}
4574
4575
cout << "SUBSECTION I_64 WITH U_64" << endl;
4576
base = 0;
4577
u_64 = 0;
4578
{
4579
U_64 result1 = base + u_64;
4580
U_64 result2 = u_64 + base;
4581
cout << "I_64," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
4582
}
4583
base = 0;
4584
u_64 = 1;
4585
{
4586
U_64 result1 = base + u_64;
4587
U_64 result2 = u_64 + base;
4588
cout << "I_64," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
4589
}
4590
base = 0;
4591
u_64 = 2;
4592
{
4593
U_64 result1 = base + u_64;
4594
U_64 result2 = u_64 + base;
4595
cout << "I_64," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
4596
}
4597
base = 0x8000000000000000;
4598
u_64 = 1;
4599
{
4600
U_64 result1 = base + u_64;
4601
U_64 result2 = u_64 + base;
4602
cout << "I_64," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
4603
}
4604
base = 0x7fffffffffffffff;
4605
u_64 = 1;
4606
{
4607
U_64 result1 = base + u_64;
4608
U_64 result2 = u_64 + base;
4609
cout << "I_64," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
4610
}
4611
4612
cout << "SUBSECTION I_64 WITH I_16" << endl;
4613
base = 0;
4614
i_16 = 0;
4615
{
4616
I_64 result1 = base + i_16;
4617
I_64 result2 = i_16 + base;
4618
cout << "I_64," << hex << base << ",add,I_16," << hex << i_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4619
}
4620
base = 0;
4621
i_16 = 1;
4622
{
4623
I_64 result1 = base + i_16;
4624
I_64 result2 = i_16 + base;
4625
cout << "I_64," << hex << base << ",add,I_16," << hex << i_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4626
}
4627
base = 0;
4628
i_16 = 2;
4629
{
4630
I_64 result1 = base + i_16;
4631
I_64 result2 = i_16 + base;
4632
cout << "I_64," << hex << base << ",add,I_16," << hex << i_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4633
}
4634
base = 0;
4635
i_16 = -1;
4636
{
4637
I_64 result1 = base + i_16;
4638
I_64 result2 = i_16 + base;
4639
cout << "I_64," << hex << base << ",add,I_16," << hex << i_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4640
}
4641
base = 0x8000000000000000;
4642
i_16 = 1;
4643
{
4644
I_64 result1 = base + i_16;
4645
I_64 result2 = i_16 + base;
4646
cout << "I_64," << hex << base << ",add,I_16," << hex << i_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4647
}
4648
base = 0x8000000000000000;
4649
i_16 = -1;
4650
{
4651
I_64 result1 = base + i_16;
4652
I_64 result2 = i_16 + base;
4653
cout << "I_64," << hex << base << ",add,I_16," << hex << i_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4654
}
4655
base = 0x7fffffffffffffff;
4656
i_16 = 1;
4657
{
4658
I_64 result1 = base + i_16;
4659
I_64 result2 = i_16 + base;
4660
cout << "I_64," << hex << base << ",add,I_16," << hex << i_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4661
}
4662
base = 0x7fffffffffffffff;
4663
i_16 = -1;
4664
{
4665
I_64 result1 = base + i_16;
4666
I_64 result2 = i_16 + base;
4667
cout << "I_64," << hex << base << ",add,I_16," << hex << i_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4668
}
4669
4670
cout << "SUBSECTION I_64 WITH I_32" << endl;
4671
base = 0;
4672
i_32 = 0;
4673
{
4674
I_64 result1 = base + i_32;
4675
I_64 result2 = i_32 + base;
4676
cout << "I_64," << hex << base << ",add,I_32," << hex << i_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4677
}
4678
base = 0;
4679
i_32 = 1;
4680
{
4681
I_64 result1 = base + i_32;
4682
I_64 result2 = i_32 + base;
4683
cout << "I_64," << hex << base << ",add,I_32," << hex << i_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4684
}
4685
base = 0;
4686
i_32 = 2;
4687
{
4688
I_64 result1 = base + i_32;
4689
I_64 result2 = i_32 + base;
4690
cout << "I_64," << hex << base << ",add,I_32," << hex << i_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4691
}
4692
base = 0;
4693
i_32 = -1;
4694
{
4695
I_64 result1 = base + i_32;
4696
I_64 result2 = i_32 + base;
4697
cout << "I_64," << hex << base << ",add,I_32," << hex << i_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4698
}
4699
base = 0x8000000000000000;
4700
i_32 = 1;
4701
{
4702
I_64 result1 = base + i_32;
4703
I_64 result2 = i_32 + base;
4704
cout << "I_64," << hex << base << ",add,I_32," << hex << i_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4705
}
4706
base = 0x8000000000000000;
4707
i_32 = -1;
4708
{
4709
I_64 result1 = base + i_32;
4710
I_64 result2 = i_32 + base;
4711
cout << "I_64," << hex << base << ",add,I_32," << hex << i_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4712
}
4713
base = 0x7fffffffffffffff;
4714
i_32 = 1;
4715
{
4716
I_64 result1 = base + i_32;
4717
I_64 result2 = i_32 + base;
4718
cout << "I_64," << hex << base << ",add,I_32," << hex << i_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4719
}
4720
base = 0x7fffffffffffffff;
4721
i_32 = -1;
4722
{
4723
I_64 result1 = base + i_32;
4724
I_64 result2 = i_32 + base;
4725
cout << "I_64," << hex << base << ",add,I_32," << hex << i_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4726
}
4727
4728
cout << "SUBSECTION I_64 WITH I_64" << endl;
4729
base = 0;
4730
i_64 = 0;
4731
{
4732
I_64 result1 = base + i_64;
4733
I_64 result2 = i_64 + base;
4734
cout << "I_64," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4735
}
4736
base = 0;
4737
i_64 = 1;
4738
{
4739
I_64 result1 = base + i_64;
4740
I_64 result2 = i_64 + base;
4741
cout << "I_64," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4742
}
4743
base = 0;
4744
i_64 = 2;
4745
{
4746
I_64 result1 = base + i_64;
4747
I_64 result2 = i_64 + base;
4748
cout << "I_64," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4749
}
4750
base = 0;
4751
i_64 = -1;
4752
{
4753
I_64 result1 = base + i_64;
4754
I_64 result2 = i_64 + base;
4755
cout << "I_64," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4756
}
4757
base = 0x8000000000000000;
4758
i_64 = 1;
4759
{
4760
I_64 result1 = base + i_64;
4761
I_64 result2 = i_64 + base;
4762
cout << "I_64," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4763
}
4764
base = 0x8000000000000000;
4765
i_64 = -1;
4766
{
4767
I_64 result1 = base + i_64;
4768
I_64 result2 = i_64 + base;
4769
cout << "I_64," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4770
}
4771
base = 0x7fffffffffffffff;
4772
i_64 = 1;
4773
{
4774
I_64 result1 = base + i_64;
4775
I_64 result2 = i_64 + base;
4776
cout << "I_64," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4777
}
4778
base = 0x7fffffffffffffff;
4779
i_64 = -1;
4780
{
4781
I_64 result1 = base + i_64;
4782
I_64 result2 = i_64 + base;
4783
cout << "I_64," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4784
}
4785
4786
cout << "SUBSECTION I_64 WITH UDATA" << endl;
4787
4788
cout << "INVALID: I_64,add,UDATA" << endl;
4789
4790
4791
cout << "SUBSECTION I_64 WITH IDATA" << endl;
4792
base = 0;
4793
idata = 0;
4794
{
4795
I_64 result1 = base + idata;
4796
I_64 result2 = idata + base;
4797
cout << "I_64," << hex << base << ",add,IDATA," << hex << idata << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4798
}
4799
base = 0;
4800
idata = 1;
4801
{
4802
I_64 result1 = base + idata;
4803
I_64 result2 = idata + base;
4804
cout << "I_64," << hex << base << ",add,IDATA," << hex << idata << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4805
}
4806
base = 0;
4807
idata = 2;
4808
{
4809
I_64 result1 = base + idata;
4810
I_64 result2 = idata + base;
4811
cout << "I_64," << hex << base << ",add,IDATA," << hex << idata << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4812
}
4813
base = 0;
4814
idata = -1;
4815
{
4816
I_64 result1 = base + idata;
4817
I_64 result2 = idata + base;
4818
cout << "I_64," << hex << base << ",add,IDATA," << hex << idata << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4819
}
4820
base = 0x8000000000000000;
4821
idata = 1;
4822
{
4823
I_64 result1 = base + idata;
4824
I_64 result2 = idata + base;
4825
cout << "I_64," << hex << base << ",add,IDATA," << hex << idata << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4826
}
4827
base = 0x8000000000000000;
4828
idata = -1;
4829
{
4830
I_64 result1 = base + idata;
4831
I_64 result2 = idata + base;
4832
cout << "I_64," << hex << base << ",add,IDATA," << hex << idata << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4833
}
4834
base = 0x7fffffffffffffff;
4835
idata = 1;
4836
{
4837
I_64 result1 = base + idata;
4838
I_64 result2 = idata + base;
4839
cout << "I_64," << hex << base << ",add,IDATA," << hex << idata << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4840
}
4841
base = 0x7fffffffffffffff;
4842
idata = -1;
4843
{
4844
I_64 result1 = base + idata;
4845
I_64 result2 = idata + base;
4846
cout << "I_64," << hex << base << ",add,IDATA," << hex << idata << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4847
}
4848
4849
}
4850
4851
static void testsubI_64(void)
4852
{
4853
//Locals
4854
I_64 base;
4855
U_8 u_8;
4856
U_16 u_16;
4857
U_32 u_32;
4858
U_64 u_64;
4859
I_16 i_16;
4860
I_32 i_32;
4861
I_64 i_64;
4862
UDATA udata;
4863
IDATA idata;
4864
4865
cout << "START SECTION I_64 sub" << endl;
4866
4867
cout << "SUBSECTION I_64 WITH U_8" << endl;
4868
base = 0;
4869
u_8 = 0;
4870
{
4871
I_64 result1 = base - u_8;
4872
I_64 result2 = u_8 - base;
4873
cout << "I_64," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4874
}
4875
base = 0;
4876
u_8 = 1;
4877
{
4878
I_64 result1 = base - u_8;
4879
I_64 result2 = u_8 - base;
4880
cout << "I_64," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4881
}
4882
base = 0;
4883
u_8 = 2;
4884
{
4885
I_64 result1 = base - u_8;
4886
I_64 result2 = u_8 - base;
4887
cout << "I_64," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4888
}
4889
base = 0x8000000000000000;
4890
u_8 = 1;
4891
{
4892
I_64 result1 = base - u_8;
4893
I_64 result2 = u_8 - base;
4894
cout << "I_64," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4895
}
4896
base = 0x7fffffffffffffff;
4897
u_8 = 1;
4898
{
4899
I_64 result1 = base - u_8;
4900
I_64 result2 = u_8 - base;
4901
cout << "I_64," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4902
}
4903
4904
cout << "SUBSECTION I_64 WITH U_16" << endl;
4905
base = 0;
4906
u_16 = 0;
4907
{
4908
I_64 result1 = base - u_16;
4909
I_64 result2 = u_16 - base;
4910
cout << "I_64," << hex << base << ",sub,U_16," << hex << u_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4911
}
4912
base = 0;
4913
u_16 = 1;
4914
{
4915
I_64 result1 = base - u_16;
4916
I_64 result2 = u_16 - base;
4917
cout << "I_64," << hex << base << ",sub,U_16," << hex << u_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4918
}
4919
base = 0;
4920
u_16 = 2;
4921
{
4922
I_64 result1 = base - u_16;
4923
I_64 result2 = u_16 - base;
4924
cout << "I_64," << hex << base << ",sub,U_16," << hex << u_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4925
}
4926
base = 0x8000000000000000;
4927
u_16 = 1;
4928
{
4929
I_64 result1 = base - u_16;
4930
I_64 result2 = u_16 - base;
4931
cout << "I_64," << hex << base << ",sub,U_16," << hex << u_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4932
}
4933
base = 0x7fffffffffffffff;
4934
u_16 = 1;
4935
{
4936
I_64 result1 = base - u_16;
4937
I_64 result2 = u_16 - base;
4938
cout << "I_64," << hex << base << ",sub,U_16," << hex << u_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4939
}
4940
4941
cout << "SUBSECTION I_64 WITH U_32" << endl;
4942
base = 0;
4943
u_32 = 0;
4944
{
4945
I_64 result1 = base - u_32;
4946
I_64 result2 = u_32 - base;
4947
cout << "I_64," << hex << base << ",sub,U_32," << hex << u_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4948
}
4949
base = 0;
4950
u_32 = 1;
4951
{
4952
I_64 result1 = base - u_32;
4953
I_64 result2 = u_32 - base;
4954
cout << "I_64," << hex << base << ",sub,U_32," << hex << u_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4955
}
4956
base = 0;
4957
u_32 = 2;
4958
{
4959
I_64 result1 = base - u_32;
4960
I_64 result2 = u_32 - base;
4961
cout << "I_64," << hex << base << ",sub,U_32," << hex << u_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4962
}
4963
base = 0x8000000000000000;
4964
u_32 = 1;
4965
{
4966
I_64 result1 = base - u_32;
4967
I_64 result2 = u_32 - base;
4968
cout << "I_64," << hex << base << ",sub,U_32," << hex << u_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4969
}
4970
base = 0x7fffffffffffffff;
4971
u_32 = 1;
4972
{
4973
I_64 result1 = base - u_32;
4974
I_64 result2 = u_32 - base;
4975
cout << "I_64," << hex << base << ",sub,U_32," << hex << u_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
4976
}
4977
4978
cout << "SUBSECTION I_64 WITH U_64" << endl;
4979
base = 0;
4980
u_64 = 0;
4981
{
4982
U_64 result1 = base - u_64;
4983
U_64 result2 = u_64 - base;
4984
cout << "I_64," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
4985
}
4986
base = 0;
4987
u_64 = 1;
4988
{
4989
U_64 result1 = base - u_64;
4990
U_64 result2 = u_64 - base;
4991
cout << "I_64," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
4992
}
4993
base = 0;
4994
u_64 = 2;
4995
{
4996
U_64 result1 = base - u_64;
4997
U_64 result2 = u_64 - base;
4998
cout << "I_64," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
4999
}
5000
base = 0x8000000000000000;
5001
u_64 = 1;
5002
{
5003
U_64 result1 = base - u_64;
5004
U_64 result2 = u_64 - base;
5005
cout << "I_64," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
5006
}
5007
base = 0x7fffffffffffffff;
5008
u_64 = 1;
5009
{
5010
U_64 result1 = base - u_64;
5011
U_64 result2 = u_64 - base;
5012
cout << "I_64," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
5013
}
5014
5015
cout << "SUBSECTION I_64 WITH I_16" << endl;
5016
base = 0;
5017
i_16 = 0;
5018
{
5019
I_64 result1 = base - i_16;
5020
I_64 result2 = i_16 - base;
5021
cout << "I_64," << hex << base << ",sub,I_16," << hex << i_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5022
}
5023
base = 0;
5024
i_16 = 1;
5025
{
5026
I_64 result1 = base - i_16;
5027
I_64 result2 = i_16 - base;
5028
cout << "I_64," << hex << base << ",sub,I_16," << hex << i_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5029
}
5030
base = 0;
5031
i_16 = 2;
5032
{
5033
I_64 result1 = base - i_16;
5034
I_64 result2 = i_16 - base;
5035
cout << "I_64," << hex << base << ",sub,I_16," << hex << i_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5036
}
5037
base = 0;
5038
i_16 = -1;
5039
{
5040
I_64 result1 = base - i_16;
5041
I_64 result2 = i_16 - base;
5042
cout << "I_64," << hex << base << ",sub,I_16," << hex << i_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5043
}
5044
base = 0x8000000000000000;
5045
i_16 = 1;
5046
{
5047
I_64 result1 = base - i_16;
5048
I_64 result2 = i_16 - base;
5049
cout << "I_64," << hex << base << ",sub,I_16," << hex << i_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5050
}
5051
base = 0x8000000000000000;
5052
i_16 = -1;
5053
{
5054
I_64 result1 = base - i_16;
5055
I_64 result2 = i_16 - base;
5056
cout << "I_64," << hex << base << ",sub,I_16," << hex << i_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5057
}
5058
base = 0x7fffffffffffffff;
5059
i_16 = 1;
5060
{
5061
I_64 result1 = base - i_16;
5062
I_64 result2 = i_16 - base;
5063
cout << "I_64," << hex << base << ",sub,I_16," << hex << i_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5064
}
5065
base = 0x7fffffffffffffff;
5066
i_16 = -1;
5067
{
5068
I_64 result1 = base - i_16;
5069
I_64 result2 = i_16 - base;
5070
cout << "I_64," << hex << base << ",sub,I_16," << hex << i_16 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5071
}
5072
5073
cout << "SUBSECTION I_64 WITH I_32" << endl;
5074
base = 0;
5075
i_32 = 0;
5076
{
5077
I_64 result1 = base - i_32;
5078
I_64 result2 = i_32 - base;
5079
cout << "I_64," << hex << base << ",sub,I_32," << hex << i_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5080
}
5081
base = 0;
5082
i_32 = 1;
5083
{
5084
I_64 result1 = base - i_32;
5085
I_64 result2 = i_32 - base;
5086
cout << "I_64," << hex << base << ",sub,I_32," << hex << i_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5087
}
5088
base = 0;
5089
i_32 = 2;
5090
{
5091
I_64 result1 = base - i_32;
5092
I_64 result2 = i_32 - base;
5093
cout << "I_64," << hex << base << ",sub,I_32," << hex << i_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5094
}
5095
base = 0;
5096
i_32 = -1;
5097
{
5098
I_64 result1 = base - i_32;
5099
I_64 result2 = i_32 - base;
5100
cout << "I_64," << hex << base << ",sub,I_32," << hex << i_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5101
}
5102
base = 0x8000000000000000;
5103
i_32 = 1;
5104
{
5105
I_64 result1 = base - i_32;
5106
I_64 result2 = i_32 - base;
5107
cout << "I_64," << hex << base << ",sub,I_32," << hex << i_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5108
}
5109
base = 0x8000000000000000;
5110
i_32 = -1;
5111
{
5112
I_64 result1 = base - i_32;
5113
I_64 result2 = i_32 - base;
5114
cout << "I_64," << hex << base << ",sub,I_32," << hex << i_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5115
}
5116
base = 0x7fffffffffffffff;
5117
i_32 = 1;
5118
{
5119
I_64 result1 = base - i_32;
5120
I_64 result2 = i_32 - base;
5121
cout << "I_64," << hex << base << ",sub,I_32," << hex << i_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5122
}
5123
base = 0x7fffffffffffffff;
5124
i_32 = -1;
5125
{
5126
I_64 result1 = base - i_32;
5127
I_64 result2 = i_32 - base;
5128
cout << "I_64," << hex << base << ",sub,I_32," << hex << i_32 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5129
}
5130
5131
cout << "SUBSECTION I_64 WITH I_64" << endl;
5132
base = 0;
5133
i_64 = 0;
5134
{
5135
I_64 result1 = base - i_64;
5136
I_64 result2 = i_64 - base;
5137
cout << "I_64," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5138
}
5139
base = 0;
5140
i_64 = 1;
5141
{
5142
I_64 result1 = base - i_64;
5143
I_64 result2 = i_64 - base;
5144
cout << "I_64," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5145
}
5146
base = 0;
5147
i_64 = 2;
5148
{
5149
I_64 result1 = base - i_64;
5150
I_64 result2 = i_64 - base;
5151
cout << "I_64," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5152
}
5153
base = 0;
5154
i_64 = -1;
5155
{
5156
I_64 result1 = base - i_64;
5157
I_64 result2 = i_64 - base;
5158
cout << "I_64," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5159
}
5160
base = 0x8000000000000000;
5161
i_64 = 1;
5162
{
5163
I_64 result1 = base - i_64;
5164
I_64 result2 = i_64 - base;
5165
cout << "I_64," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5166
}
5167
base = 0x8000000000000000;
5168
i_64 = -1;
5169
{
5170
I_64 result1 = base - i_64;
5171
I_64 result2 = i_64 - base;
5172
cout << "I_64," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5173
}
5174
base = 0x7fffffffffffffff;
5175
i_64 = 1;
5176
{
5177
I_64 result1 = base - i_64;
5178
I_64 result2 = i_64 - base;
5179
cout << "I_64," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5180
}
5181
base = 0x7fffffffffffffff;
5182
i_64 = -1;
5183
{
5184
I_64 result1 = base - i_64;
5185
I_64 result2 = i_64 - base;
5186
cout << "I_64," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5187
}
5188
5189
cout << "SUBSECTION I_64 WITH UDATA" << endl;
5190
5191
cout << "INVALID: I_64,sub,UDATA" << endl;
5192
5193
5194
cout << "SUBSECTION I_64 WITH IDATA" << endl;
5195
base = 0;
5196
idata = 0;
5197
{
5198
I_64 result1 = base - idata;
5199
I_64 result2 = idata - base;
5200
cout << "I_64," << hex << base << ",sub,IDATA," << hex << idata << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5201
}
5202
base = 0;
5203
idata = 1;
5204
{
5205
I_64 result1 = base - idata;
5206
I_64 result2 = idata - base;
5207
cout << "I_64," << hex << base << ",sub,IDATA," << hex << idata << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5208
}
5209
base = 0;
5210
idata = 2;
5211
{
5212
I_64 result1 = base - idata;
5213
I_64 result2 = idata - base;
5214
cout << "I_64," << hex << base << ",sub,IDATA," << hex << idata << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5215
}
5216
base = 0;
5217
idata = -1;
5218
{
5219
I_64 result1 = base - idata;
5220
I_64 result2 = idata - base;
5221
cout << "I_64," << hex << base << ",sub,IDATA," << hex << idata << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5222
}
5223
base = 0x8000000000000000;
5224
idata = 1;
5225
{
5226
I_64 result1 = base - idata;
5227
I_64 result2 = idata - base;
5228
cout << "I_64," << hex << base << ",sub,IDATA," << hex << idata << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5229
}
5230
base = 0x8000000000000000;
5231
idata = -1;
5232
{
5233
I_64 result1 = base - idata;
5234
I_64 result2 = idata - base;
5235
cout << "I_64," << hex << base << ",sub,IDATA," << hex << idata << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5236
}
5237
base = 0x7fffffffffffffff;
5238
idata = 1;
5239
{
5240
I_64 result1 = base - idata;
5241
I_64 result2 = idata - base;
5242
cout << "I_64," << hex << base << ",sub,IDATA," << hex << idata << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5243
}
5244
base = 0x7fffffffffffffff;
5245
idata = -1;
5246
{
5247
I_64 result1 = base - idata;
5248
I_64 result2 = idata - base;
5249
cout << "I_64," << hex << base << ",sub,IDATA," << hex << idata << ",I_64," << hex << result1 << "," << hex << result2 << endl;
5250
}
5251
5252
}
5253
5254
static void testaddUDATA(void)
5255
{
5256
//Locals
5257
UDATA base;
5258
U_8 u_8;
5259
U_16 u_16;
5260
U_32 u_32;
5261
U_64 u_64;
5262
I_16 i_16;
5263
I_32 i_32;
5264
I_64 i_64;
5265
UDATA udata;
5266
IDATA idata;
5267
5268
cout << "START SECTION UDATA add" << endl;
5269
5270
cout << "SUBSECTION UDATA WITH U_8" << endl;
5271
base = 0;
5272
u_8 = 0;
5273
{
5274
UDATA result1 = base + u_8;
5275
UDATA result2 = u_8 + base;
5276
cout << "UDATA," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5277
}
5278
base = 0;
5279
u_8 = 1;
5280
{
5281
UDATA result1 = base + u_8;
5282
UDATA result2 = u_8 + base;
5283
cout << "UDATA," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5284
}
5285
base = 0;
5286
u_8 = 2;
5287
{
5288
UDATA result1 = base + u_8;
5289
UDATA result2 = u_8 + base;
5290
cout << "UDATA," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5291
}
5292
base = 0xffffffff;
5293
u_8 = 1;
5294
{
5295
UDATA result1 = base + u_8;
5296
UDATA result2 = u_8 + base;
5297
cout << "UDATA," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5298
}
5299
5300
cout << "SUBSECTION UDATA WITH U_16" << endl;
5301
base = 0;
5302
u_16 = 0;
5303
{
5304
UDATA result1 = base + u_16;
5305
UDATA result2 = u_16 + base;
5306
cout << "UDATA," << hex << base << ",add,U_16," << hex << u_16 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5307
}
5308
base = 0;
5309
u_16 = 1;
5310
{
5311
UDATA result1 = base + u_16;
5312
UDATA result2 = u_16 + base;
5313
cout << "UDATA," << hex << base << ",add,U_16," << hex << u_16 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5314
}
5315
base = 0;
5316
u_16 = 2;
5317
{
5318
UDATA result1 = base + u_16;
5319
UDATA result2 = u_16 + base;
5320
cout << "UDATA," << hex << base << ",add,U_16," << hex << u_16 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5321
}
5322
base = 0xffffffff;
5323
u_16 = 1;
5324
{
5325
UDATA result1 = base + u_16;
5326
UDATA result2 = u_16 + base;
5327
cout << "UDATA," << hex << base << ",add,U_16," << hex << u_16 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5328
}
5329
5330
cout << "SUBSECTION UDATA WITH U_32" << endl;
5331
base = 0;
5332
u_32 = 0;
5333
{
5334
UDATA result1 = base + u_32;
5335
UDATA result2 = u_32 + base;
5336
cout << "UDATA," << hex << base << ",add,U_32," << hex << u_32 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5337
}
5338
base = 0;
5339
u_32 = 1;
5340
{
5341
UDATA result1 = base + u_32;
5342
UDATA result2 = u_32 + base;
5343
cout << "UDATA," << hex << base << ",add,U_32," << hex << u_32 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5344
}
5345
base = 0;
5346
u_32 = 2;
5347
{
5348
UDATA result1 = base + u_32;
5349
UDATA result2 = u_32 + base;
5350
cout << "UDATA," << hex << base << ",add,U_32," << hex << u_32 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5351
}
5352
base = 0xffffffff;
5353
u_32 = 1;
5354
{
5355
UDATA result1 = base + u_32;
5356
UDATA result2 = u_32 + base;
5357
cout << "UDATA," << hex << base << ",add,U_32," << hex << u_32 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5358
}
5359
5360
cout << "SUBSECTION UDATA WITH U_64" << endl;
5361
base = 0;
5362
u_64 = 0;
5363
{
5364
U_64 result1 = base + u_64;
5365
U_64 result2 = u_64 + base;
5366
cout << "UDATA," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
5367
}
5368
base = 0;
5369
u_64 = 1;
5370
{
5371
U_64 result1 = base + u_64;
5372
U_64 result2 = u_64 + base;
5373
cout << "UDATA," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
5374
}
5375
base = 0;
5376
u_64 = 2;
5377
{
5378
U_64 result1 = base + u_64;
5379
U_64 result2 = u_64 + base;
5380
cout << "UDATA," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
5381
}
5382
base = 0xffffffff;
5383
u_64 = 1;
5384
{
5385
U_64 result1 = base + u_64;
5386
U_64 result2 = u_64 + base;
5387
cout << "UDATA," << hex << base << ",add,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
5388
}
5389
5390
cout << "SUBSECTION UDATA WITH I_16" << endl;
5391
base = 0;
5392
i_16 = 0;
5393
{
5394
UDATA result1 = base + i_16;
5395
UDATA result2 = i_16 + base;
5396
cout << "UDATA," << hex << base << ",add,I_16," << hex << i_16 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5397
}
5398
base = 0;
5399
i_16 = 1;
5400
{
5401
UDATA result1 = base + i_16;
5402
UDATA result2 = i_16 + base;
5403
cout << "UDATA," << hex << base << ",add,I_16," << hex << i_16 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5404
}
5405
base = 0;
5406
i_16 = 2;
5407
{
5408
UDATA result1 = base + i_16;
5409
UDATA result2 = i_16 + base;
5410
cout << "UDATA," << hex << base << ",add,I_16," << hex << i_16 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5411
}
5412
base = 0;
5413
i_16 = -1;
5414
{
5415
UDATA result1 = base + i_16;
5416
UDATA result2 = i_16 + base;
5417
cout << "UDATA," << hex << base << ",add,I_16," << hex << i_16 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5418
}
5419
base = 0xffffffff;
5420
i_16 = 1;
5421
{
5422
UDATA result1 = base + i_16;
5423
UDATA result2 = i_16 + base;
5424
cout << "UDATA," << hex << base << ",add,I_16," << hex << i_16 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5425
}
5426
base = 0xffffffff;
5427
i_16 = -1;
5428
{
5429
UDATA result1 = base + i_16;
5430
UDATA result2 = i_16 + base;
5431
cout << "UDATA," << hex << base << ",add,I_16," << hex << i_16 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5432
}
5433
5434
cout << "SUBSECTION UDATA WITH I_32" << endl;
5435
base = 0;
5436
i_32 = 0;
5437
{
5438
UDATA result1 = base + i_32;
5439
UDATA result2 = i_32 + base;
5440
cout << "UDATA," << hex << base << ",add,I_32," << hex << i_32 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5441
}
5442
base = 0;
5443
i_32 = 1;
5444
{
5445
UDATA result1 = base + i_32;
5446
UDATA result2 = i_32 + base;
5447
cout << "UDATA," << hex << base << ",add,I_32," << hex << i_32 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5448
}
5449
base = 0;
5450
i_32 = 2;
5451
{
5452
UDATA result1 = base + i_32;
5453
UDATA result2 = i_32 + base;
5454
cout << "UDATA," << hex << base << ",add,I_32," << hex << i_32 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5455
}
5456
base = 0;
5457
i_32 = -1;
5458
{
5459
UDATA result1 = base + i_32;
5460
UDATA result2 = i_32 + base;
5461
cout << "UDATA," << hex << base << ",add,I_32," << hex << i_32 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5462
}
5463
base = 0xffffffff;
5464
i_32 = 1;
5465
{
5466
UDATA result1 = base + i_32;
5467
UDATA result2 = i_32 + base;
5468
cout << "UDATA," << hex << base << ",add,I_32," << hex << i_32 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5469
}
5470
base = 0xffffffff;
5471
i_32 = -1;
5472
{
5473
UDATA result1 = base + i_32;
5474
UDATA result2 = i_32 + base;
5475
cout << "UDATA," << hex << base << ",add,I_32," << hex << i_32 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5476
}
5477
5478
cout << "SUBSECTION UDATA WITH I_64" << endl;
5479
5480
cout << "INVALID: UDATA,add,I_64" << endl;
5481
5482
5483
cout << "SUBSECTION UDATA WITH UDATA" << endl;
5484
base = 0;
5485
udata = 0;
5486
{
5487
UDATA result1 = base + udata;
5488
UDATA result2 = udata + base;
5489
cout << "UDATA," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5490
}
5491
base = 0;
5492
udata = 1;
5493
{
5494
UDATA result1 = base + udata;
5495
UDATA result2 = udata + base;
5496
cout << "UDATA," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5497
}
5498
base = 0;
5499
udata = 2;
5500
{
5501
UDATA result1 = base + udata;
5502
UDATA result2 = udata + base;
5503
cout << "UDATA," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5504
}
5505
base = 0xffffffff;
5506
udata = 1;
5507
{
5508
UDATA result1 = base + udata;
5509
UDATA result2 = udata + base;
5510
cout << "UDATA," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5511
}
5512
5513
cout << "SUBSECTION UDATA WITH IDATA" << endl;
5514
base = 0;
5515
idata = 0;
5516
{
5517
UDATA result1 = base + idata;
5518
UDATA result2 = idata + base;
5519
cout << "UDATA," << hex << base << ",add,IDATA," << hex << idata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5520
}
5521
base = 0;
5522
idata = 1;
5523
{
5524
UDATA result1 = base + idata;
5525
UDATA result2 = idata + base;
5526
cout << "UDATA," << hex << base << ",add,IDATA," << hex << idata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5527
}
5528
base = 0;
5529
idata = 2;
5530
{
5531
UDATA result1 = base + idata;
5532
UDATA result2 = idata + base;
5533
cout << "UDATA," << hex << base << ",add,IDATA," << hex << idata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5534
}
5535
base = 0;
5536
idata = -1;
5537
{
5538
UDATA result1 = base + idata;
5539
UDATA result2 = idata + base;
5540
cout << "UDATA," << hex << base << ",add,IDATA," << hex << idata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5541
}
5542
base = 0xffffffff;
5543
idata = 1;
5544
{
5545
UDATA result1 = base + idata;
5546
UDATA result2 = idata + base;
5547
cout << "UDATA," << hex << base << ",add,IDATA," << hex << idata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5548
}
5549
base = 0xffffffff;
5550
idata = -1;
5551
{
5552
UDATA result1 = base + idata;
5553
UDATA result2 = idata + base;
5554
cout << "UDATA," << hex << base << ",add,IDATA," << hex << idata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5555
}
5556
5557
}
5558
5559
static void testsubUDATA(void)
5560
{
5561
//Locals
5562
UDATA base;
5563
U_8 u_8;
5564
U_16 u_16;
5565
U_32 u_32;
5566
U_64 u_64;
5567
I_16 i_16;
5568
I_32 i_32;
5569
I_64 i_64;
5570
UDATA udata;
5571
IDATA idata;
5572
5573
cout << "START SECTION UDATA sub" << endl;
5574
5575
cout << "SUBSECTION UDATA WITH U_8" << endl;
5576
base = 0;
5577
u_8 = 0;
5578
{
5579
UDATA result1 = base - u_8;
5580
UDATA result2 = u_8 - base;
5581
cout << "UDATA," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5582
}
5583
base = 0;
5584
u_8 = 1;
5585
{
5586
UDATA result1 = base - u_8;
5587
UDATA result2 = u_8 - base;
5588
cout << "UDATA," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5589
}
5590
base = 0;
5591
u_8 = 2;
5592
{
5593
UDATA result1 = base - u_8;
5594
UDATA result2 = u_8 - base;
5595
cout << "UDATA," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5596
}
5597
base = 0xffffffff;
5598
u_8 = 1;
5599
{
5600
UDATA result1 = base - u_8;
5601
UDATA result2 = u_8 - base;
5602
cout << "UDATA," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5603
}
5604
5605
cout << "SUBSECTION UDATA WITH U_16" << endl;
5606
base = 0;
5607
u_16 = 0;
5608
{
5609
UDATA result1 = base - u_16;
5610
UDATA result2 = u_16 - base;
5611
cout << "UDATA," << hex << base << ",sub,U_16," << hex << u_16 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5612
}
5613
base = 0;
5614
u_16 = 1;
5615
{
5616
UDATA result1 = base - u_16;
5617
UDATA result2 = u_16 - base;
5618
cout << "UDATA," << hex << base << ",sub,U_16," << hex << u_16 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5619
}
5620
base = 0;
5621
u_16 = 2;
5622
{
5623
UDATA result1 = base - u_16;
5624
UDATA result2 = u_16 - base;
5625
cout << "UDATA," << hex << base << ",sub,U_16," << hex << u_16 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5626
}
5627
base = 0xffffffff;
5628
u_16 = 1;
5629
{
5630
UDATA result1 = base - u_16;
5631
UDATA result2 = u_16 - base;
5632
cout << "UDATA," << hex << base << ",sub,U_16," << hex << u_16 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5633
}
5634
5635
cout << "SUBSECTION UDATA WITH U_32" << endl;
5636
base = 0;
5637
u_32 = 0;
5638
{
5639
UDATA result1 = base - u_32;
5640
UDATA result2 = u_32 - base;
5641
cout << "UDATA," << hex << base << ",sub,U_32," << hex << u_32 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5642
}
5643
base = 0;
5644
u_32 = 1;
5645
{
5646
UDATA result1 = base - u_32;
5647
UDATA result2 = u_32 - base;
5648
cout << "UDATA," << hex << base << ",sub,U_32," << hex << u_32 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5649
}
5650
base = 0;
5651
u_32 = 2;
5652
{
5653
UDATA result1 = base - u_32;
5654
UDATA result2 = u_32 - base;
5655
cout << "UDATA," << hex << base << ",sub,U_32," << hex << u_32 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5656
}
5657
base = 0xffffffff;
5658
u_32 = 1;
5659
{
5660
UDATA result1 = base - u_32;
5661
UDATA result2 = u_32 - base;
5662
cout << "UDATA," << hex << base << ",sub,U_32," << hex << u_32 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5663
}
5664
5665
cout << "SUBSECTION UDATA WITH U_64" << endl;
5666
base = 0;
5667
u_64 = 0;
5668
{
5669
U_64 result1 = base - u_64;
5670
U_64 result2 = u_64 - base;
5671
cout << "UDATA," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
5672
}
5673
base = 0;
5674
u_64 = 1;
5675
{
5676
U_64 result1 = base - u_64;
5677
U_64 result2 = u_64 - base;
5678
cout << "UDATA," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
5679
}
5680
base = 0;
5681
u_64 = 2;
5682
{
5683
U_64 result1 = base - u_64;
5684
U_64 result2 = u_64 - base;
5685
cout << "UDATA," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
5686
}
5687
base = 0xffffffff;
5688
u_64 = 1;
5689
{
5690
U_64 result1 = base - u_64;
5691
U_64 result2 = u_64 - base;
5692
cout << "UDATA," << hex << base << ",sub,U_64," << hex << u_64 << ",U_64," << hex << result1 << "," << hex << result2 << endl;
5693
}
5694
5695
cout << "SUBSECTION UDATA WITH I_16" << endl;
5696
base = 0;
5697
i_16 = 0;
5698
{
5699
UDATA result1 = base - i_16;
5700
UDATA result2 = i_16 - base;
5701
cout << "UDATA," << hex << base << ",sub,I_16," << hex << i_16 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5702
}
5703
base = 0;
5704
i_16 = 1;
5705
{
5706
UDATA result1 = base - i_16;
5707
UDATA result2 = i_16 - base;
5708
cout << "UDATA," << hex << base << ",sub,I_16," << hex << i_16 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5709
}
5710
base = 0;
5711
i_16 = 2;
5712
{
5713
UDATA result1 = base - i_16;
5714
UDATA result2 = i_16 - base;
5715
cout << "UDATA," << hex << base << ",sub,I_16," << hex << i_16 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5716
}
5717
base = 0;
5718
i_16 = -1;
5719
{
5720
UDATA result1 = base - i_16;
5721
UDATA result2 = i_16 - base;
5722
cout << "UDATA," << hex << base << ",sub,I_16," << hex << i_16 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5723
}
5724
base = 0xffffffff;
5725
i_16 = 1;
5726
{
5727
UDATA result1 = base - i_16;
5728
UDATA result2 = i_16 - base;
5729
cout << "UDATA," << hex << base << ",sub,I_16," << hex << i_16 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5730
}
5731
base = 0xffffffff;
5732
i_16 = -1;
5733
{
5734
UDATA result1 = base - i_16;
5735
UDATA result2 = i_16 - base;
5736
cout << "UDATA," << hex << base << ",sub,I_16," << hex << i_16 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5737
}
5738
5739
cout << "SUBSECTION UDATA WITH I_32" << endl;
5740
base = 0;
5741
i_32 = 0;
5742
{
5743
UDATA result1 = base - i_32;
5744
UDATA result2 = i_32 - base;
5745
cout << "UDATA," << hex << base << ",sub,I_32," << hex << i_32 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5746
}
5747
base = 0;
5748
i_32 = 1;
5749
{
5750
UDATA result1 = base - i_32;
5751
UDATA result2 = i_32 - base;
5752
cout << "UDATA," << hex << base << ",sub,I_32," << hex << i_32 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5753
}
5754
base = 0;
5755
i_32 = 2;
5756
{
5757
UDATA result1 = base - i_32;
5758
UDATA result2 = i_32 - base;
5759
cout << "UDATA," << hex << base << ",sub,I_32," << hex << i_32 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5760
}
5761
base = 0;
5762
i_32 = -1;
5763
{
5764
UDATA result1 = base - i_32;
5765
UDATA result2 = i_32 - base;
5766
cout << "UDATA," << hex << base << ",sub,I_32," << hex << i_32 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5767
}
5768
base = 0xffffffff;
5769
i_32 = 1;
5770
{
5771
UDATA result1 = base - i_32;
5772
UDATA result2 = i_32 - base;
5773
cout << "UDATA," << hex << base << ",sub,I_32," << hex << i_32 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5774
}
5775
base = 0xffffffff;
5776
i_32 = -1;
5777
{
5778
UDATA result1 = base - i_32;
5779
UDATA result2 = i_32 - base;
5780
cout << "UDATA," << hex << base << ",sub,I_32," << hex << i_32 << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5781
}
5782
5783
cout << "SUBSECTION UDATA WITH I_64" << endl;
5784
5785
cout << "INVALID: UDATA,sub,I_64" << endl;
5786
5787
5788
cout << "SUBSECTION UDATA WITH UDATA" << endl;
5789
base = 0;
5790
udata = 0;
5791
{
5792
UDATA result1 = base - udata;
5793
UDATA result2 = udata - base;
5794
cout << "UDATA," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5795
}
5796
base = 0;
5797
udata = 1;
5798
{
5799
UDATA result1 = base - udata;
5800
UDATA result2 = udata - base;
5801
cout << "UDATA," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5802
}
5803
base = 0;
5804
udata = 2;
5805
{
5806
UDATA result1 = base - udata;
5807
UDATA result2 = udata - base;
5808
cout << "UDATA," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5809
}
5810
base = 0xffffffff;
5811
udata = 1;
5812
{
5813
UDATA result1 = base - udata;
5814
UDATA result2 = udata - base;
5815
cout << "UDATA," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5816
}
5817
5818
cout << "SUBSECTION UDATA WITH IDATA" << endl;
5819
base = 0;
5820
idata = 0;
5821
{
5822
UDATA result1 = base - idata;
5823
UDATA result2 = idata - base;
5824
cout << "UDATA," << hex << base << ",sub,IDATA," << hex << idata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5825
}
5826
base = 0;
5827
idata = 1;
5828
{
5829
UDATA result1 = base - idata;
5830
UDATA result2 = idata - base;
5831
cout << "UDATA," << hex << base << ",sub,IDATA," << hex << idata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5832
}
5833
base = 0;
5834
idata = 2;
5835
{
5836
UDATA result1 = base - idata;
5837
UDATA result2 = idata - base;
5838
cout << "UDATA," << hex << base << ",sub,IDATA," << hex << idata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5839
}
5840
base = 0;
5841
idata = -1;
5842
{
5843
UDATA result1 = base - idata;
5844
UDATA result2 = idata - base;
5845
cout << "UDATA," << hex << base << ",sub,IDATA," << hex << idata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5846
}
5847
base = 0xffffffff;
5848
idata = 1;
5849
{
5850
UDATA result1 = base - idata;
5851
UDATA result2 = idata - base;
5852
cout << "UDATA," << hex << base << ",sub,IDATA," << hex << idata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5853
}
5854
base = 0xffffffff;
5855
idata = -1;
5856
{
5857
UDATA result1 = base - idata;
5858
UDATA result2 = idata - base;
5859
cout << "UDATA," << hex << base << ",sub,IDATA," << hex << idata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
5860
}
5861
5862
}
5863
5864
static void testaddIDATA(void)
5865
{
5866
//Locals
5867
IDATA base;
5868
U_8 u_8;
5869
U_16 u_16;
5870
U_32 u_32;
5871
U_64 u_64;
5872
I_16 i_16;
5873
I_32 i_32;
5874
I_64 i_64;
5875
UDATA udata;
5876
IDATA idata;
5877
5878
cout << "START SECTION IDATA add" << endl;
5879
5880
cout << "SUBSECTION IDATA WITH U_8" << endl;
5881
base = 0;
5882
u_8 = 0;
5883
{
5884
IDATA result1 = base + u_8;
5885
IDATA result2 = u_8 + base;
5886
cout << "IDATA," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
5887
}
5888
base = 0;
5889
u_8 = 1;
5890
{
5891
IDATA result1 = base + u_8;
5892
IDATA result2 = u_8 + base;
5893
cout << "IDATA," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
5894
}
5895
base = 0;
5896
u_8 = 2;
5897
{
5898
IDATA result1 = base + u_8;
5899
IDATA result2 = u_8 + base;
5900
cout << "IDATA," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
5901
}
5902
base = 0x80000000;
5903
u_8 = 1;
5904
{
5905
IDATA result1 = base + u_8;
5906
IDATA result2 = u_8 + base;
5907
cout << "IDATA," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
5908
}
5909
base = 0x7fffffff;
5910
u_8 = 1;
5911
{
5912
IDATA result1 = base + u_8;
5913
IDATA result2 = u_8 + base;
5914
cout << "IDATA," << hex << base << ",add,U_8," << hex << (unsigned int)u_8 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
5915
}
5916
5917
cout << "SUBSECTION IDATA WITH U_16" << endl;
5918
base = 0;
5919
u_16 = 0;
5920
{
5921
IDATA result1 = base + u_16;
5922
IDATA result2 = u_16 + base;
5923
cout << "IDATA," << hex << base << ",add,U_16," << hex << u_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
5924
}
5925
base = 0;
5926
u_16 = 1;
5927
{
5928
IDATA result1 = base + u_16;
5929
IDATA result2 = u_16 + base;
5930
cout << "IDATA," << hex << base << ",add,U_16," << hex << u_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
5931
}
5932
base = 0;
5933
u_16 = 2;
5934
{
5935
IDATA result1 = base + u_16;
5936
IDATA result2 = u_16 + base;
5937
cout << "IDATA," << hex << base << ",add,U_16," << hex << u_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
5938
}
5939
base = 0x80000000;
5940
u_16 = 1;
5941
{
5942
IDATA result1 = base + u_16;
5943
IDATA result2 = u_16 + base;
5944
cout << "IDATA," << hex << base << ",add,U_16," << hex << u_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
5945
}
5946
base = 0x7fffffff;
5947
u_16 = 1;
5948
{
5949
IDATA result1 = base + u_16;
5950
IDATA result2 = u_16 + base;
5951
cout << "IDATA," << hex << base << ",add,U_16," << hex << u_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
5952
}
5953
5954
cout << "SUBSECTION IDATA WITH U_32" << endl;
5955
base = 0;
5956
u_32 = 0;
5957
{
5958
IDATA result1 = base + u_32;
5959
IDATA result2 = u_32 + base;
5960
cout << "IDATA," << hex << base << ",add,U_32," << hex << u_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
5961
}
5962
base = 0;
5963
u_32 = 1;
5964
{
5965
IDATA result1 = base + u_32;
5966
IDATA result2 = u_32 + base;
5967
cout << "IDATA," << hex << base << ",add,U_32," << hex << u_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
5968
}
5969
base = 0;
5970
u_32 = 2;
5971
{
5972
IDATA result1 = base + u_32;
5973
IDATA result2 = u_32 + base;
5974
cout << "IDATA," << hex << base << ",add,U_32," << hex << u_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
5975
}
5976
base = 0x80000000;
5977
u_32 = 1;
5978
{
5979
IDATA result1 = base + u_32;
5980
IDATA result2 = u_32 + base;
5981
cout << "IDATA," << hex << base << ",add,U_32," << hex << u_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
5982
}
5983
base = 0x7fffffff;
5984
u_32 = 1;
5985
{
5986
IDATA result1 = base + u_32;
5987
IDATA result2 = u_32 + base;
5988
cout << "IDATA," << hex << base << ",add,U_32," << hex << u_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
5989
}
5990
5991
cout << "SUBSECTION IDATA WITH U_64" << endl;
5992
5993
cout << "INVALID: IDATA,add,U_64" << endl;
5994
5995
5996
cout << "SUBSECTION IDATA WITH I_16" << endl;
5997
base = 0;
5998
i_16 = 0;
5999
{
6000
IDATA result1 = base + i_16;
6001
IDATA result2 = i_16 + base;
6002
cout << "IDATA," << hex << base << ",add,I_16," << hex << i_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6003
}
6004
base = 0;
6005
i_16 = 1;
6006
{
6007
IDATA result1 = base + i_16;
6008
IDATA result2 = i_16 + base;
6009
cout << "IDATA," << hex << base << ",add,I_16," << hex << i_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6010
}
6011
base = 0;
6012
i_16 = 2;
6013
{
6014
IDATA result1 = base + i_16;
6015
IDATA result2 = i_16 + base;
6016
cout << "IDATA," << hex << base << ",add,I_16," << hex << i_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6017
}
6018
base = 0;
6019
i_16 = -1;
6020
{
6021
IDATA result1 = base + i_16;
6022
IDATA result2 = i_16 + base;
6023
cout << "IDATA," << hex << base << ",add,I_16," << hex << i_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6024
}
6025
base = 0x80000000;
6026
i_16 = 1;
6027
{
6028
IDATA result1 = base + i_16;
6029
IDATA result2 = i_16 + base;
6030
cout << "IDATA," << hex << base << ",add,I_16," << hex << i_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6031
}
6032
base = 0x80000000;
6033
i_16 = -1;
6034
{
6035
IDATA result1 = base + i_16;
6036
IDATA result2 = i_16 + base;
6037
cout << "IDATA," << hex << base << ",add,I_16," << hex << i_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6038
}
6039
base = 0x7fffffff;
6040
i_16 = 1;
6041
{
6042
IDATA result1 = base + i_16;
6043
IDATA result2 = i_16 + base;
6044
cout << "IDATA," << hex << base << ",add,I_16," << hex << i_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6045
}
6046
base = 0x7fffffff;
6047
i_16 = -1;
6048
{
6049
IDATA result1 = base + i_16;
6050
IDATA result2 = i_16 + base;
6051
cout << "IDATA," << hex << base << ",add,I_16," << hex << i_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6052
}
6053
6054
cout << "SUBSECTION IDATA WITH I_32" << endl;
6055
base = 0;
6056
i_32 = 0;
6057
{
6058
IDATA result1 = base + i_32;
6059
IDATA result2 = i_32 + base;
6060
cout << "IDATA," << hex << base << ",add,I_32," << hex << i_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6061
}
6062
base = 0;
6063
i_32 = 1;
6064
{
6065
IDATA result1 = base + i_32;
6066
IDATA result2 = i_32 + base;
6067
cout << "IDATA," << hex << base << ",add,I_32," << hex << i_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6068
}
6069
base = 0;
6070
i_32 = 2;
6071
{
6072
IDATA result1 = base + i_32;
6073
IDATA result2 = i_32 + base;
6074
cout << "IDATA," << hex << base << ",add,I_32," << hex << i_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6075
}
6076
base = 0;
6077
i_32 = -1;
6078
{
6079
IDATA result1 = base + i_32;
6080
IDATA result2 = i_32 + base;
6081
cout << "IDATA," << hex << base << ",add,I_32," << hex << i_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6082
}
6083
base = 0x80000000;
6084
i_32 = 1;
6085
{
6086
IDATA result1 = base + i_32;
6087
IDATA result2 = i_32 + base;
6088
cout << "IDATA," << hex << base << ",add,I_32," << hex << i_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6089
}
6090
base = 0x80000000;
6091
i_32 = -1;
6092
{
6093
IDATA result1 = base + i_32;
6094
IDATA result2 = i_32 + base;
6095
cout << "IDATA," << hex << base << ",add,I_32," << hex << i_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6096
}
6097
base = 0x7fffffff;
6098
i_32 = 1;
6099
{
6100
IDATA result1 = base + i_32;
6101
IDATA result2 = i_32 + base;
6102
cout << "IDATA," << hex << base << ",add,I_32," << hex << i_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6103
}
6104
base = 0x7fffffff;
6105
i_32 = -1;
6106
{
6107
IDATA result1 = base + i_32;
6108
IDATA result2 = i_32 + base;
6109
cout << "IDATA," << hex << base << ",add,I_32," << hex << i_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6110
}
6111
6112
cout << "SUBSECTION IDATA WITH I_64" << endl;
6113
base = 0;
6114
i_64 = 0;
6115
{
6116
I_64 result1 = base + i_64;
6117
I_64 result2 = i_64 + base;
6118
cout << "IDATA," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
6119
}
6120
base = 0;
6121
i_64 = 1;
6122
{
6123
I_64 result1 = base + i_64;
6124
I_64 result2 = i_64 + base;
6125
cout << "IDATA," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
6126
}
6127
base = 0;
6128
i_64 = 2;
6129
{
6130
I_64 result1 = base + i_64;
6131
I_64 result2 = i_64 + base;
6132
cout << "IDATA," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
6133
}
6134
base = 0;
6135
i_64 = -1;
6136
{
6137
I_64 result1 = base + i_64;
6138
I_64 result2 = i_64 + base;
6139
cout << "IDATA," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
6140
}
6141
base = 0x80000000;
6142
i_64 = 1;
6143
{
6144
I_64 result1 = base + i_64;
6145
I_64 result2 = i_64 + base;
6146
cout << "IDATA," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
6147
}
6148
base = 0x80000000;
6149
i_64 = -1;
6150
{
6151
I_64 result1 = base + i_64;
6152
I_64 result2 = i_64 + base;
6153
cout << "IDATA," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
6154
}
6155
base = 0x7fffffff;
6156
i_64 = 1;
6157
{
6158
I_64 result1 = base + i_64;
6159
I_64 result2 = i_64 + base;
6160
cout << "IDATA," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
6161
}
6162
base = 0x7fffffff;
6163
i_64 = -1;
6164
{
6165
I_64 result1 = base + i_64;
6166
I_64 result2 = i_64 + base;
6167
cout << "IDATA," << hex << base << ",add,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
6168
}
6169
6170
cout << "SUBSECTION IDATA WITH UDATA" << endl;
6171
base = 0;
6172
udata = 0;
6173
{
6174
UDATA result1 = base + udata;
6175
UDATA result2 = udata + base;
6176
cout << "IDATA," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
6177
}
6178
base = 0;
6179
udata = 1;
6180
{
6181
UDATA result1 = base + udata;
6182
UDATA result2 = udata + base;
6183
cout << "IDATA," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
6184
}
6185
base = 0;
6186
udata = 2;
6187
{
6188
UDATA result1 = base + udata;
6189
UDATA result2 = udata + base;
6190
cout << "IDATA," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
6191
}
6192
base = 0x80000000;
6193
udata = 1;
6194
{
6195
UDATA result1 = base + udata;
6196
UDATA result2 = udata + base;
6197
cout << "IDATA," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
6198
}
6199
base = 0x7fffffff;
6200
udata = 1;
6201
{
6202
UDATA result1 = base + udata;
6203
UDATA result2 = udata + base;
6204
cout << "IDATA," << hex << base << ",add,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
6205
}
6206
6207
cout << "SUBSECTION IDATA WITH IDATA" << endl;
6208
base = 0;
6209
idata = 0;
6210
{
6211
IDATA result1 = base + idata;
6212
IDATA result2 = idata + base;
6213
cout << "IDATA," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6214
}
6215
base = 0;
6216
idata = 1;
6217
{
6218
IDATA result1 = base + idata;
6219
IDATA result2 = idata + base;
6220
cout << "IDATA," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6221
}
6222
base = 0;
6223
idata = 2;
6224
{
6225
IDATA result1 = base + idata;
6226
IDATA result2 = idata + base;
6227
cout << "IDATA," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6228
}
6229
base = 0;
6230
idata = -1;
6231
{
6232
IDATA result1 = base + idata;
6233
IDATA result2 = idata + base;
6234
cout << "IDATA," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6235
}
6236
base = 0x80000000;
6237
idata = 1;
6238
{
6239
IDATA result1 = base + idata;
6240
IDATA result2 = idata + base;
6241
cout << "IDATA," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6242
}
6243
base = 0x80000000;
6244
idata = -1;
6245
{
6246
IDATA result1 = base + idata;
6247
IDATA result2 = idata + base;
6248
cout << "IDATA," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6249
}
6250
base = 0x7fffffff;
6251
idata = 1;
6252
{
6253
IDATA result1 = base + idata;
6254
IDATA result2 = idata + base;
6255
cout << "IDATA," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6256
}
6257
base = 0x7fffffff;
6258
idata = -1;
6259
{
6260
IDATA result1 = base + idata;
6261
IDATA result2 = idata + base;
6262
cout << "IDATA," << hex << base << ",add,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6263
}
6264
6265
}
6266
6267
static void testsubIDATA(void)
6268
{
6269
//Locals
6270
IDATA base;
6271
U_8 u_8;
6272
U_16 u_16;
6273
U_32 u_32;
6274
U_64 u_64;
6275
I_16 i_16;
6276
I_32 i_32;
6277
I_64 i_64;
6278
UDATA udata;
6279
IDATA idata;
6280
6281
cout << "START SECTION IDATA sub" << endl;
6282
6283
cout << "SUBSECTION IDATA WITH U_8" << endl;
6284
base = 0;
6285
u_8 = 0;
6286
{
6287
IDATA result1 = base - u_8;
6288
IDATA result2 = u_8 - base;
6289
cout << "IDATA," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6290
}
6291
base = 0;
6292
u_8 = 1;
6293
{
6294
IDATA result1 = base - u_8;
6295
IDATA result2 = u_8 - base;
6296
cout << "IDATA," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6297
}
6298
base = 0;
6299
u_8 = 2;
6300
{
6301
IDATA result1 = base - u_8;
6302
IDATA result2 = u_8 - base;
6303
cout << "IDATA," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6304
}
6305
base = 0x80000000;
6306
u_8 = 1;
6307
{
6308
IDATA result1 = base - u_8;
6309
IDATA result2 = u_8 - base;
6310
cout << "IDATA," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6311
}
6312
base = 0x7fffffff;
6313
u_8 = 1;
6314
{
6315
IDATA result1 = base - u_8;
6316
IDATA result2 = u_8 - base;
6317
cout << "IDATA," << hex << base << ",sub,U_8," << hex << (unsigned int)u_8 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6318
}
6319
6320
cout << "SUBSECTION IDATA WITH U_16" << endl;
6321
base = 0;
6322
u_16 = 0;
6323
{
6324
IDATA result1 = base - u_16;
6325
IDATA result2 = u_16 - base;
6326
cout << "IDATA," << hex << base << ",sub,U_16," << hex << u_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6327
}
6328
base = 0;
6329
u_16 = 1;
6330
{
6331
IDATA result1 = base - u_16;
6332
IDATA result2 = u_16 - base;
6333
cout << "IDATA," << hex << base << ",sub,U_16," << hex << u_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6334
}
6335
base = 0;
6336
u_16 = 2;
6337
{
6338
IDATA result1 = base - u_16;
6339
IDATA result2 = u_16 - base;
6340
cout << "IDATA," << hex << base << ",sub,U_16," << hex << u_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6341
}
6342
base = 0x80000000;
6343
u_16 = 1;
6344
{
6345
IDATA result1 = base - u_16;
6346
IDATA result2 = u_16 - base;
6347
cout << "IDATA," << hex << base << ",sub,U_16," << hex << u_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6348
}
6349
base = 0x7fffffff;
6350
u_16 = 1;
6351
{
6352
IDATA result1 = base - u_16;
6353
IDATA result2 = u_16 - base;
6354
cout << "IDATA," << hex << base << ",sub,U_16," << hex << u_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6355
}
6356
6357
cout << "SUBSECTION IDATA WITH U_32" << endl;
6358
base = 0;
6359
u_32 = 0;
6360
{
6361
IDATA result1 = base - u_32;
6362
IDATA result2 = u_32 - base;
6363
cout << "IDATA," << hex << base << ",sub,U_32," << hex << u_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6364
}
6365
base = 0;
6366
u_32 = 1;
6367
{
6368
IDATA result1 = base - u_32;
6369
IDATA result2 = u_32 - base;
6370
cout << "IDATA," << hex << base << ",sub,U_32," << hex << u_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6371
}
6372
base = 0;
6373
u_32 = 2;
6374
{
6375
IDATA result1 = base - u_32;
6376
IDATA result2 = u_32 - base;
6377
cout << "IDATA," << hex << base << ",sub,U_32," << hex << u_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6378
}
6379
base = 0x80000000;
6380
u_32 = 1;
6381
{
6382
IDATA result1 = base - u_32;
6383
IDATA result2 = u_32 - base;
6384
cout << "IDATA," << hex << base << ",sub,U_32," << hex << u_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6385
}
6386
base = 0x7fffffff;
6387
u_32 = 1;
6388
{
6389
IDATA result1 = base - u_32;
6390
IDATA result2 = u_32 - base;
6391
cout << "IDATA," << hex << base << ",sub,U_32," << hex << u_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6392
}
6393
6394
cout << "SUBSECTION IDATA WITH U_64" << endl;
6395
6396
cout << "INVALID: IDATA,sub,U_64" << endl;
6397
6398
6399
cout << "SUBSECTION IDATA WITH I_16" << endl;
6400
base = 0;
6401
i_16 = 0;
6402
{
6403
IDATA result1 = base - i_16;
6404
IDATA result2 = i_16 - base;
6405
cout << "IDATA," << hex << base << ",sub,I_16," << hex << i_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6406
}
6407
base = 0;
6408
i_16 = 1;
6409
{
6410
IDATA result1 = base - i_16;
6411
IDATA result2 = i_16 - base;
6412
cout << "IDATA," << hex << base << ",sub,I_16," << hex << i_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6413
}
6414
base = 0;
6415
i_16 = 2;
6416
{
6417
IDATA result1 = base - i_16;
6418
IDATA result2 = i_16 - base;
6419
cout << "IDATA," << hex << base << ",sub,I_16," << hex << i_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6420
}
6421
base = 0;
6422
i_16 = -1;
6423
{
6424
IDATA result1 = base - i_16;
6425
IDATA result2 = i_16 - base;
6426
cout << "IDATA," << hex << base << ",sub,I_16," << hex << i_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6427
}
6428
base = 0x80000000;
6429
i_16 = 1;
6430
{
6431
IDATA result1 = base - i_16;
6432
IDATA result2 = i_16 - base;
6433
cout << "IDATA," << hex << base << ",sub,I_16," << hex << i_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6434
}
6435
base = 0x80000000;
6436
i_16 = -1;
6437
{
6438
IDATA result1 = base - i_16;
6439
IDATA result2 = i_16 - base;
6440
cout << "IDATA," << hex << base << ",sub,I_16," << hex << i_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6441
}
6442
base = 0x7fffffff;
6443
i_16 = 1;
6444
{
6445
IDATA result1 = base - i_16;
6446
IDATA result2 = i_16 - base;
6447
cout << "IDATA," << hex << base << ",sub,I_16," << hex << i_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6448
}
6449
base = 0x7fffffff;
6450
i_16 = -1;
6451
{
6452
IDATA result1 = base - i_16;
6453
IDATA result2 = i_16 - base;
6454
cout << "IDATA," << hex << base << ",sub,I_16," << hex << i_16 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6455
}
6456
6457
cout << "SUBSECTION IDATA WITH I_32" << endl;
6458
base = 0;
6459
i_32 = 0;
6460
{
6461
IDATA result1 = base - i_32;
6462
IDATA result2 = i_32 - base;
6463
cout << "IDATA," << hex << base << ",sub,I_32," << hex << i_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6464
}
6465
base = 0;
6466
i_32 = 1;
6467
{
6468
IDATA result1 = base - i_32;
6469
IDATA result2 = i_32 - base;
6470
cout << "IDATA," << hex << base << ",sub,I_32," << hex << i_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6471
}
6472
base = 0;
6473
i_32 = 2;
6474
{
6475
IDATA result1 = base - i_32;
6476
IDATA result2 = i_32 - base;
6477
cout << "IDATA," << hex << base << ",sub,I_32," << hex << i_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6478
}
6479
base = 0;
6480
i_32 = -1;
6481
{
6482
IDATA result1 = base - i_32;
6483
IDATA result2 = i_32 - base;
6484
cout << "IDATA," << hex << base << ",sub,I_32," << hex << i_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6485
}
6486
base = 0x80000000;
6487
i_32 = 1;
6488
{
6489
IDATA result1 = base - i_32;
6490
IDATA result2 = i_32 - base;
6491
cout << "IDATA," << hex << base << ",sub,I_32," << hex << i_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6492
}
6493
base = 0x80000000;
6494
i_32 = -1;
6495
{
6496
IDATA result1 = base - i_32;
6497
IDATA result2 = i_32 - base;
6498
cout << "IDATA," << hex << base << ",sub,I_32," << hex << i_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6499
}
6500
base = 0x7fffffff;
6501
i_32 = 1;
6502
{
6503
IDATA result1 = base - i_32;
6504
IDATA result2 = i_32 - base;
6505
cout << "IDATA," << hex << base << ",sub,I_32," << hex << i_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6506
}
6507
base = 0x7fffffff;
6508
i_32 = -1;
6509
{
6510
IDATA result1 = base - i_32;
6511
IDATA result2 = i_32 - base;
6512
cout << "IDATA," << hex << base << ",sub,I_32," << hex << i_32 << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6513
}
6514
6515
cout << "SUBSECTION IDATA WITH I_64" << endl;
6516
base = 0;
6517
i_64 = 0;
6518
{
6519
I_64 result1 = base - i_64;
6520
I_64 result2 = i_64 - base;
6521
cout << "IDATA," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
6522
}
6523
base = 0;
6524
i_64 = 1;
6525
{
6526
I_64 result1 = base - i_64;
6527
I_64 result2 = i_64 - base;
6528
cout << "IDATA," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
6529
}
6530
base = 0;
6531
i_64 = 2;
6532
{
6533
I_64 result1 = base - i_64;
6534
I_64 result2 = i_64 - base;
6535
cout << "IDATA," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
6536
}
6537
base = 0;
6538
i_64 = -1;
6539
{
6540
I_64 result1 = base - i_64;
6541
I_64 result2 = i_64 - base;
6542
cout << "IDATA," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
6543
}
6544
base = 0x80000000;
6545
i_64 = 1;
6546
{
6547
I_64 result1 = base - i_64;
6548
I_64 result2 = i_64 - base;
6549
cout << "IDATA," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
6550
}
6551
base = 0x80000000;
6552
i_64 = -1;
6553
{
6554
I_64 result1 = base - i_64;
6555
I_64 result2 = i_64 - base;
6556
cout << "IDATA," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
6557
}
6558
base = 0x7fffffff;
6559
i_64 = 1;
6560
{
6561
I_64 result1 = base - i_64;
6562
I_64 result2 = i_64 - base;
6563
cout << "IDATA," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
6564
}
6565
base = 0x7fffffff;
6566
i_64 = -1;
6567
{
6568
I_64 result1 = base - i_64;
6569
I_64 result2 = i_64 - base;
6570
cout << "IDATA," << hex << base << ",sub,I_64," << hex << i_64 << ",I_64," << hex << result1 << "," << hex << result2 << endl;
6571
}
6572
6573
cout << "SUBSECTION IDATA WITH UDATA" << endl;
6574
base = 0;
6575
udata = 0;
6576
{
6577
UDATA result1 = base - udata;
6578
UDATA result2 = udata - base;
6579
cout << "IDATA," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
6580
}
6581
base = 0;
6582
udata = 1;
6583
{
6584
UDATA result1 = base - udata;
6585
UDATA result2 = udata - base;
6586
cout << "IDATA," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
6587
}
6588
base = 0;
6589
udata = 2;
6590
{
6591
UDATA result1 = base - udata;
6592
UDATA result2 = udata - base;
6593
cout << "IDATA," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
6594
}
6595
base = 0x80000000;
6596
udata = 1;
6597
{
6598
UDATA result1 = base - udata;
6599
UDATA result2 = udata - base;
6600
cout << "IDATA," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
6601
}
6602
base = 0x7fffffff;
6603
udata = 1;
6604
{
6605
UDATA result1 = base - udata;
6606
UDATA result2 = udata - base;
6607
cout << "IDATA," << hex << base << ",sub,UDATA," << hex << udata << ",UDATA," << hex << result1 << "," << hex << result2 << endl;
6608
}
6609
6610
cout << "SUBSECTION IDATA WITH IDATA" << endl;
6611
base = 0;
6612
idata = 0;
6613
{
6614
IDATA result1 = base - idata;
6615
IDATA result2 = idata - base;
6616
cout << "IDATA," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6617
}
6618
base = 0;
6619
idata = 1;
6620
{
6621
IDATA result1 = base - idata;
6622
IDATA result2 = idata - base;
6623
cout << "IDATA," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6624
}
6625
base = 0;
6626
idata = 2;
6627
{
6628
IDATA result1 = base - idata;
6629
IDATA result2 = idata - base;
6630
cout << "IDATA," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6631
}
6632
base = 0;
6633
idata = -1;
6634
{
6635
IDATA result1 = base - idata;
6636
IDATA result2 = idata - base;
6637
cout << "IDATA," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6638
}
6639
base = 0x80000000;
6640
idata = 1;
6641
{
6642
IDATA result1 = base - idata;
6643
IDATA result2 = idata - base;
6644
cout << "IDATA," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6645
}
6646
base = 0x80000000;
6647
idata = -1;
6648
{
6649
IDATA result1 = base - idata;
6650
IDATA result2 = idata - base;
6651
cout << "IDATA," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6652
}
6653
base = 0x7fffffff;
6654
idata = 1;
6655
{
6656
IDATA result1 = base - idata;
6657
IDATA result2 = idata - base;
6658
cout << "IDATA," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6659
}
6660
base = 0x7fffffff;
6661
idata = -1;
6662
{
6663
IDATA result1 = base - idata;
6664
IDATA result2 = idata - base;
6665
cout << "IDATA," << hex << base << ",sub,IDATA," << hex << idata << ",IDATA," << hex << result1 << "," << hex << result2 << endl;
6666
}
6667
6668
}
6669
6670
int main(int argc, char * argv[])
6671
{
6672
6673
testaddU_8();
6674
6675
6676
testsubU_8();
6677
6678
6679
testaddU_16();
6680
6681
6682
testsubU_16();
6683
6684
6685
testaddU_32();
6686
6687
6688
testsubU_32();
6689
6690
6691
testaddU_64();
6692
6693
6694
testsubU_64();
6695
6696
6697
testaddI_16();
6698
6699
6700
testsubI_16();
6701
6702
6703
testaddI_32();
6704
6705
6706
testsubI_32();
6707
6708
6709
testaddI_64();
6710
6711
6712
testsubI_64();
6713
6714
6715
testaddUDATA();
6716
6717
6718
testsubUDATA();
6719
6720
6721
testaddIDATA();
6722
6723
6724
testsubIDATA();
6725
6726
6727
return 0;
6728
}
6729
6730
6731