VirtualBox

Changeset 48173 in vbox for trunk/src


Ignore:
Timestamp:
Aug 30, 2013 12:56:53 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
88556
Message:

moving code a round.

File:
1 edited

Legend:

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

    r48172 r48173  
    562562
    563563
     564IEM_DECL_IMPL_DEF(void, iemAImpl_xadd_u64,(uint64_t *puDst, uint64_t *puReg, uint32_t *pfEFlags))
     565{
     566    uint64_t uDst    = *puDst;
     567    uint64_t uResult = uDst;
     568    iemAImpl_add_u64(&uResult, *puReg, pfEFlags);
     569    *puDst = uResult;
     570    *puReg = uDst;
     571}
     572
     573
     574IEM_DECL_IMPL_DEF(void, iemAImpl_xadd_u64_locked,(uint64_t *puDst, uint64_t *puReg, uint32_t *pfEFlags))
     575{
     576    uint64_t uOld = ASMAtomicReadU64(puDst);
     577    uint64_t uTmpDst;
     578    uint32_t fEflTmp;
     579    do
     580    {
     581        uTmpDst = uOld;
     582        fEflTmp = *pfEFlags;
     583        iemAImpl_add_u64(&uTmpDst, *puReg, pfEFlags);
     584    } while (ASMAtomicCmpXchgExU64(puDst, uTmpDst, uOld, &uOld));
     585    *puReg    = uOld;
     586    *pfEFlags = fEflTmp;
     587}
     588
     589
    564590/* Bit operations (same signature as above). */
    565591
     
    10891115
    10901116
    1091 /* multiplication and division */
    1092 
    1093 IEM_DECL_IMPL_DEF(int, iemAImpl_mul_u64,(uint64_t *pu64RAX, uint64_t *pu64RDX, uint64_t u64Factor, uint32_t *pfEFlags))
    1094 {
    1095     AssertFailed();
    1096     return -1;
    1097 }
    1098 
    1099 
    1100 IEM_DECL_IMPL_DEF(int, iemAImpl_imul_u64,(uint64_t *pu64RAX, uint64_t *pu64RDX, uint64_t u64Factor, uint32_t *pfEFlags))
    1101 {
    1102     AssertFailed();
    1103     return -1;
    1104 }
    1105 
    1106 
    1107 IEM_DECL_IMPL_DEF(void, iemAImpl_imul_two_u64,(uint64_t *puDst, uint64_t uSrc, uint32_t *pfEFlags))
    1108 {
    1109     AssertFailed();
    1110 }
    1111 
    1112 
    1113 
    1114 IEM_DECL_IMPL_DEF(int, iemAImpl_div_u64,(uint64_t *pu64RAX, uint64_t *pu64RDX, uint64_t u64Divisor, uint32_t *pfEFlags))
    1115 {
    1116     AssertFailed();
    1117     return -1;
    1118 }
    1119 
    1120 
    1121 IEM_DECL_IMPL_DEF(int, iemAImpl_idiv_u64,(uint64_t *pu64RAX, uint64_t *pu64RDX, uint64_t u64Divisor, uint32_t *pfEFlags))
    1122 {
    1123     AssertFailed();
    1124     return -1;
    1125 }
    1126 
     1117/* misc */
    11271118
    11281119IEM_DECL_IMPL_DEF(void, iemAImpl_xchg_u64,(uint64_t *puMem, uint64_t *puReg))
     
    11361127
    11371128
    1138 IEM_DECL_IMPL_DEF(void, iemAImpl_xadd_u64,(uint64_t *puDst, uint64_t *puReg, uint32_t *pfEFlags))
    1139 {
    1140     uint64_t uDst    = *puDst;
    1141     uint64_t uResult = uDst;
    1142     iemAImpl_add_u64(&uResult, *puReg, pfEFlags);
    1143     *puDst = uResult;
    1144     *puReg = uDst;
    1145 }
    1146 
    1147 
    1148 IEM_DECL_IMPL_DEF(void, iemAImpl_xadd_u64_locked,(uint64_t *puDst, uint64_t *puReg, uint32_t *pfEFlags))
    1149 {
    1150     uint64_t uOld = ASMAtomicReadU64(puDst);
    1151     uint64_t uTmpDst;
    1152     uint32_t fEflTmp;
    1153     do
    1154     {
    1155         uTmpDst = uOld;
    1156         fEflTmp = *pfEFlags;
    1157         iemAImpl_add_u64(&uTmpDst, *puReg, pfEFlags);
    1158     } while (ASMAtomicCmpXchgExU64(puDst, uTmpDst, uOld, &uOld));
    1159     *puReg    = uOld;
    1160     *pfEFlags = fEflTmp;
     1129/* multiplication and division */
     1130
     1131IEM_DECL_IMPL_DEF(int, iemAImpl_mul_u64,(uint64_t *pu64RAX, uint64_t *pu64RDX, uint64_t u64Factor, uint32_t *pfEFlags))
     1132{
     1133    AssertFailed();
     1134    return -1;
     1135}
     1136
     1137
     1138IEM_DECL_IMPL_DEF(int, iemAImpl_imul_u64,(uint64_t *pu64RAX, uint64_t *pu64RDX, uint64_t u64Factor, uint32_t *pfEFlags))
     1139{
     1140    AssertFailed();
     1141    return -1;
     1142}
     1143
     1144
     1145IEM_DECL_IMPL_DEF(void, iemAImpl_imul_two_u64,(uint64_t *puDst, uint64_t uSrc, uint32_t *pfEFlags))
     1146{
     1147    AssertFailed();
     1148}
     1149
     1150
     1151
     1152IEM_DECL_IMPL_DEF(int, iemAImpl_div_u64,(uint64_t *pu64RAX, uint64_t *pu64RDX, uint64_t u64Divisor, uint32_t *pfEFlags))
     1153{
     1154    AssertFailed();
     1155    return -1;
     1156}
     1157
     1158
     1159IEM_DECL_IMPL_DEF(int, iemAImpl_idiv_u64,(uint64_t *pu64RAX, uint64_t *pu64RDX, uint64_t u64Divisor, uint32_t *pfEFlags))
     1160{
     1161    AssertFailed();
     1162    return -1;
    11611163}
    11621164
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