pub fn shift_c(input: u32, shift_t: u32, shift_n: u32, carry_in: u32) -> (u32, bool) {
    // A7.4.2
    if shift_n == 0 {
        return (input, carry_in == 1);
    }
    return match shift_t {
        0b00 => lsl_c(input, shift_n),
        0b01 => lsr_c(input, shift_n),
        0b10 => asr_c(input, shift_n),
        0b11 => rrx_c(input, carry_in),
        0b100 => ror_c(input, shift_n),
        _ => unreachable!(),
    }
}
// NOTE: shift_n has already been adjusted for asr/lsr
shift_n has already been adjusted for asr/lsr
shift_n has already been adjusted for asr / lsr
pub fn shift_c(input: u32, shift_t: u32, shift_n: u32, carry_in: u32) -> (u32, bool) {
    // A7.4.2
    if shift_n == 0 {
        return (input, carry_in == 1);
    }
    return match shift_t {
        0b00 => lsl_c(input, shift_n),
        0b01 => lsr_c(input, shift_n),
        0b10 => asr_c(input, shift_n),
        0b11 => rrx_c(input, carry_in),
        0b100 => ror_c(input, shift_n),
        _ => unreachable!(),
    }
}
pub fn shift_c ( input : u32 , shift_t : u32 , shift_n : u32 , carry_in : u32 ) -> ( u32 , bool ) { // A7.4.2 if shift_n == 0 { return ( input , carry_in == 1 ) ; } return match shift_t { 0b00 => lsl_c ( input , shift_n ) , 0b01 => lsr_c ( input , shift_n ) , 0b10 => asr_c ( input , shift_n ) , 0b11 => rrx_c ( input , carry_in ) , 0b100 => ror_c ( input , shift_n ) , _ => unreachable ! ( ) , } }
NOTE: shift_n has already been adjusted for asr/lsr
NOTE : shift_n has already been adjusted for asr / lsr
input
u32
shift_t
u32
shift_n
u32
carry_in
u32