Commit 7d65a62f authored by dstence's avatar dstence Committed by Commit bot

PPC: smi test optimization

R=mbrandy@us.ibm.com, michael_dawson@ca.ibm.com
BUG=

Review URL: https://codereview.chromium.org/1177263002

Cr-Commit-Position: refs/heads/master@{#28960}
parent 6a831522
......@@ -1063,11 +1063,16 @@ class MacroAssembler : public Assembler {
DCHECK(rangeStart >= rangeEnd && rangeStart < kBitsPerPointer);
int rotate = (rangeEnd == 0) ? 0 : kBitsPerPointer - rangeEnd;
int width = rangeStart - rangeEnd + 1;
if (rc == SetRC && rangeEnd == 0 && width <= 16) {
andi(dst, src, Operand((1 << width) - 1));
} else {
#if V8_TARGET_ARCH_PPC64
rldicl(dst, src, rotate, kBitsPerPointer - width, rc);
rldicl(dst, src, rotate, kBitsPerPointer - width, rc);
#else
rlwinm(dst, src, rotate, kBitsPerPointer - width, kBitsPerPointer - 1, rc);
rlwinm(dst, src, rotate, kBitsPerPointer - width, kBitsPerPointer - 1,
rc);
#endif
}
}
inline void ExtractBit(Register dst, Register src, uint32_t bitNumber,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment