qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RISU RFC PATCH v2 01/14] risugen_common: add insnv, ra


From: Richard Henderson
Subject: Re: [Qemu-devel] [RISU RFC PATCH v2 01/14] risugen_common: add insnv, randint_constr, rand_fill
Date: Wed, 3 Jul 2019 17:22:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1

On 7/1/19 6:35 AM, Jan Bobek wrote:
> +    while ($bitcur < $bitend) {
> +        my $format;
> +        my $bitlen;
> +
> +        if ($bitcur + 64 <= $bitend) {
> +            $format = "Q";
> +            $bitlen = 64;
> +        } elsif ($bitcur + 32 <= $bitend) {
> +            $format = "L";
> +            $bitlen = 32;
> +        } elsif ($bitcur + 16 <= $bitend) {
> +            $format = "S";
> +            $bitlen = 16;
> +        } else {
> +            $format = "C";
> +            $bitlen = 8;
> +        }
> +
> +        $format .= ($args{bigendian} ? ">" : "<") if $bitlen > 8;

It now occurs to me to wonder if it's worth simplifying this function to always
emit bytes, and thus take care of all of the endianness ourselves, since we're
doing it anyway for larger/odd-sized hunks.

Otherwise,
Reviewed-by: Richard Henderson <address@hidden>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]