Changeset 103049 in vbox
- Timestamp:
- Jan 24, 2024 10:34:06 PM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/testcase/tstIEMAImpl.cpp
r103048 r103049 145 145 #define COUNT_VARIATIONS(a_SubTest) \ 146 146 (1 + ((a_SubTest).idxCpuEflFlavour == g_idxCpuEflFlavour && (a_SubTest).pfnNative) ) 147 148 149 /********************************************************************************************************************************* 150 * Structures and Typedefs * 151 *********************************************************************************************************************************/ 152 typedef struct IEMBINARYOUTPUT 153 { 154 /** The output file. */ 155 RTVFSFILE hVfsFile; 156 /** The stream we write uncompressed binary test data to. */ 157 RTVFSIOSTREAM hVfsUncompressed; 158 /** Write status. */ 159 int rcWrite; 160 /** Set if NULL. */ 161 bool fNull; 162 /** Filename. */ 163 char szFilename[79]; 164 } IEMBINARYOUTPUT; 165 typedef IEMBINARYOUTPUT *PIEMBINARYOUTPUT; 147 166 148 167 … … 980 999 pszName, pszName); 981 1000 } 1001 1002 1003 static bool GenerateBinaryOpen(PIEMBINARYOUTPUT pBinOut, const char *pszFilenameFmt, const char *pszName, 1004 const char *pszCpuType = NULL) 1005 { 1006 pBinOut->hVfsFile = NIL_RTVFSFILE; 1007 pBinOut->hVfsUncompressed = NIL_RTVFSIOSTREAM; 1008 if (pszFilenameFmt) 1009 { 1010 pBinOut->fNull = false; 1011 if (RTStrPrintf2(pBinOut->szFilename, sizeof(pBinOut->szFilename), pszFilenameFmt, pszName, pszCpuType) > 0) 1012 { 1013 RTMsgInfo("GenerateBinaryOpen: %s...\n", pBinOut->szFilename); 1014 pBinOut->rcWrite = RTVfsFileOpenNormal(pBinOut->szFilename, 1015 RTFILE_O_CREATE_REPLACE | RTFILE_O_WRITE | RTFILE_O_DENY_READWRITE, 1016 &pBinOut->hVfsFile); 1017 if (RT_SUCCESS(pBinOut->rcWrite)) 1018 { 1019 RTVFSIOSTREAM hVfsIoFile = RTVfsFileToIoStream(pBinOut->hVfsFile); 1020 if (hVfsIoFile != NIL_RTVFSIOSTREAM) 1021 { 1022 pBinOut->rcWrite = RTZipGzipCompressIoStream(hVfsIoFile, 0 /*fFlags*/, 9, &pBinOut->hVfsUncompressed); 1023 RTVfsIoStrmRelease(hVfsIoFile); 1024 if (RT_SUCCESS(pBinOut->rcWrite)) 1025 { 1026 pBinOut->rcWrite = VINF_SUCCESS; 1027 return true; 1028 } 1029 1030 RTMsgError("RTZipGzipCompressIoStream: %Rrc", pBinOut->rcWrite); 1031 } 1032 else 1033 { 1034 RTMsgError("RTVfsFileToIoStream failed!"); 1035 pBinOut->rcWrite = VERR_VFS_CHAIN_CAST_FAILED; 1036 } 1037 RTVfsFileRelease(pBinOut->hVfsFile); 1038 RTFileDelete(pBinOut->szFilename); 1039 } 1040 else 1041 RTMsgError("Failed to open '%s' for writing: %Rrc", pBinOut->szFilename, pBinOut->rcWrite); 1042 } 1043 else 1044 { 1045 RTMsgError("filename too long: %s + %s + %s", pszFilenameFmt, pszName, pszCpuType); 1046 pBinOut->rcWrite = VERR_BUFFER_OVERFLOW; 1047 } 1048 return false; 1049 } 1050 RTMsgInfo("GenerateBinaryOpen: %s -> /dev/null\n", pszName); 1051 pBinOut->rcWrite = VERR_IGNORED; 1052 pBinOut->fNull = true; 1053 pBinOut->szFilename[0] = '\0'; 1054 return true; 1055 } 1056 1057 1058 static void GenerateBinaryWrite(PIEMBINARYOUTPUT pBinOut, const void *pvData, size_t cbData) 1059 { 1060 if (RT_SUCCESS_NP(pBinOut->rcWrite)) 1061 { 1062 pBinOut->rcWrite = RTVfsIoStrmWrite(pBinOut->hVfsUncompressed, pvData, cbData, true /*fBlocking*/, NULL); 1063 if (RT_SUCCESS(pBinOut->rcWrite)) 1064 return; 1065 RTMsgError("Error writing '%s': %Rrc", pBinOut->szFilename, pBinOut->rcWrite); 1066 } 1067 } 1068 1069 1070 static bool GenerateBinaryClose(PIEMBINARYOUTPUT pBinOut) 1071 { 1072 if (!pBinOut->fNull) 1073 { 1074 /* This is rather jovial about rcWrite. */ 1075 int const rc1 = RTVfsIoStrmFlush(pBinOut->hVfsUncompressed); 1076 RTVfsIoStrmRelease(pBinOut->hVfsUncompressed); 1077 pBinOut->hVfsUncompressed = NIL_RTVFSIOSTREAM; 1078 if (RT_FAILURE(rc1)) 1079 RTMsgError("Error flushing '%s' (uncompressed stream): %Rrc", pBinOut->szFilename, rc1); 1080 1081 int const rc2 = RTVfsFileFlush(pBinOut->hVfsFile); 1082 RTVfsFileRelease(pBinOut->hVfsFile); 1083 pBinOut->hVfsFile = NIL_RTVFSFILE; 1084 if (RT_FAILURE(rc2)) 1085 RTMsgError("Error flushing '%s' (compressed file): %Rrc", pBinOut->szFilename, rc2); 1086 1087 return RT_SUCCESS(rc2) && RT_SUCCESS(rc1) && RT_SUCCESS(pBinOut->rcWrite); 1088 } 1089 return true; 1090 } 1091 982 1092 983 1093 #endif /* TSTIEMAIMPL_WITH_GENERATOR */ … … 4804 4914 PFNIEMAIMPLFPSSEF2U128 const pfn = g_aSseBinaryR32[iFn].pfnNative ? g_aSseBinaryR32[iFn].pfnNative : g_aSseBinaryR32[iFn].pfn; 4805 4915 4806 PRTSTREAM pStrmOut = NULL; 4807 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseBinaryR32[iFn].pszName); 4808 if (RT_FAILURE(rc)) 4809 { 4810 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseBinaryR32[iFn].pszName, rc); 4811 return RTEXITCODE_FAILURE; 4812 } 4916 IEMBINARYOUTPUT BinOut; 4917 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseBinaryR32[iFn].pszName), RTEXITCODE_FAILURE); 4813 4918 4814 4919 uint32_t cNormalInputPairs = 0; … … 4853 4958 TestData.fMxcsrOut = ResM.MXCSR; 4854 4959 TestData.OutVal = ResM.uResult; 4855 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));4960 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 4856 4961 4857 4962 State.MXCSR = State.MXCSR & ~X86_MXCSR_XCPT_MASK; … … 4861 4966 TestData.fMxcsrOut = ResU.MXCSR; 4862 4967 TestData.OutVal = ResU.uResult; 4863 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));4968 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 4864 4969 4865 4970 uint16_t fXcpt = (ResM.MXCSR | ResU.MXCSR) & X86_MXCSR_XCPT_FLAGS; … … 4872 4977 TestData.fMxcsrOut = Res1.MXCSR; 4873 4978 TestData.OutVal = Res1.uResult; 4874 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));4979 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 4875 4980 4876 4981 if (((Res1.MXCSR & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (Res1.MXCSR & X86_MXCSR_XCPT_FLAGS)) … … 4883 4988 TestData.fMxcsrOut = Res2.MXCSR; 4884 4989 TestData.OutVal = Res2.uResult; 4885 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));4990 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 4886 4991 } 4887 4992 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 4895 5000 TestData.fMxcsrOut = Res3.MXCSR; 4896 5001 TestData.OutVal = Res3.uResult; 4897 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5002 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 4898 5003 } 4899 5004 } 4900 5005 } 4901 5006 } 4902 rc = RTStrmClose(pStrmOut); 4903 if (RT_FAILURE(rc)) 4904 { 4905 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseBinaryR32[iFn].pszName, rc); 4906 return RTEXITCODE_FAILURE; 4907 } 5007 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 4908 5008 } 4909 5009 … … 5003 5103 PFNIEMAIMPLFPSSEF2U128 const pfn = g_aSseBinaryR64[iFn].pfnNative ? g_aSseBinaryR64[iFn].pfnNative : g_aSseBinaryR64[iFn].pfn; 5004 5104 5005 PRTSTREAM pStrmOut = NULL; 5006 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseBinaryR64[iFn].pszName); 5007 if (RT_FAILURE(rc)) 5008 { 5009 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseBinaryR64[iFn].pszName, rc); 5010 return RTEXITCODE_FAILURE; 5011 } 5105 IEMBINARYOUTPUT BinOut; 5106 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseBinaryR64[iFn].pszName), RTEXITCODE_FAILURE); 5012 5107 5013 5108 uint32_t cNormalInputPairs = 0; … … 5045 5140 TestData.fMxcsrOut = ResM.MXCSR; 5046 5141 TestData.OutVal = ResM.uResult; 5047 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5142 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5048 5143 5049 5144 State.MXCSR = State.MXCSR & ~X86_MXCSR_XCPT_MASK; … … 5053 5148 TestData.fMxcsrOut = ResU.MXCSR; 5054 5149 TestData.OutVal = ResU.uResult; 5055 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5150 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5056 5151 5057 5152 uint16_t fXcpt = (ResM.MXCSR | ResU.MXCSR) & X86_MXCSR_XCPT_FLAGS; … … 5064 5159 TestData.fMxcsrOut = Res1.MXCSR; 5065 5160 TestData.OutVal = Res1.uResult; 5066 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5161 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5067 5162 5068 5163 if (((Res1.MXCSR & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (Res1.MXCSR & X86_MXCSR_XCPT_FLAGS)) … … 5075 5170 TestData.fMxcsrOut = Res2.MXCSR; 5076 5171 TestData.OutVal = Res2.uResult; 5077 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5172 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5078 5173 } 5079 5174 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 5087 5182 TestData.fMxcsrOut = Res3.MXCSR; 5088 5183 TestData.OutVal = Res3.uResult; 5089 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5184 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5090 5185 } 5091 5186 } 5092 5187 } 5093 5188 } 5094 rc = RTStrmClose(pStrmOut); 5095 if (RT_FAILURE(rc)) 5096 { 5097 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseBinaryR64[iFn].pszName, rc); 5098 return RTEXITCODE_FAILURE; 5099 } 5189 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 5100 5190 } 5101 5191 … … 5187 5277 PFNIEMAIMPLFPSSEF2U128R32 const pfn = g_aSseBinaryU128R32[iFn].pfnNative ? g_aSseBinaryU128R32[iFn].pfnNative : g_aSseBinaryU128R32[iFn].pfn; 5188 5278 5189 PRTSTREAM pStrmOut = NULL; 5190 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseBinaryU128R32[iFn].pszName); 5191 if (RT_FAILURE(rc)) 5192 { 5193 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseBinaryU128R32[iFn].pszName, rc); 5194 return RTEXITCODE_FAILURE; 5195 } 5279 IEMBINARYOUTPUT BinOut; 5280 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseBinaryU128R32[iFn].pszName), RTEXITCODE_FAILURE); 5196 5281 5197 5282 uint32_t cNormalInputPairs = 0; … … 5234 5319 TestData.fMxcsrOut = ResM.MXCSR; 5235 5320 TestData.OutVal = ResM.uResult; 5236 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5321 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5237 5322 5238 5323 State.MXCSR = State.MXCSR & ~X86_MXCSR_XCPT_MASK; … … 5242 5327 TestData.fMxcsrOut = ResU.MXCSR; 5243 5328 TestData.OutVal = ResU.uResult; 5244 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5329 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5245 5330 5246 5331 uint16_t fXcpt = (ResM.MXCSR | ResU.MXCSR) & X86_MXCSR_XCPT_FLAGS; … … 5253 5338 TestData.fMxcsrOut = Res1.MXCSR; 5254 5339 TestData.OutVal = Res1.uResult; 5255 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5340 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5256 5341 5257 5342 if (((Res1.MXCSR & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (Res1.MXCSR & X86_MXCSR_XCPT_FLAGS)) … … 5264 5349 TestData.fMxcsrOut = Res2.MXCSR; 5265 5350 TestData.OutVal = Res2.uResult; 5266 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5351 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5267 5352 } 5268 5353 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 5276 5361 TestData.fMxcsrOut = Res3.MXCSR; 5277 5362 TestData.OutVal = Res3.uResult; 5278 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5363 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5279 5364 } 5280 5365 } 5281 5366 } 5282 5367 } 5283 rc = RTStrmClose(pStrmOut); 5284 if (RT_FAILURE(rc)) 5285 { 5286 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseBinaryU128R32[iFn].pszName, rc); 5287 return RTEXITCODE_FAILURE; 5288 } 5368 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 5289 5369 } 5290 5370 … … 5378 5458 PFNIEMAIMPLFPSSEF2U128R64 const pfn = g_aSseBinaryU128R64[iFn].pfnNative ? g_aSseBinaryU128R64[iFn].pfnNative : g_aSseBinaryU128R64[iFn].pfn; 5379 5459 5380 PRTSTREAM pStrmOut = NULL; 5381 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseBinaryU128R64[iFn].pszName); 5382 if (RT_FAILURE(rc)) 5383 { 5384 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseBinaryU128R64[iFn].pszName, rc); 5385 return RTEXITCODE_FAILURE; 5386 } 5460 IEMBINARYOUTPUT BinOut; 5461 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseBinaryU128R64[iFn].pszName), RTEXITCODE_FAILURE); 5387 5462 5388 5463 uint32_t cNormalInputPairs = 0; … … 5419 5494 TestData.fMxcsrOut = ResM.MXCSR; 5420 5495 TestData.OutVal = ResM.uResult; 5421 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5496 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5422 5497 5423 5498 State.MXCSR = State.MXCSR & ~X86_MXCSR_XCPT_MASK; … … 5427 5502 TestData.fMxcsrOut = ResU.MXCSR; 5428 5503 TestData.OutVal = ResU.uResult; 5429 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5504 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5430 5505 5431 5506 uint16_t fXcpt = (ResM.MXCSR | ResU.MXCSR) & X86_MXCSR_XCPT_FLAGS; … … 5438 5513 TestData.fMxcsrOut = Res1.MXCSR; 5439 5514 TestData.OutVal = Res1.uResult; 5440 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5515 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5441 5516 5442 5517 if (((Res1.MXCSR & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (Res1.MXCSR & X86_MXCSR_XCPT_FLAGS)) … … 5449 5524 TestData.fMxcsrOut = Res2.MXCSR; 5450 5525 TestData.OutVal = Res2.uResult; 5451 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5526 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5452 5527 } 5453 5528 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 5461 5536 TestData.fMxcsrOut = Res3.MXCSR; 5462 5537 TestData.OutVal = Res3.uResult; 5463 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5538 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5464 5539 } 5465 5540 } 5466 5541 } 5467 5542 } 5468 rc = RTStrmClose(pStrmOut); 5469 if (RT_FAILURE(rc)) 5470 { 5471 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseBinaryU128R64[iFn].pszName, rc); 5472 return RTEXITCODE_FAILURE; 5473 } 5543 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 5474 5544 } 5475 5545 … … 5554 5624 PFNIEMAIMPLSSEF2I32U64 const pfn = g_aSseBinaryI32R64[iFn].pfnNative ? g_aSseBinaryI32R64[iFn].pfnNative : g_aSseBinaryI32R64[iFn].pfn; 5555 5625 5556 PRTSTREAM pStrmOut = NULL; 5557 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseBinaryI32R64[iFn].pszName); 5558 if (RT_FAILURE(rc)) 5559 { 5560 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseBinaryI32R64[iFn].pszName, rc); 5561 return RTEXITCODE_FAILURE; 5562 } 5626 IEMBINARYOUTPUT BinOut; 5627 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseBinaryI32R64[iFn].pszName), RTEXITCODE_FAILURE); 5563 5628 5564 5629 uint32_t cNormalInputPairs = 0; … … 5592 5657 TestData.fMxcsrOut = fMxcsrM; 5593 5658 TestData.i32ValOut = i32OutM; 5594 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5659 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5595 5660 5596 5661 State.MXCSR = State.MXCSR & ~X86_MXCSR_XCPT_MASK; … … 5600 5665 TestData.fMxcsrOut = fMxcsrU; 5601 5666 TestData.i32ValOut = i32OutU; 5602 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5667 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5603 5668 5604 5669 uint16_t fXcpt = (fMxcsrM | fMxcsrU) & X86_MXCSR_XCPT_FLAGS; … … 5611 5676 TestData.fMxcsrOut = fMxcsr1; 5612 5677 TestData.i32ValOut = i32Out1; 5613 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5678 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5614 5679 5615 5680 if (((fMxcsr1 & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (fMxcsr1 & X86_MXCSR_XCPT_FLAGS)) … … 5622 5687 TestData.fMxcsrOut = fMxcsr2; 5623 5688 TestData.i32ValOut = i32Out2; 5624 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5689 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5625 5690 } 5626 5691 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 5634 5699 TestData.fMxcsrOut = fMxcsr3; 5635 5700 TestData.i32ValOut = i32Out3; 5636 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5701 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5637 5702 } 5638 5703 } 5639 5704 } 5640 5705 } 5641 rc = RTStrmClose(pStrmOut); 5642 if (RT_FAILURE(rc)) 5643 { 5644 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseBinaryI32R64[iFn].pszName, rc); 5645 return RTEXITCODE_FAILURE; 5646 } 5706 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 5647 5707 } 5648 5708 … … 5723 5783 PFNIEMAIMPLSSEF2I64U64 const pfn = g_aSseBinaryI64R64[iFn].pfnNative ? g_aSseBinaryI64R64[iFn].pfnNative : g_aSseBinaryI64R64[iFn].pfn; 5724 5784 5725 PRTSTREAM pStrmOut = NULL; 5726 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseBinaryI64R64[iFn].pszName); 5727 if (RT_FAILURE(rc)) 5728 { 5729 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseBinaryI64R64[iFn].pszName, rc); 5730 return RTEXITCODE_FAILURE; 5731 } 5785 IEMBINARYOUTPUT BinOut; 5786 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseBinaryI64R64[iFn].pszName), RTEXITCODE_FAILURE); 5732 5787 5733 5788 uint32_t cNormalInputPairs = 0; … … 5761 5816 TestData.fMxcsrOut = fMxcsrM; 5762 5817 TestData.i64ValOut = i64OutM; 5763 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5818 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5764 5819 5765 5820 State.MXCSR = State.MXCSR & ~X86_MXCSR_XCPT_MASK; … … 5769 5824 TestData.fMxcsrOut = fMxcsrU; 5770 5825 TestData.i64ValOut = i64OutU; 5771 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5826 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5772 5827 5773 5828 uint16_t fXcpt = (fMxcsrM | fMxcsrU) & X86_MXCSR_XCPT_FLAGS; … … 5780 5835 TestData.fMxcsrOut = fMxcsr1; 5781 5836 TestData.i64ValOut = i64Out1; 5782 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5837 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5783 5838 5784 5839 if (((fMxcsr1 & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (fMxcsr1 & X86_MXCSR_XCPT_FLAGS)) … … 5791 5846 TestData.fMxcsrOut = fMxcsr2; 5792 5847 TestData.i64ValOut = i64Out2; 5793 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5848 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5794 5849 } 5795 5850 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 5803 5858 TestData.fMxcsrOut = fMxcsr3; 5804 5859 TestData.i64ValOut = i64Out3; 5805 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5860 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5806 5861 } 5807 5862 } 5808 5863 } 5809 5864 } 5810 rc = RTStrmClose(pStrmOut); 5811 if (RT_FAILURE(rc)) 5812 { 5813 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseBinaryI64R64[iFn].pszName, rc); 5814 return RTEXITCODE_FAILURE; 5815 } 5865 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 5816 5866 } 5817 5867 … … 5892 5942 PFNIEMAIMPLSSEF2I32U32 const pfn = g_aSseBinaryI32R32[iFn].pfnNative ? g_aSseBinaryI32R32[iFn].pfnNative : g_aSseBinaryI32R32[iFn].pfn; 5893 5943 5894 PRTSTREAM pStrmOut = NULL; 5895 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseBinaryI32R32[iFn].pszName); 5896 if (RT_FAILURE(rc)) 5897 { 5898 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseBinaryI32R32[iFn].pszName, rc); 5899 return RTEXITCODE_FAILURE; 5900 } 5944 IEMBINARYOUTPUT BinOut; 5945 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseBinaryI32R32[iFn].pszName), RTEXITCODE_FAILURE); 5901 5946 5902 5947 uint32_t cNormalInputPairs = 0; … … 5930 5975 TestData.fMxcsrOut = fMxcsrM; 5931 5976 TestData.i32ValOut = i32OutM; 5932 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5977 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5933 5978 5934 5979 State.MXCSR = State.MXCSR & ~X86_MXCSR_XCPT_MASK; … … 5938 5983 TestData.fMxcsrOut = fMxcsrU; 5939 5984 TestData.i32ValOut = i32OutU; 5940 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5985 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5941 5986 5942 5987 uint16_t fXcpt = (fMxcsrM | fMxcsrU) & X86_MXCSR_XCPT_FLAGS; … … 5949 5994 TestData.fMxcsrOut = fMxcsr1; 5950 5995 TestData.i32ValOut = i32Out1; 5951 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));5996 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5952 5997 5953 5998 if (((fMxcsr1 & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (fMxcsr1 & X86_MXCSR_XCPT_FLAGS)) … … 5960 6005 TestData.fMxcsrOut = fMxcsr2; 5961 6006 TestData.i32ValOut = i32Out2; 5962 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6007 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5963 6008 } 5964 6009 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 5972 6017 TestData.fMxcsrOut = fMxcsr3; 5973 6018 TestData.i32ValOut = i32Out3; 5974 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6019 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 5975 6020 } 5976 6021 } 5977 6022 } 5978 6023 } 5979 rc = RTStrmClose(pStrmOut); 5980 if (RT_FAILURE(rc)) 5981 { 5982 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseBinaryI32R32[iFn].pszName, rc); 5983 return RTEXITCODE_FAILURE; 5984 } 6024 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 5985 6025 } 5986 6026 … … 6061 6101 PFNIEMAIMPLSSEF2I64U32 const pfn = g_aSseBinaryI64R32[iFn].pfnNative ? g_aSseBinaryI64R32[iFn].pfnNative : g_aSseBinaryI64R32[iFn].pfn; 6062 6102 6063 PRTSTREAM pStrmOut = NULL; 6064 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseBinaryI64R32[iFn].pszName); 6065 if (RT_FAILURE(rc)) 6066 { 6067 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseBinaryI64R32[iFn].pszName, rc); 6068 return RTEXITCODE_FAILURE; 6069 } 6103 IEMBINARYOUTPUT BinOut; 6104 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseBinaryI64R32[iFn].pszName), RTEXITCODE_FAILURE); 6070 6105 6071 6106 uint32_t cNormalInputPairs = 0; … … 6099 6134 TestData.fMxcsrOut = fMxcsrM; 6100 6135 TestData.i64ValOut = i64OutM; 6101 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6136 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6102 6137 6103 6138 State.MXCSR = State.MXCSR & ~X86_MXCSR_XCPT_MASK; … … 6107 6142 TestData.fMxcsrOut = fMxcsrU; 6108 6143 TestData.i64ValOut = i64OutU; 6109 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6144 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6110 6145 6111 6146 uint16_t fXcpt = (fMxcsrM | fMxcsrU) & X86_MXCSR_XCPT_FLAGS; … … 6118 6153 TestData.fMxcsrOut = fMxcsr1; 6119 6154 TestData.i64ValOut = i64Out1; 6120 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6155 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6121 6156 6122 6157 if (((fMxcsr1 & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (fMxcsr1 & X86_MXCSR_XCPT_FLAGS)) … … 6129 6164 TestData.fMxcsrOut = fMxcsr2; 6130 6165 TestData.i64ValOut = i64Out2; 6131 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6166 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6132 6167 } 6133 6168 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 6141 6176 TestData.fMxcsrOut = fMxcsr3; 6142 6177 TestData.i64ValOut = i64Out3; 6143 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6178 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6144 6179 } 6145 6180 } 6146 6181 } 6147 6182 } 6148 rc = RTStrmClose(pStrmOut); 6149 if (RT_FAILURE(rc)) 6150 { 6151 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseBinaryI64R32[iFn].pszName, rc); 6152 return RTEXITCODE_FAILURE; 6153 } 6183 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 6154 6184 } 6155 6185 … … 6229 6259 PFNIEMAIMPLSSEF2R64I32 const pfn = g_aSseBinaryR64I32[iFn].pfnNative ? g_aSseBinaryR64I32[iFn].pfnNative : g_aSseBinaryR64I32[iFn].pfn; 6230 6260 6231 PRTSTREAM pStrmOut = NULL; 6232 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseBinaryR64I32[iFn].pszName); 6233 if (RT_FAILURE(rc)) 6234 { 6235 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseBinaryR64I32[iFn].pszName, rc); 6236 return RTEXITCODE_FAILURE; 6237 } 6261 IEMBINARYOUTPUT BinOut; 6262 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseBinaryR64I32[iFn].pszName), RTEXITCODE_FAILURE); 6238 6263 6239 6264 for (uint32_t iTest = 0; iTest < cTests + RT_ELEMENTS(s_aSpecials); iTest += 1) … … 6258 6283 TestData.fMxcsrOut = fMxcsrM; 6259 6284 TestData.r64ValOut = r64OutM; 6260 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6285 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6261 6286 6262 6287 State.MXCSR = State.MXCSR & ~X86_MXCSR_XCPT_MASK; … … 6266 6291 TestData.fMxcsrOut = fMxcsrU; 6267 6292 TestData.r64ValOut = r64OutU; 6268 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6293 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6269 6294 6270 6295 uint16_t fXcpt = (fMxcsrM | fMxcsrU) & X86_MXCSR_XCPT_FLAGS; … … 6277 6302 TestData.fMxcsrOut = fMxcsr1; 6278 6303 TestData.r64ValOut = r64Out1; 6279 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6304 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6280 6305 6281 6306 if (((fMxcsr1 & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (fMxcsr1 & X86_MXCSR_XCPT_FLAGS)) … … 6288 6313 TestData.fMxcsrOut = fMxcsr2; 6289 6314 TestData.r64ValOut = r64Out2; 6290 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6315 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6291 6316 } 6292 6317 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 6300 6325 TestData.fMxcsrOut = fMxcsr3; 6301 6326 TestData.r64ValOut = r64Out3; 6302 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6327 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6303 6328 } 6304 6329 } 6305 6330 } 6306 6331 } 6307 rc = RTStrmClose(pStrmOut); 6308 if (RT_FAILURE(rc)) 6309 { 6310 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseBinaryR64I32[iFn].pszName, rc); 6311 return RTEXITCODE_FAILURE; 6312 } 6332 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 6313 6333 } 6314 6334 … … 6388 6408 PFNIEMAIMPLSSEF2R64I64 const pfn = g_aSseBinaryR64I64[iFn].pfnNative ? g_aSseBinaryR64I64[iFn].pfnNative : g_aSseBinaryR64I64[iFn].pfn; 6389 6409 6390 PRTSTREAM pStrmOut = NULL; 6391 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseBinaryR64I64[iFn].pszName); 6392 if (RT_FAILURE(rc)) 6393 { 6394 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseBinaryR64I64[iFn].pszName, rc); 6395 return RTEXITCODE_FAILURE; 6396 } 6410 IEMBINARYOUTPUT BinOut; 6411 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseBinaryR64I64[iFn].pszName), RTEXITCODE_FAILURE); 6397 6412 6398 6413 for (uint32_t iTest = 0; iTest < cTests + RT_ELEMENTS(s_aSpecials); iTest += 1) … … 6417 6432 TestData.fMxcsrOut = fMxcsrM; 6418 6433 TestData.r64ValOut = r64OutM; 6419 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6434 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6420 6435 6421 6436 State.MXCSR = State.MXCSR & ~X86_MXCSR_XCPT_MASK; … … 6425 6440 TestData.fMxcsrOut = fMxcsrU; 6426 6441 TestData.r64ValOut = r64OutU; 6427 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6442 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6428 6443 6429 6444 uint16_t fXcpt = (fMxcsrM | fMxcsrU) & X86_MXCSR_XCPT_FLAGS; … … 6436 6451 TestData.fMxcsrOut = fMxcsr1; 6437 6452 TestData.r64ValOut = r64Out1; 6438 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6453 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6439 6454 6440 6455 if (((fMxcsr1 & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (fMxcsr1 & X86_MXCSR_XCPT_FLAGS)) … … 6447 6462 TestData.fMxcsrOut = fMxcsr2; 6448 6463 TestData.r64ValOut = r64Out2; 6449 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6464 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6450 6465 } 6451 6466 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 6459 6474 TestData.fMxcsrOut = fMxcsr3; 6460 6475 TestData.r64ValOut = r64Out3; 6461 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6476 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6462 6477 } 6463 6478 } 6464 6479 } 6465 6480 } 6466 rc = RTStrmClose(pStrmOut); 6467 if (RT_FAILURE(rc)) 6468 { 6469 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseBinaryR64I64[iFn].pszName, rc); 6470 return RTEXITCODE_FAILURE; 6471 } 6481 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 6472 6482 } 6473 6483 … … 6547 6557 PFNIEMAIMPLSSEF2R32I32 const pfn = g_aSseBinaryR32I32[iFn].pfnNative ? g_aSseBinaryR32I32[iFn].pfnNative : g_aSseBinaryR32I32[iFn].pfn; 6548 6558 6549 PRTSTREAM pStrmOut = NULL; 6550 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseBinaryR32I32[iFn].pszName); 6551 if (RT_FAILURE(rc)) 6552 { 6553 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseBinaryR32I32[iFn].pszName, rc); 6554 return RTEXITCODE_FAILURE; 6555 } 6559 IEMBINARYOUTPUT BinOut; 6560 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseBinaryR32I32[iFn].pszName), RTEXITCODE_FAILURE); 6556 6561 6557 6562 for (uint32_t iTest = 0; iTest < cTests + RT_ELEMENTS(s_aSpecials); iTest += 1) … … 6576 6581 TestData.fMxcsrOut = fMxcsrM; 6577 6582 TestData.r32ValOut = r32OutM; 6578 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6583 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6579 6584 6580 6585 State.MXCSR = State.MXCSR & ~X86_MXCSR_XCPT_MASK; … … 6584 6589 TestData.fMxcsrOut = fMxcsrU; 6585 6590 TestData.r32ValOut = r32OutU; 6586 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6591 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6587 6592 6588 6593 uint16_t fXcpt = (fMxcsrM | fMxcsrU) & X86_MXCSR_XCPT_FLAGS; … … 6595 6600 TestData.fMxcsrOut = fMxcsr1; 6596 6601 TestData.r32ValOut = r32Out1; 6597 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6602 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6598 6603 6599 6604 if (((fMxcsr1 & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (fMxcsr1 & X86_MXCSR_XCPT_FLAGS)) … … 6606 6611 TestData.fMxcsrOut = fMxcsr2; 6607 6612 TestData.r32ValOut = r32Out2; 6608 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6613 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6609 6614 } 6610 6615 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 6618 6623 TestData.fMxcsrOut = fMxcsr3; 6619 6624 TestData.r32ValOut = r32Out3; 6620 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6625 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6621 6626 } 6622 6627 } 6623 6628 } 6624 6629 } 6625 rc = RTStrmClose(pStrmOut); 6626 if (RT_FAILURE(rc)) 6627 { 6628 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseBinaryR32I32[iFn].pszName, rc); 6629 return RTEXITCODE_FAILURE; 6630 } 6630 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 6631 6631 } 6632 6632 … … 6706 6706 PFNIEMAIMPLSSEF2R32I64 const pfn = g_aSseBinaryR32I64[iFn].pfnNative ? g_aSseBinaryR32I64[iFn].pfnNative : g_aSseBinaryR32I64[iFn].pfn; 6707 6707 6708 PRTSTREAM pStrmOut = NULL; 6709 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseBinaryR32I64[iFn].pszName); 6710 if (RT_FAILURE(rc)) 6711 { 6712 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseBinaryR32I64[iFn].pszName, rc); 6713 return RTEXITCODE_FAILURE; 6714 } 6708 IEMBINARYOUTPUT BinOut; 6709 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseBinaryR32I64[iFn].pszName), RTEXITCODE_FAILURE); 6715 6710 6716 6711 for (uint32_t iTest = 0; iTest < cTests + RT_ELEMENTS(s_aSpecials); iTest += 1) … … 6735 6730 TestData.fMxcsrOut = fMxcsrM; 6736 6731 TestData.r32ValOut = r32OutM; 6737 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6732 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6738 6733 6739 6734 State.MXCSR = State.MXCSR & ~X86_MXCSR_XCPT_MASK; … … 6743 6738 TestData.fMxcsrOut = fMxcsrU; 6744 6739 TestData.r32ValOut = r32OutU; 6745 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6740 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6746 6741 6747 6742 uint16_t fXcpt = (fMxcsrM | fMxcsrU) & X86_MXCSR_XCPT_FLAGS; … … 6754 6749 TestData.fMxcsrOut = fMxcsr1; 6755 6750 TestData.r32ValOut = r32Out1; 6756 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6751 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6757 6752 6758 6753 if (((fMxcsr1 & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (fMxcsr1 & X86_MXCSR_XCPT_FLAGS)) … … 6765 6760 TestData.fMxcsrOut = fMxcsr2; 6766 6761 TestData.r32ValOut = r32Out2; 6767 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6762 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6768 6763 } 6769 6764 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 6777 6772 TestData.fMxcsrOut = fMxcsr3; 6778 6773 TestData.r32ValOut = r32Out3; 6779 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6774 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6780 6775 } 6781 6776 } 6782 6777 } 6783 6778 } 6784 rc = RTStrmClose(pStrmOut); 6785 if (RT_FAILURE(rc)) 6786 { 6787 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseBinaryR32I64[iFn].pszName, rc); 6788 return RTEXITCODE_FAILURE; 6789 } 6779 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 6790 6780 } 6791 6781 … … 6873 6863 PFNIEMAIMPLF2EFLMXCSR128 const pfn = g_aSseCompareEflR32R32[iFn].pfnNative ? g_aSseCompareEflR32R32[iFn].pfnNative : g_aSseCompareEflR32R32[iFn].pfn; 6874 6864 6875 PRTSTREAM pStrmOut = NULL; 6876 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseCompareEflR32R32[iFn].pszName); 6877 if (RT_FAILURE(rc)) 6878 { 6879 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseCompareEflR32R32[iFn].pszName, rc); 6880 return RTEXITCODE_FAILURE; 6881 } 6865 IEMBINARYOUTPUT BinOut; 6866 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseCompareEflR32R32[iFn].pszName), RTEXITCODE_FAILURE); 6882 6867 6883 6868 uint32_t cNormalInputPairs = 0; … … 6921 6906 TestData.fEflIn = fEFlags; 6922 6907 TestData.fEflOut = fEFlagsM; 6923 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6908 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6924 6909 6925 6910 fMxcsrIn &= ~X86_MXCSR_XCPT_MASK; … … 6931 6916 TestData.fEflIn = fEFlags; 6932 6917 TestData.fEflOut = fEFlagsU; 6933 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6918 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6934 6919 6935 6920 uint16_t fXcpt = (fMxcsrM | fMxcsrU) & X86_MXCSR_XCPT_FLAGS; … … 6944 6929 TestData.fEflIn = fEFlags; 6945 6930 TestData.fEflOut = fEFlags1; 6946 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6931 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6947 6932 6948 6933 if (((fMxcsr1 & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (fMxcsr1 & X86_MXCSR_XCPT_FLAGS)) … … 6957 6942 TestData.fEflIn = fEFlags; 6958 6943 TestData.fEflOut = fEFlags2; 6959 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6944 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6960 6945 } 6961 6946 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 6971 6956 TestData.fEflIn = fEFlags; 6972 6957 TestData.fEflOut = fEFlags3; 6973 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));6958 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 6974 6959 } 6975 6960 } 6976 6961 } 6977 6962 } 6978 rc = RTStrmClose(pStrmOut); 6979 if (RT_FAILURE(rc)) 6980 { 6981 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseCompareEflR32R32[iFn].pszName, rc); 6982 return RTEXITCODE_FAILURE; 6983 } 6963 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 6984 6964 } 6985 6965 … … 7066 7046 PFNIEMAIMPLF2EFLMXCSR128 const pfn = g_aSseCompareEflR64R64[iFn].pfnNative ? g_aSseCompareEflR64R64[iFn].pfnNative : g_aSseCompareEflR64R64[iFn].pfn; 7067 7047 7068 PRTSTREAM pStrmOut = NULL; 7069 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseCompareEflR64R64[iFn].pszName); 7070 if (RT_FAILURE(rc)) 7071 { 7072 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseCompareEflR64R64[iFn].pszName, rc); 7073 return RTEXITCODE_FAILURE; 7074 } 7048 IEMBINARYOUTPUT BinOut; 7049 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseCompareEflR64R64[iFn].pszName), RTEXITCODE_FAILURE); 7075 7050 7076 7051 uint32_t cNormalInputPairs = 0; … … 7114 7089 TestData.fEflIn = fEFlags; 7115 7090 TestData.fEflOut = fEFlagsM; 7116 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7091 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7117 7092 7118 7093 fMxcsrIn &= ~X86_MXCSR_XCPT_MASK; … … 7124 7099 TestData.fEflIn = fEFlags; 7125 7100 TestData.fEflOut = fEFlagsU; 7126 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7101 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7127 7102 7128 7103 uint16_t fXcpt = (fMxcsrM | fMxcsrU) & X86_MXCSR_XCPT_FLAGS; … … 7137 7112 TestData.fEflIn = fEFlags; 7138 7113 TestData.fEflOut = fEFlags1; 7139 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7114 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7140 7115 7141 7116 if (((fMxcsr1 & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (fMxcsr1 & X86_MXCSR_XCPT_FLAGS)) … … 7150 7125 TestData.fEflIn = fEFlags; 7151 7126 TestData.fEflOut = fEFlags2; 7152 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7127 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7153 7128 } 7154 7129 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 7164 7139 TestData.fEflIn = fEFlags; 7165 7140 TestData.fEflOut = fEFlags3; 7166 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7141 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7167 7142 } 7168 7143 } 7169 7144 } 7170 7145 } 7171 rc = RTStrmClose(pStrmOut); 7172 if (RT_FAILURE(rc)) 7173 { 7174 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseCompareEflR64R64[iFn].pszName, rc); 7175 return RTEXITCODE_FAILURE; 7176 } 7146 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 7177 7147 } 7178 7148 … … 7260 7230 PFNIEMAIMPLMXCSRF2XMMIMM8 const pfn = g_aSseCompareF2XmmR32Imm8[iFn].pfnNative ? g_aSseCompareF2XmmR32Imm8[iFn].pfnNative : g_aSseCompareF2XmmR32Imm8[iFn].pfn; 7261 7231 7262 PRTSTREAM pStrmOut = NULL; 7263 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseCompareF2XmmR32Imm8[iFn].pszName); 7264 if (RT_FAILURE(rc)) 7265 { 7266 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseCompareF2XmmR32Imm8[iFn].pszName, rc); 7267 return RTEXITCODE_FAILURE; 7268 } 7232 IEMBINARYOUTPUT BinOut; 7233 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseCompareF2XmmR32Imm8[iFn].pszName), RTEXITCODE_FAILURE); 7269 7234 7270 7235 uint32_t cNormalInputPairs = 0; … … 7319 7284 TestData.bImm = bImm; 7320 7285 TestData.OutVal = ResM; 7321 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7286 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7322 7287 7323 7288 fMxcsrIn &= ~X86_MXCSR_XCPT_MASK; … … 7329 7294 TestData.bImm = bImm; 7330 7295 TestData.OutVal = ResU; 7331 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7296 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7332 7297 7333 7298 uint16_t fXcpt = (fMxcsrM | fMxcsrU) & X86_MXCSR_XCPT_FLAGS; … … 7342 7307 TestData.bImm = bImm; 7343 7308 TestData.OutVal = Res1; 7344 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7309 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7345 7310 7346 7311 if (((fMxcsr1 & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (fMxcsr1 & X86_MXCSR_XCPT_FLAGS)) … … 7355 7320 TestData.bImm = bImm; 7356 7321 TestData.OutVal = Res2; 7357 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7322 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7358 7323 } 7359 7324 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 7369 7334 TestData.bImm = bImm; 7370 7335 TestData.OutVal = Res3; 7371 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7336 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7372 7337 } 7373 7338 } 7374 7339 } 7375 7340 } 7376 rc = RTStrmClose(pStrmOut); 7377 if (RT_FAILURE(rc)) 7378 { 7379 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseCompareF2XmmR32Imm8[iFn].pszName, rc); 7380 return RTEXITCODE_FAILURE; 7381 } 7341 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 7382 7342 } 7383 7343 … … 7472 7432 PFNIEMAIMPLMXCSRF2XMMIMM8 const pfn = g_aSseCompareF2XmmR64Imm8[iFn].pfnNative ? g_aSseCompareF2XmmR64Imm8[iFn].pfnNative : g_aSseCompareF2XmmR64Imm8[iFn].pfn; 7473 7433 7474 PRTSTREAM pStrmOut = NULL; 7475 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseCompareF2XmmR64Imm8[iFn].pszName); 7476 if (RT_FAILURE(rc)) 7477 { 7478 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseCompareF2XmmR64Imm8[iFn].pszName, rc); 7479 return RTEXITCODE_FAILURE; 7480 } 7434 IEMBINARYOUTPUT BinOut; 7435 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseCompareF2XmmR64Imm8[iFn].pszName), RTEXITCODE_FAILURE); 7481 7436 7482 7437 uint32_t cNormalInputPairs = 0; … … 7523 7478 TestData.bImm = bImm; 7524 7479 TestData.OutVal = ResM; 7525 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7480 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7526 7481 7527 7482 fMxcsrIn &= ~X86_MXCSR_XCPT_MASK; … … 7533 7488 TestData.bImm = bImm; 7534 7489 TestData.OutVal = ResU; 7535 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7490 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7536 7491 7537 7492 uint16_t fXcpt = (fMxcsrM | fMxcsrU) & X86_MXCSR_XCPT_FLAGS; … … 7546 7501 TestData.bImm = bImm; 7547 7502 TestData.OutVal = Res1; 7548 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7503 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7549 7504 7550 7505 if (((fMxcsr1 & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (fMxcsr1 & X86_MXCSR_XCPT_FLAGS)) … … 7559 7514 TestData.bImm = bImm; 7560 7515 TestData.OutVal = Res2; 7561 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7516 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7562 7517 } 7563 7518 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 7573 7528 TestData.bImm = bImm; 7574 7529 TestData.OutVal = Res3; 7575 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7530 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7576 7531 } 7577 7532 } 7578 7533 } 7579 7534 } 7580 rc = RTStrmClose(pStrmOut); 7581 if (RT_FAILURE(rc)) 7582 { 7583 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseCompareF2XmmR64Imm8[iFn].pszName, rc); 7584 return RTEXITCODE_FAILURE; 7585 } 7535 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 7586 7536 } 7587 7537 … … 7667 7617 PFNIEMAIMPLFPSSEF2U128 const pfn = g_aSseConvertXmmI32R32[iFn].pfnNative ? g_aSseConvertXmmI32R32[iFn].pfnNative : g_aSseConvertXmmI32R32[iFn].pfn; 7668 7618 7669 PRTSTREAM pStrmOut = NULL; 7670 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseConvertXmmI32R32[iFn].pszName); 7671 if (RT_FAILURE(rc)) 7672 { 7673 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseConvertXmmI32R32[iFn].pszName, rc); 7674 return RTEXITCODE_FAILURE; 7675 } 7619 IEMBINARYOUTPUT BinOut; 7620 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseConvertXmmI32R32[iFn].pszName), RTEXITCODE_FAILURE); 7676 7621 7677 7622 X86FXSTATE State; … … 7701 7646 TestData.fMxcsrOut = ResM.MXCSR; 7702 7647 TestData.OutVal = ResM.uResult; 7703 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7648 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7704 7649 7705 7650 State.MXCSR = State.MXCSR & ~X86_MXCSR_XCPT_MASK; … … 7709 7654 TestData.fMxcsrOut = ResU.MXCSR; 7710 7655 TestData.OutVal = ResU.uResult; 7711 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7656 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7712 7657 7713 7658 uint16_t fXcpt = (ResM.MXCSR | ResU.MXCSR) & X86_MXCSR_XCPT_FLAGS; … … 7720 7665 TestData.fMxcsrOut = Res1.MXCSR; 7721 7666 TestData.OutVal = Res1.uResult; 7722 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7667 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7723 7668 7724 7669 if (((Res1.MXCSR & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (Res1.MXCSR & X86_MXCSR_XCPT_FLAGS)) … … 7731 7676 TestData.fMxcsrOut = Res2.MXCSR; 7732 7677 TestData.OutVal = Res2.uResult; 7733 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7678 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7734 7679 } 7735 7680 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 7743 7688 TestData.fMxcsrOut = Res3.MXCSR; 7744 7689 TestData.OutVal = Res3.uResult; 7745 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7690 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7746 7691 } 7747 7692 } 7748 7693 } 7749 7694 } 7750 rc = RTStrmClose(pStrmOut); 7751 if (RT_FAILURE(rc)) 7752 { 7753 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseConvertXmmI32R32[iFn].pszName, rc); 7754 return RTEXITCODE_FAILURE; 7755 } 7695 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 7756 7696 } 7757 7697 … … 7843 7783 PFNIEMAIMPLFPSSEF2U128 const pfn = g_aSseConvertXmmR32I32[iFn].pfnNative ? g_aSseConvertXmmR32I32[iFn].pfnNative : g_aSseConvertXmmR32I32[iFn].pfn; 7844 7784 7845 PRTSTREAM pStrmOut = NULL; 7846 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseConvertXmmR32I32[iFn].pszName); 7847 if (RT_FAILURE(rc)) 7848 { 7849 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseConvertXmmR32I32[iFn].pszName, rc); 7850 return RTEXITCODE_FAILURE; 7851 } 7785 IEMBINARYOUTPUT BinOut; 7786 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseConvertXmmR32I32[iFn].pszName), RTEXITCODE_FAILURE); 7852 7787 7853 7788 uint32_t cNormalInputPairs = 0; … … 7887 7822 TestData.fMxcsrOut = ResM.MXCSR; 7888 7823 TestData.OutVal = ResM.uResult; 7889 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7824 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7890 7825 7891 7826 State.MXCSR = State.MXCSR & ~X86_MXCSR_XCPT_MASK; … … 7895 7830 TestData.fMxcsrOut = ResU.MXCSR; 7896 7831 TestData.OutVal = ResU.uResult; 7897 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7832 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7898 7833 7899 7834 uint16_t fXcpt = (ResM.MXCSR | ResU.MXCSR) & X86_MXCSR_XCPT_FLAGS; … … 7906 7841 TestData.fMxcsrOut = Res1.MXCSR; 7907 7842 TestData.OutVal = Res1.uResult; 7908 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7843 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7909 7844 7910 7845 if (((Res1.MXCSR & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (Res1.MXCSR & X86_MXCSR_XCPT_FLAGS)) … … 7917 7852 TestData.fMxcsrOut = Res2.MXCSR; 7918 7853 TestData.OutVal = Res2.uResult; 7919 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7854 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7920 7855 } 7921 7856 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 7929 7864 TestData.fMxcsrOut = Res3.MXCSR; 7930 7865 TestData.OutVal = Res3.uResult; 7931 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7866 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 7932 7867 } 7933 7868 } 7934 7869 } 7935 7870 } 7936 rc = RTStrmClose(pStrmOut); 7937 if (RT_FAILURE(rc)) 7938 { 7939 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseConvertXmmR32I32[iFn].pszName, rc); 7940 return RTEXITCODE_FAILURE; 7941 } 7871 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 7942 7872 } 7943 7873 … … 8027 7957 PFNIEMAIMPLFPSSEF2U128 const pfn = g_aSseConvertXmmI32R64[iFn].pfnNative ? g_aSseConvertXmmI32R64[iFn].pfnNative : g_aSseConvertXmmI32R64[iFn].pfn; 8028 7958 8029 PRTSTREAM pStrmOut = NULL; 8030 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseConvertXmmI32R64[iFn].pszName); 8031 if (RT_FAILURE(rc)) 8032 { 8033 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseConvertXmmI32R64[iFn].pszName, rc); 8034 return RTEXITCODE_FAILURE; 8035 } 7959 IEMBINARYOUTPUT BinOut; 7960 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseConvertXmmI32R64[iFn].pszName), RTEXITCODE_FAILURE); 8036 7961 8037 7962 X86FXSTATE State; … … 8061 7986 TestData.fMxcsrOut = ResM.MXCSR; 8062 7987 TestData.OutVal = ResM.uResult; 8063 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7988 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8064 7989 8065 7990 State.MXCSR = State.MXCSR & ~X86_MXCSR_XCPT_MASK; … … 8069 7994 TestData.fMxcsrOut = ResU.MXCSR; 8070 7995 TestData.OutVal = ResU.uResult; 8071 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));7996 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8072 7997 8073 7998 uint16_t fXcpt = (ResM.MXCSR | ResU.MXCSR) & X86_MXCSR_XCPT_FLAGS; … … 8080 8005 TestData.fMxcsrOut = Res1.MXCSR; 8081 8006 TestData.OutVal = Res1.uResult; 8082 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8007 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8083 8008 8084 8009 if (((Res1.MXCSR & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (Res1.MXCSR & X86_MXCSR_XCPT_FLAGS)) … … 8091 8016 TestData.fMxcsrOut = Res2.MXCSR; 8092 8017 TestData.OutVal = Res2.uResult; 8093 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8018 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8094 8019 } 8095 8020 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 8103 8028 TestData.fMxcsrOut = Res3.MXCSR; 8104 8029 TestData.OutVal = Res3.uResult; 8105 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8030 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8106 8031 } 8107 8032 } 8108 8033 } 8109 8034 } 8110 rc = RTStrmClose(pStrmOut); 8111 if (RT_FAILURE(rc)) 8112 { 8113 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseConvertXmmI32R64[iFn].pszName, rc); 8114 return RTEXITCODE_FAILURE; 8115 } 8035 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 8116 8036 } 8117 8037 … … 8197 8117 PFNIEMAIMPLFPSSEF2U128 const pfn = g_aSseConvertXmmR64I32[iFn].pfnNative ? g_aSseConvertXmmR64I32[iFn].pfnNative : g_aSseConvertXmmR64I32[iFn].pfn; 8198 8118 8199 PRTSTREAM pStrmOut = NULL; 8200 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseConvertXmmR64I32[iFn].pszName); 8201 if (RT_FAILURE(rc)) 8202 { 8203 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseConvertXmmR64I32[iFn].pszName, rc); 8204 return RTEXITCODE_FAILURE; 8205 } 8119 IEMBINARYOUTPUT BinOut; 8120 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseConvertXmmR64I32[iFn].pszName), RTEXITCODE_FAILURE); 8206 8121 8207 8122 uint32_t cNormalInputPairs = 0; … … 8237 8152 TestData.fMxcsrOut = ResM.MXCSR; 8238 8153 TestData.OutVal = ResM.uResult; 8239 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8154 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8240 8155 8241 8156 State.MXCSR = State.MXCSR & ~X86_MXCSR_XCPT_MASK; … … 8245 8160 TestData.fMxcsrOut = ResU.MXCSR; 8246 8161 TestData.OutVal = ResU.uResult; 8247 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8162 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8248 8163 8249 8164 uint16_t fXcpt = (ResM.MXCSR | ResU.MXCSR) & X86_MXCSR_XCPT_FLAGS; … … 8256 8171 TestData.fMxcsrOut = Res1.MXCSR; 8257 8172 TestData.OutVal = Res1.uResult; 8258 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8173 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8259 8174 8260 8175 if (((Res1.MXCSR & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (Res1.MXCSR & X86_MXCSR_XCPT_FLAGS)) … … 8267 8182 TestData.fMxcsrOut = Res2.MXCSR; 8268 8183 TestData.OutVal = Res2.uResult; 8269 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8184 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8270 8185 } 8271 8186 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 8279 8194 TestData.fMxcsrOut = Res3.MXCSR; 8280 8195 TestData.OutVal = Res3.uResult; 8281 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8196 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8282 8197 } 8283 8198 } 8284 8199 } 8285 8200 } 8286 rc = RTStrmClose(pStrmOut); 8287 if (RT_FAILURE(rc)) 8288 { 8289 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseConvertXmmR64I32[iFn].pszName, rc); 8290 return RTEXITCODE_FAILURE; 8291 } 8201 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 8292 8202 } 8293 8203 … … 8378 8288 PFNIEMAIMPLMXCSRU64U128 const pfn = g_aSseConvertMmXmm[iFn].pfnNative ? g_aSseConvertMmXmm[iFn].pfnNative : g_aSseConvertMmXmm[iFn].pfn; 8379 8289 8380 PRTSTREAM pStrmOut = NULL; 8381 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseConvertMmXmm[iFn].pszName); 8382 if (RT_FAILURE(rc)) 8383 { 8384 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseConvertMmXmm[iFn].pszName, rc); 8385 return RTEXITCODE_FAILURE; 8386 } 8290 IEMBINARYOUTPUT BinOut; 8291 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseConvertMmXmm[iFn].pszName), RTEXITCODE_FAILURE); 8387 8292 8388 8293 uint32_t cNormalInputPairs = 0; … … 8419 8324 TestData.fMxcsrOut = fMxcsrM; 8420 8325 TestData.OutVal.u = u64ResM; 8421 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8326 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8422 8327 8423 8328 fMxcsrIn &= ~X86_MXCSR_XCPT_MASK; … … 8428 8333 TestData.fMxcsrOut = fMxcsrU; 8429 8334 TestData.OutVal.u = u64ResU; 8430 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8335 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8431 8336 8432 8337 uint16_t fXcpt = (fMxcsrM | fMxcsrU) & X86_MXCSR_XCPT_FLAGS; … … 8440 8345 TestData.fMxcsrOut = fMxcsr1; 8441 8346 TestData.OutVal.u = u64Res1; 8442 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8347 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8443 8348 8444 8349 if (((fMxcsr1 & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (fMxcsr1 & X86_MXCSR_XCPT_FLAGS)) … … 8452 8357 TestData.fMxcsrOut = fMxcsr2; 8453 8358 TestData.OutVal.u = u64Res2; 8454 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8359 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8455 8360 } 8456 8361 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 8465 8370 TestData.fMxcsrOut = fMxcsr3; 8466 8371 TestData.OutVal.u = u64Res3; 8467 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8372 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8468 8373 } 8469 8374 } 8470 8375 } 8471 8376 } 8472 rc = RTStrmClose(pStrmOut); 8473 if (RT_FAILURE(rc)) 8474 { 8475 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseConvertMmXmm[iFn].pszName, rc); 8476 return RTEXITCODE_FAILURE; 8477 } 8377 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 8478 8378 } 8479 8379 … … 8552 8452 PFNIEMAIMPLMXCSRU128U64 const pfn = g_aSseConvertXmmR64Mm[iFn].pfnNative ? g_aSseConvertXmmR64Mm[iFn].pfnNative : g_aSseConvertXmmR64Mm[iFn].pfn; 8553 8453 8554 PRTSTREAM pStrmOut = NULL; 8555 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseConvertXmmR64Mm[iFn].pszName); 8556 if (RT_FAILURE(rc)) 8557 { 8558 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseConvertXmmR64Mm[iFn].pszName, rc); 8559 return RTEXITCODE_FAILURE; 8560 } 8454 IEMBINARYOUTPUT BinOut; 8455 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseConvertXmmR64Mm[iFn].pszName), RTEXITCODE_FAILURE); 8561 8456 8562 8457 for (uint32_t iTest = 0; iTest < cTests + RT_ELEMENTS(s_aSpecials); iTest += 1) … … 8581 8476 TestData.fMxcsrIn = fMxcsrIn; 8582 8477 TestData.fMxcsrOut = fMxcsrM; 8583 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8478 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8584 8479 8585 8480 fMxcsrIn &= ~X86_MXCSR_XCPT_MASK; … … 8588 8483 TestData.fMxcsrIn = fMxcsrIn; 8589 8484 TestData.fMxcsrOut = fMxcsrU; 8590 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8485 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8591 8486 8592 8487 uint16_t fXcpt = (fMxcsrM | fMxcsrU) & X86_MXCSR_XCPT_FLAGS; … … 8598 8493 TestData.fMxcsrIn = fMxcsrIn; 8599 8494 TestData.fMxcsrOut = fMxcsr1; 8600 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8495 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8601 8496 8602 8497 if (((fMxcsr1 & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (fMxcsr1 & X86_MXCSR_XCPT_FLAGS)) … … 8608 8503 TestData.fMxcsrIn = fMxcsrIn; 8609 8504 TestData.fMxcsrOut = fMxcsr2; 8610 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8505 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8611 8506 } 8612 8507 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 8619 8514 TestData.fMxcsrIn = fMxcsrIn; 8620 8515 TestData.fMxcsrOut = fMxcsr3; 8621 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8516 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8622 8517 } 8623 8518 } 8624 8519 } 8625 8520 } 8626 rc = RTStrmClose(pStrmOut); 8627 if (RT_FAILURE(rc)) 8628 { 8629 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseConvertXmmR64Mm[iFn].pszName, rc); 8630 return RTEXITCODE_FAILURE; 8631 } 8521 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 8632 8522 } 8633 8523 … … 8704 8594 PFNIEMAIMPLMXCSRU128U64 const pfn = g_aSseConvertXmmR32Mm[iFn].pfnNative ? g_aSseConvertXmmR32Mm[iFn].pfnNative : g_aSseConvertXmmR32Mm[iFn].pfn; 8705 8595 8706 PRTSTREAM pStrmOut = NULL; 8707 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseConvertXmmR32Mm[iFn].pszName); 8708 if (RT_FAILURE(rc)) 8709 { 8710 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseConvertXmmR32Mm[iFn].pszName, rc); 8711 return RTEXITCODE_FAILURE; 8712 } 8596 IEMBINARYOUTPUT BinOut; 8597 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseConvertXmmR32Mm[iFn].pszName), RTEXITCODE_FAILURE); 8713 8598 8714 8599 for (uint32_t iTest = 0; iTest < cTests + RT_ELEMENTS(s_aSpecials); iTest += 1) … … 8733 8618 TestData.fMxcsrIn = fMxcsrIn; 8734 8619 TestData.fMxcsrOut = fMxcsrM; 8735 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8620 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8736 8621 8737 8622 fMxcsrIn &= ~X86_MXCSR_XCPT_MASK; … … 8740 8625 TestData.fMxcsrIn = fMxcsrIn; 8741 8626 TestData.fMxcsrOut = fMxcsrU; 8742 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8627 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8743 8628 8744 8629 uint16_t fXcpt = (fMxcsrM | fMxcsrU) & X86_MXCSR_XCPT_FLAGS; … … 8750 8635 TestData.fMxcsrIn = fMxcsrIn; 8751 8636 TestData.fMxcsrOut = fMxcsr1; 8752 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8637 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8753 8638 8754 8639 if (((fMxcsr1 & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (fMxcsr1 & X86_MXCSR_XCPT_FLAGS)) … … 8760 8645 TestData.fMxcsrIn = fMxcsrIn; 8761 8646 TestData.fMxcsrOut = fMxcsr2; 8762 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8647 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8763 8648 } 8764 8649 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 8771 8656 TestData.fMxcsrIn = fMxcsrIn; 8772 8657 TestData.fMxcsrOut = fMxcsr3; 8773 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8658 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8774 8659 } 8775 8660 } 8776 8661 } 8777 8662 } 8778 rc = RTStrmClose(pStrmOut); 8779 if (RT_FAILURE(rc)) 8780 { 8781 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseConvertXmmR32Mm[iFn].pszName, rc); 8782 return RTEXITCODE_FAILURE; 8783 } 8663 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 8784 8664 } 8785 8665 … … 8860 8740 PFNIEMAIMPLMXCSRU64U64 const pfn = g_aSseConvertMmI32XmmR32[iFn].pfnNative ? g_aSseConvertMmI32XmmR32[iFn].pfnNative : g_aSseConvertMmI32XmmR32[iFn].pfn; 8861 8741 8862 PRTSTREAM pStrmOut = NULL; 8863 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSseConvertMmI32XmmR32[iFn].pszName); 8864 if (RT_FAILURE(rc)) 8865 { 8866 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSseConvertMmI32XmmR32[iFn].pszName, rc); 8867 return RTEXITCODE_FAILURE; 8868 } 8742 IEMBINARYOUTPUT BinOut; 8743 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSseConvertMmI32XmmR32[iFn].pszName), RTEXITCODE_FAILURE); 8869 8744 8870 8745 uint32_t cNormalInputPairs = 0; … … 8905 8780 TestData.fMxcsrOut = fMxcsrM; 8906 8781 TestData.OutVal.u = u64ResM; 8907 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8782 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8908 8783 8909 8784 fMxcsrIn &= ~X86_MXCSR_XCPT_MASK; … … 8914 8789 TestData.fMxcsrOut = fMxcsrU; 8915 8790 TestData.OutVal.u = u64ResU; 8916 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8791 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8917 8792 8918 8793 uint16_t fXcpt = (fMxcsrM | fMxcsrU) & X86_MXCSR_XCPT_FLAGS; … … 8926 8801 TestData.fMxcsrOut = fMxcsr1; 8927 8802 TestData.OutVal.u = u64Res1; 8928 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8803 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8929 8804 8930 8805 if (((fMxcsr1 & X86_MXCSR_XCPT_FLAGS) & fXcpt) != (fMxcsr1 & X86_MXCSR_XCPT_FLAGS)) … … 8938 8813 TestData.fMxcsrOut = fMxcsr2; 8939 8814 TestData.OutVal.u = u64Res2; 8940 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8815 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8941 8816 } 8942 8817 if (!RT_IS_POWER_OF_TWO(fXcpt)) … … 8951 8826 TestData.fMxcsrOut = fMxcsr3; 8952 8827 TestData.OutVal.u = u64Res3; 8953 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8828 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 8954 8829 } 8955 8830 } 8956 8831 } 8957 8832 } 8958 rc = RTStrmClose(pStrmOut); 8959 if (RT_FAILURE(rc)) 8960 { 8961 RTMsgError("Failed to close data file for %s: %Rrc", g_aSseConvertMmI32XmmR32[iFn].pszName, rc); 8962 return RTEXITCODE_FAILURE; 8963 } 8833 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 8964 8834 } 8965 8835 … … 9043 8913 PFNIEMAIMPLPCMPISTRIU128IMM8 const pfn = g_aSsePcmpistri[iFn].pfnNative ? g_aSsePcmpistri[iFn].pfnNative : g_aSsePcmpistri[iFn].pfn; 9044 8914 9045 PRTSTREAM pStrmOut = NULL; 9046 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSsePcmpistri[iFn].pszName); 9047 if (RT_FAILURE(rc)) 9048 { 9049 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSsePcmpistri[iFn].pszName, rc); 9050 return RTEXITCODE_FAILURE; 9051 } 8915 IEMBINARYOUTPUT BinOut; 8916 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSsePcmpistri[iFn].pszName), RTEXITCODE_FAILURE); 9052 8917 9053 8918 for (uint32_t iTest = 0; iTest < cTests + RT_ELEMENTS(s_aSpecials); iTest += 1) … … 9070 8935 TestData.fEFlagsOut = fEFlagsOut; 9071 8936 TestData.bImm = (uint8_t)u16Imm; 9072 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8937 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 9073 8938 } 9074 8939 … … 9085 8950 TestData.fEFlagsOut = fEFlagsOut; 9086 8951 TestData.bImm = (uint8_t)u16Imm; 9087 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));8952 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 9088 8953 } 9089 8954 } 9090 rc = RTStrmClose(pStrmOut); 9091 if (RT_FAILURE(rc)) 9092 { 9093 RTMsgError("Failed to close data file for %s: %Rrc", g_aSsePcmpistri[iFn].pszName, rc); 9094 return RTEXITCODE_FAILURE; 9095 } 8955 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 9096 8956 } 9097 8957 … … 9165 9025 PFNIEMAIMPLPCMPISTRMU128IMM8 const pfn = g_aSsePcmpistrm[iFn].pfnNative ? g_aSsePcmpistrm[iFn].pfnNative : g_aSsePcmpistrm[iFn].pfn; 9166 9026 9167 PRTSTREAM pStrmOut = NULL; 9168 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSsePcmpistrm[iFn].pszName); 9169 if (RT_FAILURE(rc)) 9170 { 9171 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSsePcmpistrm[iFn].pszName, rc); 9172 return RTEXITCODE_FAILURE; 9173 } 9027 IEMBINARYOUTPUT BinOut; 9028 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSsePcmpistrm[iFn].pszName), RTEXITCODE_FAILURE); 9174 9029 9175 9030 for (uint32_t iTest = 0; iTest < cTests + RT_ELEMENTS(s_aSpecials); iTest += 1) … … 9192 9047 TestData.fEFlagsOut = fEFlagsOut; 9193 9048 TestData.bImm = (uint8_t)u16Imm; 9194 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));9049 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 9195 9050 } 9196 9051 … … 9207 9062 TestData.fEFlagsOut = fEFlagsOut; 9208 9063 TestData.bImm = (uint8_t)u16Imm; 9209 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));9064 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 9210 9065 } 9211 9066 } 9212 rc = RTStrmClose(pStrmOut); 9213 if (RT_FAILURE(rc)) 9214 { 9215 RTMsgError("Failed to close data file for %s: %Rrc", g_aSsePcmpistrm[iFn].pszName, rc); 9216 return RTEXITCODE_FAILURE; 9217 } 9067 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 9218 9068 } 9219 9069 … … 9289 9139 PFNIEMAIMPLPCMPESTRIU128IMM8 const pfn = g_aSsePcmpestri[iFn].pfnNative ? g_aSsePcmpestri[iFn].pfnNative : g_aSsePcmpestri[iFn].pfn; 9290 9140 9291 PRTSTREAM pStrmOut = NULL; 9292 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSsePcmpestri[iFn].pszName); 9293 if (RT_FAILURE(rc)) 9294 { 9295 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSsePcmpestri[iFn].pszName, rc); 9296 return RTEXITCODE_FAILURE; 9297 } 9141 IEMBINARYOUTPUT BinOut; 9142 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSsePcmpestri[iFn].pszName), RTEXITCODE_FAILURE); 9298 9143 9299 9144 for (uint32_t iTest = 0; iTest < cTests + RT_ELEMENTS(s_aSpecials); iTest += 1) … … 9324 9169 TestData.fEFlagsOut = fEFlagsOut; 9325 9170 TestData.bImm = (uint8_t)u16Imm; 9326 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));9171 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 9327 9172 } 9328 9173 … … 9339 9184 TestData.fEFlagsOut = fEFlagsOut; 9340 9185 TestData.bImm = (uint8_t)u16Imm; 9341 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));9186 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 9342 9187 } 9343 9188 } 9344 9189 } 9345 rc = RTStrmClose(pStrmOut); 9346 if (RT_FAILURE(rc)) 9347 { 9348 RTMsgError("Failed to close data file for %s: %Rrc", g_aSsePcmpestri[iFn].pszName, rc); 9349 return RTEXITCODE_FAILURE; 9350 } 9190 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 9351 9191 } 9352 9192 … … 9424 9264 PFNIEMAIMPLPCMPESTRMU128IMM8 const pfn = g_aSsePcmpestrm[iFn].pfnNative ? g_aSsePcmpestrm[iFn].pfnNative : g_aSsePcmpestrm[iFn].pfn; 9425 9265 9426 PRTSTREAM pStrmOut = NULL; 9427 int rc = RTStrmOpenF("wb", &pStrmOut, pszDataFileFmt, g_aSsePcmpestrm[iFn].pszName); 9428 if (RT_FAILURE(rc)) 9429 { 9430 RTMsgError("Failed to open data file for %s for writing: %Rrc", g_aSsePcmpestrm[iFn].pszName, rc); 9431 return RTEXITCODE_FAILURE; 9432 } 9266 IEMBINARYOUTPUT BinOut; 9267 AssertReturn(GenerateBinaryOpen(&BinOut, pszDataFileFmt, g_aSsePcmpestrm[iFn].pszName), RTEXITCODE_FAILURE); 9433 9268 9434 9269 for (uint32_t iTest = 0; iTest < cTests + RT_ELEMENTS(s_aSpecials); iTest += 1) … … 9459 9294 TestData.fEFlagsOut = fEFlagsOut; 9460 9295 TestData.bImm = (uint8_t)u16Imm; 9461 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));9296 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 9462 9297 } 9463 9298 … … 9474 9309 TestData.fEFlagsOut = fEFlagsOut; 9475 9310 TestData.bImm = (uint8_t)u16Imm; 9476 RTStrmWrite(pStrmOut, &TestData, sizeof(TestData));9311 GenerateBinaryWrite(&BinOut, &TestData, sizeof(TestData)); 9477 9312 } 9478 9313 } 9479 9314 } 9480 rc = RTStrmClose(pStrmOut); 9481 if (RT_FAILURE(rc)) 9482 { 9483 RTMsgError("Failed to close data file for %s: %Rrc", g_aSsePcmpestrm[iFn].pszName, rc); 9484 return RTEXITCODE_FAILURE; 9485 } 9315 AssertReturn(GenerateBinaryClose(&BinOut), RTEXITCODE_FAILURE); 9486 9316 } 9487 9317 … … 9900 9730 if (fSseFpBinary) 9901 9731 { 9902 const char * pszDataFileFmt = fCommonData ? "tstIEMAImplDataSseBinary-%s.bin" : pszBitBucket;9732 const char * const pszDataFileFmt = fCommonData ? "tstIEMAImplDataSseBinary-%s.bin.gz" : NULL; 9903 9733 9904 9734 RTEXITCODE rcExit = SseBinaryR32Generate(pszDataFileFmt, cTests); … … 9933 9763 if (fSseFpOther) 9934 9764 { 9935 const char * pszDataFileFmtCmp = fCommonData ? "tstIEMAImplDataSseCompare-%s.bin" : pszBitBucket;9936 const char * pszDataFileFmtConv = fCommonData ? "tstIEMAImplDataSseConvert-%s.bin" : pszBitBucket;9765 const char * const pszDataFileFmtCmp = fCommonData ? "tstIEMAImplDataSseCompare-%s.bin.gz" : NULL; 9766 const char * const pszDataFileFmtConv = fCommonData ? "tstIEMAImplDataSseConvert-%s.bin.gz" : NULL; 9937 9767 9938 9768 RTEXITCODE rcExit = SseCompareEflR32R32Generate(pszDataFileFmtCmp, cTests); … … 9965 9795 if (fSsePcmpxstrx) 9966 9796 { 9967 const char * pszDataFileFmtCmp = fCommonData ? "tstIEMAImplDataSsePcmpxstrx-%s.bin" : pszBitBucket;9797 const char * const pszDataFileFmtCmp = fCommonData ? "tstIEMAImplDataSsePcmpxstrx-%s.bin.gz" : NULL; 9968 9798 9969 9799 RTEXITCODE rcExit = SseComparePcmpistriGenerate(pszDataFileFmtCmp, cTests);
Note:
See TracChangeset
for help on using the changeset viewer.