'Generic pack with unsigned saturation.
Split args in chunks of src_size signed bits and in pack them into unsigned saturated chunks of dst_size bits.
Then chunks are concatenated resulting in a BV of len(args)*dst_size/src_size*len(args[0]) bits.'

def _op_generic_pack_StoU_saturation(self, args, src_size, dst_size):

    if ((src_size <= 0) or (dst_size <= 0)):
        raise SimOperationError(("Can't    pack    from    or    to    zero    or    negative    size" % self.name))
    result = None
    max_value = claripy.BVV((-1), dst_size).zero_extend((src_size - dst_size))
    min_value = claripy.BVV(0, src_size)
    for v in args:
        for src_value in v.chop(src_size):
            dst_value = self._op_generic_StoU_saturation(src_value, min_value, max_value)
            dst_value = dst_value.zero_extend((dst_size - src_size))
            if (result is None):
                result = dst_value
            else:
                result = self._op_concat((result, dst_value))
    return result
