Changeset 205507 in webkit for trunk/Source/JavaScriptCore/jit/AssemblyHelpers.cpp
- Timestamp:
- Sep 6, 2016, 2:35:24 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/AssemblyHelpers.cpp
r205504 r205507 627 627 } 628 628 629 #if USE(JSVALUE64)630 void AssemblyHelpers::wangsInt64Hash(GPRReg inputAndResult, GPRReg scratch)631 {632 GPRReg input = inputAndResult;633 // key += ~(key << 32);634 move(input, scratch);635 lshift64(TrustedImm32(32), scratch);636 not64(scratch);637 add64(scratch, input);638 // key ^= (key >> 22);639 move(input, scratch);640 urshift64(TrustedImm32(22), scratch);641 xor64(scratch, input);642 // key += ~(key << 13);643 move(input, scratch);644 lshift64(TrustedImm32(13), scratch);645 not64(scratch);646 add64(scratch, input);647 // key ^= (key >> 8);648 move(input, scratch);649 urshift64(TrustedImm32(8), scratch);650 xor64(scratch, input);651 // key += (key << 3);652 move(input, scratch);653 lshift64(TrustedImm32(3), scratch);654 add64(scratch, input);655 // key ^= (key >> 15);656 move(input, scratch);657 urshift64(TrustedImm32(15), scratch);658 xor64(scratch, input);659 // key += ~(key << 27);660 move(input, scratch);661 lshift64(TrustedImm32(27), scratch);662 not64(scratch);663 add64(scratch, input);664 // key ^= (key >> 31);665 move(input, scratch);666 urshift64(TrustedImm32(31), scratch);667 xor64(scratch, input);668 669 // return static_cast<unsigned>(result)670 void* mask = bitwise_cast<void*>(static_cast<uintptr_t>(UINT_MAX));671 and64(TrustedImmPtr(mask), inputAndResult);672 }673 #endif // USE(JSVALUE64)674 675 629 } // namespace JSC 676 630
Note:
See TracChangeset
for help on using the changeset viewer.