VirtualBox

Changeset 94423 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Mar 31, 2022 10:59:46 PM (3 years ago)
Author:
vboxsync
Message:

tstIEMAImpl: More tests where AMD and Intel differs a little (or a lot). bugref:9898

Location:
trunk/src/VBox/VMM
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp

    r94420 r94423  
    44764476
    44774477#if defined(IEM_WITHOUT_ASSEMBLY)
    4478 
    44794478IEM_DECL_IMPL_DEF(void, iemAImpl_fptan_r80_r80,(PCX86FXSTATE pFpuState, PIEMFPURESULTTWO pFpuResTwo, PCRTFLOAT80U pr80Val))
    44804479{
     
    44824481    AssertReleaseFailed();
    44834482}
    4484 
    4485 
     4483#endif /* IEM_WITHOUT_ASSEMBLY */
     4484
     4485IEM_DECL_IMPL_DEF(void, iemAImpl_fptan_r80_r80_amd,(PCX86FXSTATE pFpuState, PIEMFPURESULTTWO pFpuResTwo, PCRTFLOAT80U pr80Val))
     4486{
     4487    iemAImpl_fptan_r80_r80(pFpuState, pFpuResTwo, pr80Val);
     4488}
     4489
     4490IEM_DECL_IMPL_DEF(void, iemAImpl_fptan_r80_r80_intel,(PCX86FXSTATE pFpuState, PIEMFPURESULTTWO pFpuResTwo, PCRTFLOAT80U pr80Val))
     4491{
     4492    iemAImpl_fptan_r80_r80(pFpuState, pFpuResTwo, pr80Val);
     4493}
     4494
     4495
     4496#ifdef IEM_WITHOUT_ASSEMBLY
    44864497IEM_DECL_IMPL_DEF(void, iemAImpl_fsin_r80,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes, PCRTFLOAT80U pr80Val))
    44874498{
     
    44894500    AssertReleaseFailed();
    44904501}
    4491 
    4492 
     4502#endif /* IEM_WITHOUT_ASSEMBLY */
     4503
     4504IEM_DECL_IMPL_DEF(void, iemAImpl_fsin_r80_amd,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes, PCRTFLOAT80U pr80Val))
     4505{
     4506    iemAImpl_fsin_r80(pFpuState, pFpuRes, pr80Val);
     4507}
     4508
     4509IEM_DECL_IMPL_DEF(void, iemAImpl_fsin_r80_intel,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes, PCRTFLOAT80U pr80Val))
     4510{
     4511    iemAImpl_fsin_r80(pFpuState, pFpuRes, pr80Val);
     4512}
     4513
     4514#ifdef IEM_WITHOUT_ASSEMBLY
    44934515IEM_DECL_IMPL_DEF(void, iemAImpl_fsincos_r80_r80,(PCX86FXSTATE pFpuState, PIEMFPURESULTTWO pFpuResTwo, PCRTFLOAT80U pr80Val))
    44944516{
     
    44964518    AssertReleaseFailed();
    44974519}
    4498 
    4499 
     4520#endif /* IEM_WITHOUT_ASSEMBLY */
     4521
     4522IEM_DECL_IMPL_DEF(void, iemAImpl_fsincos_r80_r80_amd,(PCX86FXSTATE pFpuState, PIEMFPURESULTTWO pFpuResTwo, PCRTFLOAT80U pr80Val))
     4523{
     4524    iemAImpl_fsincos_r80_r80(pFpuState, pFpuResTwo, pr80Val);
     4525}
     4526
     4527IEM_DECL_IMPL_DEF(void, iemAImpl_fsincos_r80_r80_intel,(PCX86FXSTATE pFpuState, PIEMFPURESULTTWO pFpuResTwo, PCRTFLOAT80U pr80Val))
     4528{
     4529    iemAImpl_fsincos_r80_r80(pFpuState, pFpuResTwo, pr80Val);
     4530}
     4531
     4532
     4533#ifdef IEM_WITHOUT_ASSEMBLY
    45004534IEM_DECL_IMPL_DEF(void, iemAImpl_fcos_r80,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes, PCRTFLOAT80U pr80Val))
    45014535{
     
    45034537    AssertReleaseFailed();
    45044538}
     4539#endif /* IEM_WITHOUT_ASSEMBLY */
     4540
     4541IEM_DECL_IMPL_DEF(void, iemAImpl_fcos_r80_amd,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes, PCRTFLOAT80U pr80Val))
     4542{
     4543    iemAImpl_fcos_r80(pFpuState, pFpuRes, pr80Val);
     4544}
     4545
     4546IEM_DECL_IMPL_DEF(void, iemAImpl_fcos_r80_intel,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes, PCRTFLOAT80U pr80Val))
     4547{
     4548    iemAImpl_fcos_r80(pFpuState, pFpuRes, pr80Val);
     4549}
     4550
     4551#ifdef IEM_WITHOUT_ASSEMBLY
    45054552
    45064553
     
    46224669}
    46234670
     4671#endif /* IEM_WITHOUT_ASSEMBLY */
     4672
     4673IEM_DECL_IMPL_DEF(void, iemAImpl_f2xm1_r80_amd,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes, PCRTFLOAT80U pr80Val))
     4674{
     4675    iemAImpl_f2xm1_r80(pFpuState, pFpuRes, pr80Val);
     4676}
     4677
     4678IEM_DECL_IMPL_DEF(void, iemAImpl_f2xm1_r80_intel,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes, PCRTFLOAT80U pr80Val))
     4679{
     4680    iemAImpl_f2xm1_r80(pFpuState, pFpuRes, pr80Val);
     4681}
     4682
     4683#ifdef IEM_WITHOUT_ASSEMBLY
    46244684
    46254685IEM_DECL_IMPL_DEF(void, iemAImpl_fabs_r80,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes, PCRTFLOAT80U pr80Val))
  • trunk/src/VBox/VMM/include/IEMInternal.h

    r94416 r94423  
    14191419FNIEMAIMPLFPUR80UNARY       iemAImpl_fabs_r80;
    14201420FNIEMAIMPLFPUR80UNARY       iemAImpl_fchs_r80;
    1421 FNIEMAIMPLFPUR80UNARY       iemAImpl_f2xm1_r80;
     1421FNIEMAIMPLFPUR80UNARY       iemAImpl_f2xm1_r80, iemAImpl_f2xm1_r80_amd, iemAImpl_f2xm1_r80_intel;
    14221422FNIEMAIMPLFPUR80UNARY       iemAImpl_fsqrt_r80;
    14231423FNIEMAIMPLFPUR80UNARY       iemAImpl_frndint_r80;
    1424 FNIEMAIMPLFPUR80UNARY       iemAImpl_fsin_r80;
    1425 FNIEMAIMPLFPUR80UNARY       iemAImpl_fcos_r80;
     1424FNIEMAIMPLFPUR80UNARY       iemAImpl_fsin_r80, iemAImpl_fsin_r80_amd, iemAImpl_fsin_r80_intel;
     1425FNIEMAIMPLFPUR80UNARY       iemAImpl_fcos_r80, iemAImpl_fcos_r80_amd, iemAImpl_fcos_r80_intel;
    14261426
    14271427typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPUR80UNARYFSW,(PCX86FXSTATE pFpuState, uint16_t *pu16Fsw, PCRTFLOAT80U pr80Val));
     
    14431443                                                           PCRTFLOAT80U pr80Val));
    14441444typedef FNIEMAIMPLFPUR80UNARYTWO *PFNIEMAIMPLFPUR80UNARYTWO;
    1445 FNIEMAIMPLFPUR80UNARYTWO    iemAImpl_fptan_r80_r80;
     1445FNIEMAIMPLFPUR80UNARYTWO    iemAImpl_fptan_r80_r80, iemAImpl_fptan_r80_r80_amd, iemAImpl_fptan_r80_r80_intel;
    14461446FNIEMAIMPLFPUR80UNARYTWO    iemAImpl_fxtract_r80_r80;
    1447 FNIEMAIMPLFPUR80UNARYTWO    iemAImpl_fsincos_r80_r80;
     1447FNIEMAIMPLFPUR80UNARYTWO    iemAImpl_fsincos_r80_r80, iemAImpl_fsincos_r80_r80_amd, iemAImpl_fsincos_r80_r80_intel;
    14481448
    14491449IEM_DECL_IMPL_DEF(void, iemAImpl_fld_r80_from_r80,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes, PCRTFLOAT80U pr80Val));
  • trunk/src/VBox/VMM/testcase/Makefile.kmk

    r94416 r94423  
    258258        $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuBinary1-Intel.cpp \
    259259        $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuBinary2.cpp \
    260         $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuOther.cpp
     260        $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuOther.cpp \
     261        $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuOther-Amd.cpp \
     262        $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuOther-Intel.cpp
    261263tstIEMAImpl_SOURCES   = \
    262264        tstIEMAImpl.cpp \
     
    302304$(evalcall2 def_tstIEMAImplData_adjust,FpuBinary2)
    303305$(evalcall2 def_tstIEMAImplData_adjust,FpuOther)
     306$(evalcall2 def_tstIEMAImplData_adjust,FpuOther-Amd)
     307$(evalcall2 def_tstIEMAImplData_adjust,FpuOther-Intel)
    304308
    305309
  • trunk/src/VBox/VMM/testcase/tstIEMAImpl.cpp

    r94418 r94423  
    34643464    ENTRY(fabs_r80),
    34653465    ENTRY(fchs_r80),
    3466     ENTRY(f2xm1_r80),
     3466    ENTRY_AMD(  f2xm1_r80, 0), // C1 differs for -1m0x3fb263cc2c331e15^-2654
     3467    ENTRY_INTEL(f2xm1_r80, 0),
    34673468    ENTRY(fsqrt_r80),
    34683469    ENTRY(frndint_r80),
    3469     ENTRY(fsin_r80),
    3470     ENTRY(fcos_r80),
     3470    ENTRY_AMD(  fsin_r80, 0),  // value & C1 differences for pseudo denormals and others (e.g. -1m0x2b1e5683cbca5725^-3485)
     3471    ENTRY_INTEL(fsin_r80, 0),
     3472    ENTRY_AMD(  fcos_r80, 0),  // value & C1 differences
     3473    ENTRY_INTEL(fcos_r80, 0),
    34713474};
    34723475
     
    36933696static const FPU_UNARY_TWO_R80_T g_aFpuUnaryTwoR80[] =
    36943697{
    3695     ENTRY(fptan_r80_r80),
     3698    ENTRY_AMD(  fptan_r80_r80, 0),   // rounding differences
     3699    ENTRY_INTEL(fptan_r80_r80, 0),
    36963700    ENTRY(fxtract_r80_r80),
    3697     ENTRY(fsincos_r80_r80),
     3701    ENTRY_AMD(  fsincos_r80_r80, 0), // C1 differences & value differences (e.g. -1m0x235cf2f580244a27^-1696)
     3702    ENTRY_INTEL(fsincos_r80_r80, 0),
    36983703};
    36993704
     
    40744079            const char *pszDataFile    = fCommonData ? "tstIEMAImplDataFpuOther.cpp" : pszBitBucket;
    40754080            PRTSTREAM   pStrmData      = GenerateOpenWithHdr(pszDataFile, szCpuDesc, NULL);
    4076             const char *pszDataCpuFile = pszBitBucket /*!fCpuData ? pszBitBucket : g_idxCpuEflFlavour == IEMTARGETCPU_EFL_BEHAVIOR_AMD
    4077                                        ? "tstIEMAImplDataFpuOther-Amd.cpp" : "tstIEMAImplDataFpuOther-Intel.cpp"*/;
     4081            const char *pszDataCpuFile = !fCpuData ? pszBitBucket : g_idxCpuEflFlavour == IEMTARGETCPU_EFL_BEHAVIOR_AMD
     4082                                       ? "tstIEMAImplDataFpuOther-Amd.cpp" : "tstIEMAImplDataFpuOther-Intel.cpp";
    40784083            PRTSTREAM   pStrmDataCpu   = GenerateOpenWithHdr(pszDataCpuFile, szCpuDesc, pszCpuType);
    40794084            if (!pStrmData || !pStrmDataCpu)
  • trunk/src/VBox/VMM/testcase/tstIEMAImpl.h

    r94416 r94423  
    692692TSTIEM_DECLARE_TEST_ARRAY(FpuOther,         FPU_UNARY_R80_TEST_T,       fabs_r80                 );
    693693TSTIEM_DECLARE_TEST_ARRAY(FpuOther,         FPU_UNARY_R80_TEST_T,       fchs_r80                 );
    694 TSTIEM_DECLARE_TEST_ARRAY(FpuOther,         FPU_UNARY_R80_TEST_T,       f2xm1_r80                );
     694TSTIEM_DECLARE_TEST_ARRAY(FpuOther-Amd,     FPU_UNARY_R80_TEST_T,       f2xm1_r80_amd            );
     695TSTIEM_DECLARE_TEST_ARRAY(FpuOther-Intel,   FPU_UNARY_R80_TEST_T,       f2xm1_r80_intel          );
    695696TSTIEM_DECLARE_TEST_ARRAY(FpuOther,         FPU_UNARY_R80_TEST_T,       fsqrt_r80                );
    696697TSTIEM_DECLARE_TEST_ARRAY(FpuOther,         FPU_UNARY_R80_TEST_T,       frndint_r80              );
    697 TSTIEM_DECLARE_TEST_ARRAY(FpuOther,         FPU_UNARY_R80_TEST_T,       fsin_r80                 );
    698 TSTIEM_DECLARE_TEST_ARRAY(FpuOther,         FPU_UNARY_R80_TEST_T,       fcos_r80                 );
     698TSTIEM_DECLARE_TEST_ARRAY(FpuOther-Amd,     FPU_UNARY_R80_TEST_T,       fsin_r80_amd             );
     699TSTIEM_DECLARE_TEST_ARRAY(FpuOther-Intel,   FPU_UNARY_R80_TEST_T,       fsin_r80_intel           );
     700TSTIEM_DECLARE_TEST_ARRAY(FpuOther-Amd,     FPU_UNARY_R80_TEST_T,       fcos_r80_amd             );
     701TSTIEM_DECLARE_TEST_ARRAY(FpuOther-Intel,   FPU_UNARY_R80_TEST_T,       fcos_r80_intel           );
    699702
    700703TSTIEM_DECLARE_TEST_ARRAY(FpuOther,         FPU_UNARY_R80_TEST_T,       ftst_r80                 );
    701704TSTIEM_DECLARE_TEST_ARRAY(FpuOther,         FPU_UNARY_R80_TEST_T,       fxam_r80                 );
    702705
    703 TSTIEM_DECLARE_TEST_ARRAY(FpuOther,         FPU_UNARY_TWO_R80_TEST_T,   fptan_r80_r80            );
     706TSTIEM_DECLARE_TEST_ARRAY(FpuOther-Amd,     FPU_UNARY_TWO_R80_TEST_T,   fptan_r80_r80_amd        );
     707TSTIEM_DECLARE_TEST_ARRAY(FpuOther-Intel,   FPU_UNARY_TWO_R80_TEST_T,   fptan_r80_r80_intel      );
    704708TSTIEM_DECLARE_TEST_ARRAY(FpuOther,         FPU_UNARY_TWO_R80_TEST_T,   fxtract_r80_r80          );
    705 TSTIEM_DECLARE_TEST_ARRAY(FpuOther,         FPU_UNARY_TWO_R80_TEST_T,   fsincos_r80_r80          );
     709TSTIEM_DECLARE_TEST_ARRAY(FpuOther-Amd,     FPU_UNARY_TWO_R80_TEST_T,   fsincos_r80_r80_amd      );
     710TSTIEM_DECLARE_TEST_ARRAY(FpuOther-Intel,   FPU_UNARY_TWO_R80_TEST_T,   fsincos_r80_r80_intel    );
    706711
    707712#endif /* !VMM_INCLUDED_SRC_testcase_tstIEMAImpl_h */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette