Hallo alle:

The specification for l.div and l.divu is a little lacking. This is how or1ksim (and my new OR10 CPU) behave:

- The Overflow flag is always reset.
- The Carry flag is always modified.
- If the divisor is zero:
1) The destination register is not modified.
2) The Carry flag is set, and, if the OVE flag is set in SR, a Range exception is raised. This is somewhat unusual as the Overflow (OV) flag (and not the CY flag) is normally the one that raises Range exceptions.

By the way, these instructions do not deliver the reminder (modulo). Is this a serious shortcoming? Or are modulo operations little used in "real life"?

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

Reply via email to