Lines Matching refs:shift

3268   int shift = CTZ(imm);
3269 __ sarl(num, Immediate(shift));
3306 int shift;
3307 CalculateMagicAndShiftForDivRem(imm, false /* is_long */, &magic, &shift);
3337 if (shift != 0) {
3338 __ sarl(edx, Immediate(shift));
3686 // The shift count needs to be in CL or a constant.
3719 int32_t shift = second.GetConstant()->AsIntConstant()->GetValue() & kMaxIntShiftDistance;
3720 if (shift == 0) {
3723 Immediate imm(shift);
3747 int32_t shift = second.GetConstant()->AsIntConstant()->GetValue() & kMaxLongShiftDistance;
3748 // Nothing to do if the shift is 0, as the input is already the output.
3749 if (shift != 0) {
3751 GenerateShlLong(first, shift);
3753 GenerateShrLong(first, shift);
3755 GenerateUShrLong(first, shift);
3766 void InstructionCodeGeneratorX86::GenerateShlLong(const Location& loc, int shift) {
3769 if (shift == 1) {
3773 } else if (shift == 32) {
3782 } else if (shift > 32) {
3783 // Low part becomes 0. High part is low part << (shift-32).
3785 __ shll(high, Immediate(shift - 32));
3789 __ shld(high, low, Immediate(shift));
3790 __ shll(low, Immediate(shift));
3805 void InstructionCodeGeneratorX86::GenerateShrLong(const Location& loc, int shift) {
3808 if (shift == 32) {
3813 } else if (shift > 32) {
3815 // High part becomes sign. Low part is shifted by shift - 32.
3818 __ sarl(low, Immediate(shift - 32));
3821 __ shrd(low, high, Immediate(shift));
3822 __ sarl(high, Immediate(shift));
3837 void InstructionCodeGeneratorX86::GenerateUShrLong(const Location& loc, int shift) {
3840 if (shift == 32) {
3849 } else if (shift > 32) {
3850 // Low part is high >> (shift - 32). High part becomes 0.
3852 __ shrl(low, Immediate(shift - 32));
3856 __ shrd(low, high, Immediate(shift));
3857 __ shrl(high, Immediate(shift));
3883 // The shift count needs to be in CL (unless it is a constant).