bugAVR C Runtime Library - Bugs: bug #35496, _FFS: Macro should be obsoleted/no...


bug #35496: _FFS: Macro should be obsoleted/no more recommended

Submitted by:  Georg-Johann Lay <gjlayde>
Submitted on:  Thu 09 Feb 2012 09:43:52 PM UTC  
Category:  Library Severity:  3 - Normal
Priority:  9 - Immediate Item Group:  libc code
Status:  Wont Fix Percent Complete:  0%
Assigned to:  None Open/Closed:  Closed
Release:  1.8.0 Fixed Release:  None

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 16 Nov 2012 08:57:21 PM UTC, comment #2:

GCC's optimization for ffs depends on -std=, and users will use ffs and not __builtin_ffs.

I'd say close this issue

...because it is tedious to work out in configure whether or not avr-gcc comes with optimized ffs insns and if it's appropriate that libc maps ffs to __builtin_ffs or not.

Georg-Johann Lay <gjlayde>
Fri 16 Nov 2012 06:44:09 PM UTC, comment #1:

Johann, which file needs to be changed?

Eric Weddington <arcanum>
Project Administrator
Thu 09 Feb 2012 09:43:52 PM UTC, original submission:

GCC's builtin machinery can fold ffs* with constant arguments.

If a no-constant is passed to ffs resp. ffsl then avr-gcc provides efficient assembler implementations, see __ffshi2 and __ffssi2 in libgcc:


Notice that avr-gcc is aware of the reduces register footprint of these libgcc functions.

Georg-Johann Lay <gjlayde>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by arcanum (Posted a comment)
  • -email is unavailable- added by gjlayde (Submitted the item)

    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    Fri 16 Nov 2012 09:11:19 PM UTC arcanum StatusNone => Wont Fix
        Open/ClosedOpen => Closed
    Fri 16 Nov 2012 06:44:09 PM UTC arcanum Priority5 - Normal => 9 - Immediate

    Back to the top

    Powered by Savane 3.3