forked from len0rd/rockbox
Convert a number of places in core and plugins to use the BIT_N() macro instead of 1<<n. Speeds up things on SH1, and also reduces core binsize. Most notable speedups: 1 bit lcd driver: drawpixel +20%, drawline + 27%, hline +5%; jpeg viewer: +8% for 1/8 scaling. Other targets are unaffected.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21205 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c3182ec333
commit
1d6df54df2
24 changed files with 88 additions and 70 deletions
|
|
@ -24,6 +24,7 @@
|
|||
#include <stdbool.h>
|
||||
#include <inttypes.h>
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
|
||||
/* Format a large-range value for output, using the appropriate unit so that
|
||||
* the displayed value is in the range 1 <= display < 1000 (1024 for "binary"
|
||||
|
|
@ -103,7 +104,7 @@ char *strip_extension(char* buffer, int buffer_size, const char *filename);
|
|||
* - position: 0-based number of the value
|
||||
* - valid_vals: value after the call to 'parse_list'
|
||||
*/
|
||||
#define LIST_VALUE_PARSED(setvals, position) ((setvals)&(1<<(position)))
|
||||
#define LIST_VALUE_PARSED(setvals, position) ((setvals) & BIT_N(position))
|
||||
const char* parse_list(const char *fmt, uint32_t *set_vals,
|
||||
const char sep, const char* str, ...);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue