[Libre-soc-bugs] [Bug 684] XLEN-16 fails when XLEN=8

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Tue Sep 14 19:01:56 BST 2021


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

Jacob Lifshay <programmerjake at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |programmerjake at gmail.com

--- Comment #8 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #7)
> (In reply to Luke Kenneth Casson Leighton from comment #6)
> > for andi xori etc. these should all be something like:
> > 
> > if XLEN=8 then
> >     RA <- (RS) ^ UI[8:15]
> > else
> >     RA <- (RS) ^ ([0]*(XLEN-16) || UI)
> 
> i had a bit of a think about this, and feel that this is one
> of those exceptional cases where we could justify a function,
> to be added to section 1.3.2

I disagree... the code could be easily written as:
RA <- (RS) ^ ([0]*48 || UI)[63-XLEN:63]

and instructions like xoris would be:
RA <- (RS) ^ ([0]*32 || UI || [0]*16)[63-XLEN:63]

It would not be useful for XLEN <= 16, but still valid. xori would be used
instead for XLEN <= 16.

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


More information about the libre-soc-bugs mailing list