[Libre-soc-isa] [Bug 1087] change pseudocode to prevent output register write only when causing a fp trap and output is in same regfile as input

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Wed May 24 11:02:40 BST 2023


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

--- Comment #25 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #24)
> wait... are you saying that, at the moment, a zero is written into
> the regfile when a TRAP is called?

no, at the moment, the GPR regfile is unmodified when a fp trap occurs. the
value of RT must be read from the GPR regfile so Rc=1 can compute the correct
value of CR0.
> 
> are you then saying "that is bad"?

yes, for hw.

>  because if so don't believe it is:
> compilers have to expect that register contents to be (statically)
> allocated regardless of the exception.
> 
> IBM declares the result register "UNDEFINED" under these circumstances

imho that's unacceptable here, RT must either be unmodified (not written; for
consistency with fp ops even though the reason that's done for fp ops doesn't
apply here) or have the correct output (following the defined conversion
semantics).

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


More information about the Libre-SOC-ISA mailing list