On 06/25/2018 10:47 AM, Peter Maydell wrote: >> + status, vsz, vsz, a->index * 2 + a->sub, > Why are we multiplying the index by 2 here? Are we just encoding > (index, sub) into a constant to pull out again the other side? > If so, comment might help. (Also I find shifts and ors make it > clearer that we're just shifting values around; multiplication > and addition to me implies that we're really doing arithmetic.) >
Yes, this is just encoding. I sometimes use multiply and add to avoid needing extra parenthesis. r~
