VirtualBox

儲存庫 vbox 的更動 62408


忽略:
時間撮記:
2016-7-21 下午08:23:33 (8 年 以前)
作者:
vboxsync
訊息:

iemAImpl_imul_u64: Adjusted flag behavior to match that of Intel Skylake 6700K.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp

    r62404 r62408  
    11481148IEM_DECL_IMPL_DEF(int, iemAImpl_imul_u64,(uint64_t *pu64RAX, uint64_t *pu64RDX, uint64_t u64Factor, uint32_t *pfEFlags))
    11491149{
    1150 /** @todo Testcase: IMUL 1 operand   */
    11511150    RTUINT128U Result;
    1152     *pfEFlags &= ~(X86_EFL_SF | X86_EFL_CF | X86_EFL_OF);
     1151    *pfEFlags &= ~( X86_EFL_SF | X86_EFL_CF | X86_EFL_OF
     1152                   /* Skylake always clears: */ | X86_EFL_AF | X86_EFL_ZF
     1153                   /* Skylake may set: */       | X86_EFL_PF);
     1154
    11531155    if ((int64_t)*pu64RAX >= 0)
    11541156    {
     
    11841186    }
    11851187    *pu64RAX = Result.s.Lo;
     1188    if (Result.s.Lo & RT_BIT_64(63))
     1189        *pfEFlags |= X86_EFL_SF;
     1190    *pfEFlags |= g_afParity[Result.s.Lo & 0xff]; /* (Skylake behaviour) */
    11861191    *pu64RDX = Result.s.Hi;
    1187     if (*pu64RAX & RT_BIT_64(63))
    1188         *pfEFlags |= X86_EFL_SF;
    1189 
    1190     /** @todo research the undefined IMUL flags. */
     1192
    11911193    return 0;
    11921194}
     
    12381240IEM_DECL_IMPL_DEF(int, iemAImpl_idiv_u64,(uint64_t *pu64RAX, uint64_t *pu64RDX, uint64_t u64Divisor, uint32_t *pfEFlags))
    12391241{
     1242    /* Note! Skylake leaves all flags alone. */
    12401243    if (u64Divisor != 0)
    12411244    {
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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