Shifting an 128-bit integer consisting of four 32-bit integers
Well, I don't have a 32 bit build environment available just now.  While I wrote this for 64bit, I'm only processing 32bits at a time.  I haven't timed it, so I can't say if it is faster than yours, but it has no jumps.  At the very least, it might give you some ideas.

If the comments look like copy/paste from some C code, there's a reason for that...

; void Shl(int s, DWORD *m)
; Shift the 4 DWORDs at m left by s bits

Shl proc

; s - ecx
; m - rdx

; rax, rcx, rdx, r8-r11 are scratch under Windows 64bit calling convention

    mov r8d, [rdx + 12]     ; t1 = m3; MSB
    mov r9d, [rdx + 8]      ; t2 = m2;
    mov r10d, [rdx + 4]     ; t3 = m1;
    mov r11d, [rdx]         ; t4 = m0; LSB
    xor eax, eax            ; t0 = 0;

    cmp ecx, 32
    cmovge r8d, r9d       ; t1 = t2;
    cmovge r9d, r10d      ; t2 = t3;
    cmovge r10d, r11d     ; t3 = t4;
    cmovge r11d, eax      ; t4 = t0;

    cmp ecx, 64
    cmovge r8d, r9d       ; t1 = t2;
    cmovge r9d, r10d      ; t2 = t3;
    cmovge r10d, r11d     ; t3 = t4;

    cmp ecx, 96
    cmovge r8d, r9d       ; t1 = t2;
    cmovge r9d, r10d      ; t2 = t3;

    cmp ecx, 128
    cmovge r8d, r9d       ; t1 = t2;

    and ecx, 31

    shld r8d, r9d, cl       ; t1 = (t1 &lt;&lt; s) | (t2 &gt;&gt; (32 - s));
    shld r9d, r10d, cl      ; t2 = (t2 &lt;&lt; s) | (t3 &gt;&gt; (32 - s));
    shld r10d, r11d, cl     ; t3 = (t3 &lt;&lt; s) | (t4 &gt;&gt; (32 - s));
    shl r11d, cl            ; t4 = t4 &lt;&lt; s;     

    mov [rdx + 12], r8d  ; m[3] = t1;
    mov [rdx + 8], r9d   ; m[2] = t2;
    mov [rdx + 4], r10d  ; m[1] = t3;
    mov [rdx], r11d      ; m[0] = t4;

    ret

Shl endp


Yes, I'm using 7 registers, but if you push everything and use EBP, I think you'll be able to squeeze this in.  Another reason I prefer 64bit.