Hi Johann,
Hi, just out of curiosity: Is there a special reason to add a
stormy16-specific implementation instead of using the code in
libgcc2.c? t-avr for example uses the C implementation in libgcc2.c
for HI. Are there disadvantages?

Apart from not using some slightly frightening makefile magic ? No, no real reason. In fact the implementation in stormy16/lib2funcs.c is based directly on the code in libgcc2.c.

I prefer my current approach because if it turns out that this function is used a lot then it will easy to replace the current C implementation with hand coded assembler. But if there was a way to automate the detection of bit counting functions in libgcc2.c, so that when a new one is added we would not have to update t-avr or t-stormy16, then I would go with your approach.

Cheers
  Nick

Reply via email to