Changeset 204009 in webkit
- Timestamp:
- Aug 1, 2016 10:02:27 PM (8 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r203996 r204009 1 2016-08-01 Benjamin Poulain <bpoulain@apple.com> 2 3 [JSC][ARM64] Fix branchTest32/64 taking an immediate as mask 4 https://bugs.webkit.org/show_bug.cgi?id=160439 5 6 Reviewed by Filip Pizlo. 7 8 * assembler/MacroAssemblerARM64.h: 9 (JSC::MacroAssemblerARM64::branchTest64): 10 * b3/air/AirOpcode.opcodes: 11 Fix the ARM64 codegen to lower BitImm64 without using a scratch register. 12 1 13 2016-07-22 Filip Pizlo <fpizlo@apple.com> 2 14 -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM64.h
r203851 r204009 2521 2521 Jump branchTest64(ResultCondition cond, RegisterID reg, TrustedImm64 mask) 2522 2522 { 2523 move(mask, getCachedDataTempRegisterIDAndInvalidate()); 2524 return branchTest64(cond, reg, dataTempRegister); 2523 if (mask.m_value == -1) { 2524 if ((cond == Zero) || (cond == NonZero)) 2525 return Jump(makeCompareAndBranch<64>(static_cast<ZeroCondition>(cond), reg)); 2526 m_assembler.tst<64>(reg, reg); 2527 } else if (hasOneBitSet(mask.m_value) && ((cond == Zero) || (cond == NonZero))) 2528 return Jump(makeTestBitAndBranch(reg, getLSBSet(mask.m_value), static_cast<ZeroCondition>(cond))); 2529 else { 2530 LogicalImmediate logicalImm = LogicalImmediate::create64(mask.m_value); 2531 2532 if (logicalImm.isValid()) { 2533 m_assembler.tst<64>(reg, logicalImm); 2534 return Jump(makeBranch(cond)); 2535 } 2536 2537 move(mask, getCachedDataTempRegisterIDAndInvalidate()); 2538 m_assembler.tst<64>(reg, dataTempRegister); 2539 } 2540 return Jump(makeBranch(cond)); 2525 2541 } 2526 2542 -
trunk/Source/JavaScriptCore/b3/air/AirOpcode.opcodes
r203996 r204009 681 681 BranchTest32 U:G:32, U:G:32, U:G:32 /branch 682 682 ResCond, Tmp, Tmp 683 x86:ResCond, Tmp, BitImm683 ResCond, Tmp, BitImm 684 684 x86: ResCond, Addr, BitImm 685 685 x86: ResCond, Index, BitImm … … 689 689 64: BranchTest64 U:G:32, U:G:64, U:G:64 /branch 690 690 ResCond, Tmp, Tmp 691 arm64: ResCond, Tmp, BitImm64 691 692 x86: ResCond, Tmp, BitImm 692 693 x86: ResCond, Addr, BitImm -
trunk/Source/WTF/ChangeLog
r203911 r204009 1 2016-08-01 Benjamin Poulain <bpoulain@apple.com> 2 3 [JSC][ARM64] Fix branchTest32/64 taking an immediate as mask 4 https://bugs.webkit.org/show_bug.cgi?id=160439 5 6 Reviewed by Filip Pizlo. 7 8 * wtf/MathExtras.h: 9 (getLSBSet): 10 This was not working at all for MacroAssembler. 11 Since TrustedImm32/64 are signed integers, the arithmetic shift would 12 never get rid of the top bit and we get an infinite loop. 13 1 14 2016-07-29 Mark Lam <mark.lam@apple.com> 2 15 -
trunk/Source/WTF/wtf/MathExtras.h
r199133 r204009 216 216 template <typename T> inline unsigned getLSBSet(T value) 217 217 { 218 typedef typename std::make_unsigned<T>::type UnsignedT; 218 219 unsigned result = 0; 219 220 220 while (value >>= 1) 221 UnsignedT unsignedValue = static_cast<UnsignedT>(value); 222 while (unsignedValue >>= 1) 221 223 ++result; 222 224
Note: See TracChangeset
for help on using the changeset viewer.