avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] [FIX] _clz and friends not found (test builtin-bitops-1)


From: Wouter van Gulik
Subject: [avr-gcc-list] [FIX] _clz and friends not found (test builtin-bitops-1)
Date: Fri, 25 Jan 2008 13:35:07 +0100
User-agent: Thunderbird 2.0.0.9 (Windows/20071031)

Hi list,

I have been planning this fix of __clz a long time. I wanted to test it against gcc testsuite which required fixing all of missing functions. So I did the missing functions as well! It will now pass the earlier failed testcase "builtin-bitops-1". There is one small catch, you need to have avr-libc (see makefile) since avr-libc has a __ffsi implementation. I tested the clzsi2 against all 4.2 billion cases :P It would have saved me a half a day if avrtest was twice as fast :). I tested the rest against the test case.

The whole file could also be optimized for size because loop functions end with the same 3 instruction. Is such a trick allowed within the library?

The assembler is written so it should just be a copy paste into libgcc.s in the avr tree of gcc, excluding the macro for movw. Then the "ADEFS" list should be added to the list in the t-avr file and gcc rebuild. Could anyone (Adrew, Paulo, Dmitry?) with a testsuite confirm this fix?

Wouter

Note: that this also fixes the "too much ram by clz" and (AFAIK) an unreported "too much ram" for popcount.

Attachment: clz.zip
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]