Hello,
In register "c1, System Control Register" bit 19
[19] DZ Divide by zero:
0 = do not generate an Undefined instruction exception
1 = generate an Undefined instruction exception.
The reset value of this bit is 0.
I would like to change this value to 1, so an undefined instruction exception is generated. The question is:
How can I know if the reason of the undefined instruction exception is a division by zero or any other cause?
In the "ARM Architecture Reference Manual" I can read
"The only mechanism to determine the cause of an Undefined Instruction exception is analysis of the instruction indicated by the return link in the LR on exception entry. Therefore it is important that a coprocessor only reports exceptional conditions by generating Undefined Instruction exceptions on its own coprocessor instructions."
So, I guess that the only way of knowing if the undefined instruction exception was caused by a division by zero is to check if LR points to a either UDIV or SDIV instructions and divisor is 0.
Is there an easier way to know if the undefined instruction exception was caused by a division by zero?
Thanks for helping.
Francis.

