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