2014-12-06 16:42:11 -05:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <assert.h>
|
2015-04-25 22:16:45 -04:00
|
|
|
#include <fenv.h>
|
2020-04-11 16:23:25 -04:00
|
|
|
#include "FpUtils.h"
|
2015-04-25 23:19:12 -04:00
|
|
|
#include "AddTest.h"
|
2020-05-25 12:51:34 -04:00
|
|
|
#include "BranchTest.h"
|
2023-10-19 11:42:31 -04:00
|
|
|
#include "DynamicStallTest.h"
|
2023-10-19 15:26:15 -04:00
|
|
|
#include "DynamicStallTest2.h"
|
2023-05-10 21:08:56 -04:00
|
|
|
#include "FdivEfuMixTest.h"
|
2014-12-06 16:42:11 -05:00
|
|
|
#include "FlagsTest.h"
|
2015-02-16 01:07:17 -05:00
|
|
|
#include "FlagsTest2.h"
|
2020-02-07 09:36:09 -05:00
|
|
|
#include "FlagsTest3.h"
|
2020-06-01 17:42:26 -04:00
|
|
|
#include "FlagsTest4.h"
|
2022-08-18 16:59:08 -04:00
|
|
|
#include "IntBranchDelayTest.h"
|
2022-08-19 10:22:00 -04:00
|
|
|
#include "IntBranchDelayTest2.h"
|
2024-05-24 12:27:00 -04:00
|
|
|
#include "IntBranchDelayTest3.h"
|
2020-04-11 15:11:43 -04:00
|
|
|
#include "MinMaxTest.h"
|
2021-06-03 10:05:53 -04:00
|
|
|
#include "MinMaxFlagsTest.h"
|
2020-02-24 12:54:17 -05:00
|
|
|
#include "StallTest.h"
|
2020-02-26 20:09:18 -05:00
|
|
|
#include "StallTest2.h"
|
2021-01-29 16:33:11 -05:00
|
|
|
#include "StallTest3.h"
|
2021-02-01 14:10:06 -05:00
|
|
|
#include "StallTest4.h"
|
2021-07-23 13:22:18 -04:00
|
|
|
#include "StallTest5.h"
|
2022-08-31 17:50:20 -04:00
|
|
|
#include "StallTest6.h"
|
2015-04-25 22:16:45 -04:00
|
|
|
#include "TriAceTest.h"
|
2014-12-06 16:42:11 -05:00
|
|
|
|
2018-04-30 21:01:23 +01:00
|
|
|
typedef std::function<CTest*()> TestFactoryFunction;
|
2014-12-06 16:42:11 -05:00
|
|
|
|
2020-02-07 09:36:09 -05:00
|
|
|
// clang-format off
|
2014-12-06 16:42:11 -05:00
|
|
|
static const TestFactoryFunction s_factories[] =
|
2020-02-07 09:36:09 -05:00
|
|
|
{
|
|
|
|
[]() { return new CAddTest(); },
|
2020-05-25 12:51:34 -04:00
|
|
|
[]() { return new CBranchTest(); },
|
2023-10-19 11:42:31 -04:00
|
|
|
[]() { return new CDynamicStallTest(); },
|
2023-10-19 15:26:15 -04:00
|
|
|
[]() { return new CDynamicStallTest2(); },
|
2023-05-10 21:08:56 -04:00
|
|
|
[]() { return new CFdivEfuMixTest(); },
|
2020-02-07 09:36:09 -05:00
|
|
|
[]() { return new CFlagsTest(); },
|
|
|
|
[]() { return new CFlagsTest2(); },
|
|
|
|
[]() { return new CFlagsTest3(); },
|
2020-06-01 17:42:26 -04:00
|
|
|
[]() { return new CFlagsTest4(); },
|
2022-08-18 16:59:08 -04:00
|
|
|
[]() { return new CIntBranchDelayTest(); },
|
2022-08-19 10:22:00 -04:00
|
|
|
[]() { return new CIntBranchDelayTest2(); },
|
2024-05-24 12:27:00 -04:00
|
|
|
[]() { return new CIntBranchDelayTest3(); },
|
2020-04-11 15:11:43 -04:00
|
|
|
[]() { return new CMinMaxTest(); },
|
2021-06-03 10:05:53 -04:00
|
|
|
[]() { return new CMinMaxFlagsTest(); },
|
2020-02-24 12:54:17 -05:00
|
|
|
[]() { return new CStallTest(); },
|
2020-02-26 20:09:18 -05:00
|
|
|
[]() { return new CStallTest2(); },
|
2021-01-29 16:33:11 -05:00
|
|
|
[]() { return new CStallTest3(); },
|
2021-02-01 14:10:06 -05:00
|
|
|
[]() { return new CStallTest4(); },
|
2021-07-23 13:22:18 -04:00
|
|
|
[]() { return new CStallTest5(); },
|
2022-08-31 17:50:20 -04:00
|
|
|
[]() { return new CStallTest6(); },
|
2020-02-07 09:36:09 -05:00
|
|
|
[]() { return new CTriAceTest(); },
|
2014-12-06 16:42:11 -05:00
|
|
|
};
|
2020-02-07 09:36:09 -05:00
|
|
|
// clang-format on
|
2014-12-06 16:42:11 -05:00
|
|
|
|
|
|
|
int main(int argc, const char** argv)
|
|
|
|
{
|
2015-04-25 22:16:45 -04:00
|
|
|
fesetround(FE_TOWARDZERO);
|
2020-04-11 16:23:25 -04:00
|
|
|
FpUtils::SetDenormalHandlingMode();
|
2015-04-25 22:16:45 -04:00
|
|
|
|
2020-03-03 17:43:37 -05:00
|
|
|
auto virtualMachine = std::make_unique<CTestVm>();
|
2018-04-30 21:01:23 +01:00
|
|
|
|
2014-12-06 16:42:11 -05:00
|
|
|
for(const auto& factory : s_factories)
|
|
|
|
{
|
2020-03-03 17:43:37 -05:00
|
|
|
virtualMachine->Reset();
|
2014-12-06 16:42:11 -05:00
|
|
|
auto test = factory();
|
2020-03-03 17:43:37 -05:00
|
|
|
test->Execute(*virtualMachine);
|
2014-12-06 16:42:11 -05:00
|
|
|
delete test;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|