The compiler adds an explicit comparison to ensure that in case of an
integer division by zero, a run time error is raised anyway. The same is
done on PowerPC, which doesn't trigger an exception for integer division by
zero either.
As jumps in many cases are slow due to queue issues, this
On 05/29/2015 08:37 AM, Jonas Maebe wrote:
The compiler adds an explicit comparison to ensure that in case of an
integer division by zero, a run time error is raised anyway. The same
is done on PowerPC, which doesn't trigger an exception for integer
division by zero either.
As jumps in
On 05/29/2015 10:22 AM, Edmund Grimley Evans wrote:
There may be cases in which you don't need to know about the exception
immediately.
In fact - especially with high-performance applications - there are
cases where the algorithm you are doing guarantees that the divisor is
not zero, so
Edmund Grimley Evans wrote on Fri, 29 May 2015:
How much freedom do you have in the choice of which exceptions you
detect and when?
In theory: all the freedom in the world. E.g., when using the x87
instructions on x86 hardware, floating point exceptions are
(currently) only thrown when
Edmund Grimley Evans wrote:
Looking through the tests that fail on aarch64-linux I found ten that
depend on an arithmetical operation causing an exception, usually
division by zero:
tbs/tb0262
test/texception4
test/units/math/tmask
test/units/math/tmask2
webtbs/tw3157
webtbs/tw3160a
Looking through the tests that fail on aarch64-linux I found ten that
depend on an arithmetical operation causing an exception, usually
division by zero:
tbs/tb0262
test/texception4
test/units/math/tmask
test/units/math/tmask2
webtbs/tw3157
webtbs/tw3160a
webtbs/tw3160b
webtbs/tw3160c