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