AVR 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 |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
Follow 3 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2007-12-16 | dmix | Open/Closed | Open | Closed | |
2007-12-16 | dmix | Status | None | Fixed | |
2007-09-12 | arcanum | Priority | 5 - Normal | 9 - Immediate |
Powered by Savane 3.13-caa5.
Corresponding source code
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.