[Libre-soc-isa] [Bug 1017] ISA WG RFC for binary and ternary bitops

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Mon Mar 13 21:42:11 GMT 2023


https://bugs.libre-soc.org/show_bug.cgi?id=1017

--- Comment #8 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #5)
> in the RFC is not an appropriate place to put these statements:
> 
> +* TODO: imho taking a LUT from a CR isn't useful, therefore `bincrlut`
> should
> +  be dropped and `crbinlog` should be changed to take its LUT argument from
> a GPR.
> + 
> <https://libre-soc.org/irclog/%23libre-soc.2023-03-10.log.html#t2023-03-
> 10T21:10:56>
> 
> the reason for using the CR is because it is 4 bits.
> reading a GPR requires 64-bit port reads of which
> 60 bits are discarded.
> 
> with the crweird ops, CR field operations become
> much more powerful.

those are true, however that doesn't change that those operations really should
be using GPRs for the lookup table:
GPRs are *still* much more powerful than CRs even with crweird ops, CRs are
intended for boolean values hence why they don't support much other than
boolean operations. GPRs are much more general, they also support shifts,
grevs, rotates, loads/stores, etc. all of which are operations you'd generally
want to run on the look-up-table, CRs support none of those, so by having no
crbinlog instruction that takes the look-up-table from GPRs you've effectively
forced the programmer to almost always need a separate GPR to CR move operation
for every crbinlog, making it about twice as expensive as necessary.

this imho is kinda like adding an instruction to load pi or tau as a fp
constant, except deciding that the destination register must only be the CTR
register even though almost all uses of pi or tau require the value in a
FPR...can you see my point?

imho it's fine to have an instruction that takes the look-up-table from a CR
(since that's occasionally what you want) but *only* as long as there's always
a corresponding instruction that takes the look-up-table from a GPR. if there
isn't, I expect the ISA WG to complain and possibly reject crbinlog and friends
completely.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Libre-SOC-ISA mailing list