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: Jan Bobek
Subject: Re: [Qemu-devel] [RISU RFC PATCH v2 01/14] risugen_common: add insnv, randint_constr, rand_fill
Date: Wed, 10 Jul 2019 13:48:18 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Hi Richard,

sorry for replying so late. I read your comments last week; as I
mentioned in our weekly update email, I ended up adding/removing quite
a lot since v2, so I wasn't 100% sure how much of it will remain
relevant.

Anyways,

On 7/3/19 11:22 AM, Richard Henderson wrote:
> 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.

Good point. *facepalm*

I will include this change in v3.

-Jan

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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