Hallo Peter:

> I was just wondering if there's a real implementation
> that actually implements the l.mul and l.mulu
> instructions correctly, including the OV and CY flags,

Yes, my OR10 CPU implements them correctly and the Test Suite in orbuild does 
test them too. But that's a recent development, I would be happy to change it 
if necessary.


The specification is vague and or1ksim's behaviour doesn't match what I've 
written, as its OV/CY implementation is not practical for a real CPU, see my 
previous e-mails on this list.



> and if any software actually uses them.
> [...]

I haven't found any software that uses them, but then again I haven't seen much 
OpenRISC software at all, and it's hard to know for sure that there isn't any.


> Would anyone be bothered if the CY flag was never set by the l.mul and l.mulu 
> instructions,
> and instead, the OV flag was set for signed overflow in the case of l.mul,
> and for unsigned overflow in the case of l.mulu?

I think the best fix would be to add a separate trap for the CY flag, as there 
may be other instructions where we want to catch unsigned overflows too. But 
your suggestion is a good compromise for l.mulu. When you say "CY flag never 
set", do you mean it should always be reset, or just left untouched?


Regards,
  rdiez

_______________________________________________
OpenRISC mailing list
[email protected]
http://lists.openrisc.net/listinfo/openrisc

Reply via email to