Bug 792581 - part 14 - Replace LL_SHL, LL_SHR, LL_USHR macros with bitwise operators. r=ehsan

This commit is contained in:
Andrew Quartey 2012-10-12 13:29:10 -04:00
parent a827972c3d
commit 7d3807c62d
3 changed files with 5 additions and 6 deletions

View File

@ -946,8 +946,7 @@ nsCacheProfilePrefObserver::MemoryCacheCapacity()
if (bytes > INT64_MAX)
bytes = INT64_MAX;
uint64_t kbytes;
LL_SHR(kbytes, bytes, 10);
uint64_t kbytes = bytes >> 10;
double kBytesD;
LL_L2D(kBytesD, (int64_t) kbytes);

View File

@ -241,7 +241,7 @@ struct DateHashEntry : public PLDHashEntryHdr {
// xor the low 32 bits with the high 32 bits.
PRTime t = *static_cast<const PRTime *>(key);
int64_t h64, l64;
LL_USHR(h64, t, 32);
h64 = t >> 32;
l64 = LL_INIT(0, 0xffffffff);
l64 &= t;
int32_t h32, l32;

View File

@ -88,12 +88,12 @@ myLL_L2II(int64_t result, int32_t *hi, int32_t *lo )
// and I am a wimp.
// shift the hi word to the low word, then push it into a long.
LL_SHR(a64, result, 32);
a64 = result >> 32;
LL_L2I(*hi, a64);
// shift the low word to the hi word first, then shift it back.
LL_SHL(b64, result, 32);
LL_SHR(a64, b64, 32);
b64 = result << 32;
a64 = b64 >> 32;
LL_L2I(*lo, a64);
}