[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] May avr-libc use functions from libgcc?
From: |
Georg-Johann Lay |
Subject: |
[avr-gcc-list] May avr-libc use functions from libgcc? |
Date: |
Sun, 07 Oct 2012 10:25:45 +0200 |
User-agent: |
Thunderbird 2.0.0.24 (Windows/20100228) |
Is is legitimate that assembler functions in avr-libc call functions
implemented in libgcc directly?
This would make some assumptions, e.g. on naming conventions.
Calling directly can lead so smaller and faster code because some
functions in libgcc implement a special ABI.
For example __udivmodqi4 (unsigned 8-bit quotient and remainder) does
not clobber X or Z so that the caller can hold values in these registers
across the call which reduces register pressure in the caller.
Are such calls "allowed" in avr-libc provided
- The special interface is documented in libgcc sources and mentions
that avr-libc makes use of the special interface
- The functions with their special interface are documented, e.g. in
the GCC wiki
The question is for code that is not yet part of avr-libc, namely the
upcoming fixed-point support; it's not about optimizing code that's
already there.
Sean said that CORDIC shows bad rounding for asin, for example.
I played around with a home-brew asin approach that has no rounding
issues. The performance of the implementation can be improved if
knowledge of libgcc is used.
Johann
- [avr-gcc-list] May avr-libc use functions from libgcc?,
Georg-Johann Lay <=