On 11/01/16 16:39, Jakub Jelinek wrote:
On Mon, Jan 11, 2016 at 05:11:21PM +0100, Christophe Lyon wrote:
I tested a similar version on my side. It just makes the test become
UNSUPPORTED for arm/aarch64 + newlib. They used to pass, though.
Is anything bad on that? The test tests functions that newlib does not
implement, so it is not wrong not to optimize those.
Jakub
Unfortunately c99_functions is a very wide net. For instance, newlib
supports the ceill, but doesn't support wscanf_s nor any bounds checking
function I think.
I extracted all function names from the C99 standard and did a quick nm
and grep to look into whether newlib defined these for arm-none-eabi.
The functions I found missing fall into the following sections:
- Complex Arithmetic (which fall under the function_c99_math_complex class)
- floating-point environment
- Functions for greatest-width integer types
- atomics (missing atomic_is_lock_free and atomic_fetch_key)
- Bounds-checking interfaces
So arm-none-eabi used to be able to "legally" perform the transformation
that we are speaking of. Though since that optimization is now guarded
with the function_c99_misc class it is no longer performed, since we can
not claim newlib supports all functions that are caught by
function_c99_misc.
I don't quite know how to proceed. I suspect a new function class for
C99 math functions (excluding complex) would help here and probably more
places too. Though, I don't know how much work it would be to split
function_c99_misc in that manner.
Opinions welcome!!
Cheers,
Andre