qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RISU PATCH v3 05/18] risugen_x86_memory: add module


From: Jan Bobek
Subject: Re: [Qemu-devel] [RISU PATCH v3 05/18] risugen_x86_memory: add module
Date: Mon, 22 Jul 2019 09:53:36 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 7/20/19 9:58 PM, Richard Henderson wrote:
> On 7/11/19 3:32 PM, Jan Bobek wrote:
>> +sub load(%)
>> +{
>> +    my (%args) = @_;
>> +
>> +    @memory_opts{keys %args} = values %args;
>> +    $memory_opts{is_write}   = 0;
>> +}
>> +
>> +sub store(%)
>> +{
>> +    my (%args) = @_;
>> +
>> +    @memory_opts{keys %args} = values %args;
>> +    $memory_opts{is_write}   = 1;
>> +}
> 
> I was thinking maybe we should add a mem() that allows a "store => $d", which
> would simplify the "$d ? store(size => x) : load(size => x)" pattern.
> 
> Anyway, that's incremental improvement.

It's possible. I suppose the reason why I did it like I did was that I
wanted the config file to be more descriptive: if you specify a
constraint like mem(store => 0, ...), it might not be immediately
clear that it actually means a load. It's not an issue when you know
the code, but if somebody were just browsing the x86.risu without
prior knowledge of anything, they might find it more cryptic.

Anyway, so much for my reasoning; I agree that it would make the
conditions simpler, so feel free to change it if you like.

-Jan

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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