static inline uint8_t mipsdsp_lshift8(uint8_t a, uint8_t s, CPUMIPSState *env)

{

    uint8_t sign;

    uint8_t discard;



    if (s == 0) {

        return a;

    } else {

        sign = (a >> 7) & 0x01;

        if (sign != 0) {

            discard = (((0x01 << (8 - s)) - 1) << s) |

                      ((a >> (6 - (s - 1))) & ((0x01 << s) - 1));

        } else {

            discard = a >> (6 - (s - 1));

        }



        if (discard != 0x00) {

            set_DSPControl_overflow_flag(1, 22, env);

        }

        return a << s;

    }

}
