bugAVR C Runtime Library - Bugs: bug #18994, minor optimization possible to...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #18994: minor optimization possible to stdlib functions isspace(), isprint(), and islower()

Submitter:  None
Submitted:  Thu 08 Feb 2007 11:14:47 AM UTC
   
 
Category:  Library Severity:  3 - Normal
Priority:  9 - Immediate Item Group:  libc code
Status:  Fixed Assigned to:  None
Percent Complete:  0% Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  None
Fixed Release:  None

Thu 08 Feb 2007 11:14:47 AM UTC, original submission:  

The stdlib function isdigit uses a compact way to test if input is within a given range:

GLOBAL(isdigit)
          CPSE  rHigh,__zero_reg__
1:       
          RJMP  _U(__ctype_isfalse)
          SUBI  rLow,'0'
          SUBI  rLow,10
          BRSH  1b
          RET                      ; rLow: -10..-1

          ENDFUNC

Other functions in the same file (ctype.S) use the slightly larger CPI-BRLT-CPI-BRGE combination to test the same thing. At least isspace, isprint and islower could use a similar test as isdigit.

Anonymous

 

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

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 dmix (Updated the item)
  • -email is unavailable- added by arcanum (Updated the item)
  •  

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-12-16 dmix Open/ClosedOpen Closed
    2007-12-16 dmix StatusNone Fixed
    2007-09-12 arcanum Priority5 - Normal 9 - Immediate

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code