[Libre-soc-bugs] [Bug 671] convert spec pseudocode to use XLEN width
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Wed Sep 29 09:17:09 BST 2021
https://bugs.libre-soc.org/show_bug.cgi?id=671
--- Comment #73 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to dmitry.selyutin from comment #72)
> It seems I missed extsb and extsh routines. These must also be converted.
> Ideas on the semantics?
sign-extend/truncate the input from XLEN to 8/16 bits, then
sign-extend/truncate to XLEN
so extsb is the equivalent of C's:
return (xlen_t)(int8_t)input;
and extsh is:
return (xlen_t)(int16_t)input;
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list