[fpc-devel] no exceptions from arithmetical operations on AArch64
Edmund Grimley Evans
edmund.grimley.evans at gmail.com
Thu May 28 23:21:24 CEST 2015
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
webtbs/tw3161
webtbs/tw4100
In AArch64 the instruction for integer division never causes an
exception, and floating-point arithmetic can only cause an exception
if an optional part of the architecture is enabled; most hardware
doesn't even have the option. Clearly the compiler could generate code
to check for exceptions but it would be very inefficient when those
exceptions are not required.
I can't find an explicit statement in the documentation but this
example suggests that exceptions from arithmetical operations are not
required by the language definition:
http://www.freepascal.org/docs-html/ref/refse101.html#x212-22200017.1
So, can those tests be disabled on AArch64, by adding
{ %skipcpu=aarch64 }?
Edmund
More information about the fpc-devel
mailing list