Index: src/ppc/macro-assembler-ppc.h |
diff --git a/src/ppc/macro-assembler-ppc.h b/src/ppc/macro-assembler-ppc.h |
index 491167b227d531009629d7fb4a7d44ad3b6a238c..019ca2217cb072d86137dfd5c690fd80502022c2 100644 |
--- a/src/ppc/macro-assembler-ppc.h |
+++ b/src/ppc/macro-assembler-ppc.h |
@@ -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, |