| Index: src/ppc/macro-assembler-ppc.cc
|
| diff --git a/src/ppc/macro-assembler-ppc.cc b/src/ppc/macro-assembler-ppc.cc
|
| index 3f8640a408fdf9b9393c78c164d387705424c0a9..2e3fafa09df51a87bc6cb251d92e96a972082abc 100644
|
| --- a/src/ppc/macro-assembler-ppc.cc
|
| +++ b/src/ppc/macro-assembler-ppc.cc
|
| @@ -803,6 +803,52 @@ void MacroAssembler::ConvertDoubleToUnsignedInt64(
|
| }
|
| #endif
|
|
|
| +#if !V8_TARGET_ARCH_PPC64
|
| +void MacroAssembler::PairShiftLeft(Register dst_low, Register dst_high,
|
| + Register src_low, Register src_high,
|
| + Register scratch, Register shift) {
|
| + DCHECK(!AreAliased(dst_low, src_high, shift));
|
| + DCHECK(!AreAliased(dst_high, src_low, shift));
|
| + Label less_than_32;
|
| + Label done;
|
| + cmpi(shift, Operand(32));
|
| + blt(&less_than_32);
|
| + // If shift >= 32
|
| + andi(scratch, shift, Operand(0x1f));
|
| + slw(dst_high, src_low, scratch);
|
| + li(dst_low, Operand::Zero());
|
| + b(&done);
|
| + bind(&less_than_32);
|
| + // If shift < 32
|
| + subfic(scratch, shift, Operand(32));
|
| + slw(dst_high, src_high, shift);
|
| + srw(scratch, src_low, scratch);
|
| + orx(dst_high, dst_high, scratch);
|
| + slw(dst_low, src_low, shift);
|
| + bind(&done);
|
| +}
|
| +
|
| +void MacroAssembler::PairShiftLeft(Register dst_low, Register dst_high,
|
| + Register src_low, Register src_high,
|
| + uint32_t shift) {
|
| + DCHECK(!AreAliased(dst_low, src_high));
|
| + DCHECK(!AreAliased(dst_high, src_low));
|
| + Label less_than_32;
|
| + Label done;
|
| + if (shift >= 32) {
|
| + shift &= 0x1f;
|
| + slwi(dst_high, src_low, Operand(shift));
|
| + li(dst_low, Operand::Zero());
|
| + } else if (shift == 0) {
|
| + Move(dst_low, src_low);
|
| + Move(dst_high, src_high);
|
| + } else {
|
| + slwi(dst_high, src_high, Operand(shift));
|
| + rlwimi(dst_high, src_low, shift, 32 - shift, 31);
|
| + slwi(dst_low, src_low, Operand(shift));
|
| + }
|
| +}
|
| +#endif
|
|
|
| void MacroAssembler::LoadConstantPoolPointerRegisterFromCodeTargetAddress(
|
| Register code_target_address) {
|
|
|