diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-27 02:52:20 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-27 02:52:20 +0000 |
commit | defc1ea34074e7882724c460260d307cdf981a70 (patch) | |
tree | fca9b9a5fe243f9c0c76b84824ea2ff92ea8e589 /libbb/xatonum_template.c | |
parent | 26bc57d8b26425f23f4be974cce7bf35c95c9a1a (diff) | |
download | busybox-w32-defc1ea34074e7882724c460260d307cdf981a70.tar.gz busybox-w32-defc1ea34074e7882724c460260d307cdf981a70.tar.bz2 busybox-w32-defc1ea34074e7882724c460260d307cdf981a70.zip |
*: introduce and use FAST_FUNC: regparm on i386, otherwise no-on
text data bss dec hex filename
808035 611 6868 815514 c719a busybox_old
804472 611 6868 811951 c63af busybox_unstripped
Diffstat (limited to 'libbb/xatonum_template.c')
-rw-r--r-- | libbb/xatonum_template.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/libbb/xatonum_template.c b/libbb/xatonum_template.c index 9f9dc1102..2360ae88a 100644 --- a/libbb/xatonum_template.c +++ b/libbb/xatonum_template.c | |||
@@ -12,7 +12,7 @@ You need to define the following (example): | |||
12 | #define XSTR_STRTOU strtoul | 12 | #define XSTR_STRTOU strtoul |
13 | */ | 13 | */ |
14 | 14 | ||
15 | unsigned type xstrtou(_range_sfx)(const char *numstr, int base, | 15 | unsigned type FAST_FUNC xstrtou(_range_sfx)(const char *numstr, int base, |
16 | unsigned type lower, | 16 | unsigned type lower, |
17 | unsigned type upper, | 17 | unsigned type upper, |
18 | const struct suffix_mult *suffixes) | 18 | const struct suffix_mult *suffixes) |
@@ -71,25 +71,25 @@ unsigned type xstrtou(_range_sfx)(const char *numstr, int base, | |||
71 | bb_error_msg_and_die("invalid number '%s'", numstr); | 71 | bb_error_msg_and_die("invalid number '%s'", numstr); |
72 | } | 72 | } |
73 | 73 | ||
74 | unsigned type xstrtou(_range)(const char *numstr, int base, | 74 | unsigned type FAST_FUNC xstrtou(_range)(const char *numstr, int base, |
75 | unsigned type lower, | 75 | unsigned type lower, |
76 | unsigned type upper) | 76 | unsigned type upper) |
77 | { | 77 | { |
78 | return xstrtou(_range_sfx)(numstr, base, lower, upper, NULL); | 78 | return xstrtou(_range_sfx)(numstr, base, lower, upper, NULL); |
79 | } | 79 | } |
80 | 80 | ||
81 | unsigned type xstrtou(_sfx)(const char *numstr, int base, | 81 | unsigned type FAST_FUNC xstrtou(_sfx)(const char *numstr, int base, |
82 | const struct suffix_mult *suffixes) | 82 | const struct suffix_mult *suffixes) |
83 | { | 83 | { |
84 | return xstrtou(_range_sfx)(numstr, base, 0, XSTR_UTYPE_MAX, suffixes); | 84 | return xstrtou(_range_sfx)(numstr, base, 0, XSTR_UTYPE_MAX, suffixes); |
85 | } | 85 | } |
86 | 86 | ||
87 | unsigned type xstrtou()(const char *numstr, int base) | 87 | unsigned type FAST_FUNC xstrtou()(const char *numstr, int base) |
88 | { | 88 | { |
89 | return xstrtou(_range_sfx)(numstr, base, 0, XSTR_UTYPE_MAX, NULL); | 89 | return xstrtou(_range_sfx)(numstr, base, 0, XSTR_UTYPE_MAX, NULL); |
90 | } | 90 | } |
91 | 91 | ||
92 | unsigned type xatou(_range_sfx)(const char *numstr, | 92 | unsigned type FAST_FUNC xatou(_range_sfx)(const char *numstr, |
93 | unsigned type lower, | 93 | unsigned type lower, |
94 | unsigned type upper, | 94 | unsigned type upper, |
95 | const struct suffix_mult *suffixes) | 95 | const struct suffix_mult *suffixes) |
@@ -97,27 +97,27 @@ unsigned type xatou(_range_sfx)(const char *numstr, | |||
97 | return xstrtou(_range_sfx)(numstr, 10, lower, upper, suffixes); | 97 | return xstrtou(_range_sfx)(numstr, 10, lower, upper, suffixes); |
98 | } | 98 | } |
99 | 99 | ||
100 | unsigned type xatou(_range)(const char *numstr, | 100 | unsigned type FAST_FUNC xatou(_range)(const char *numstr, |
101 | unsigned type lower, | 101 | unsigned type lower, |
102 | unsigned type upper) | 102 | unsigned type upper) |
103 | { | 103 | { |
104 | return xstrtou(_range_sfx)(numstr, 10, lower, upper, NULL); | 104 | return xstrtou(_range_sfx)(numstr, 10, lower, upper, NULL); |
105 | } | 105 | } |
106 | 106 | ||
107 | unsigned type xatou(_sfx)(const char *numstr, | 107 | unsigned type FAST_FUNC xatou(_sfx)(const char *numstr, |
108 | const struct suffix_mult *suffixes) | 108 | const struct suffix_mult *suffixes) |
109 | { | 109 | { |
110 | return xstrtou(_range_sfx)(numstr, 10, 0, XSTR_UTYPE_MAX, suffixes); | 110 | return xstrtou(_range_sfx)(numstr, 10, 0, XSTR_UTYPE_MAX, suffixes); |
111 | } | 111 | } |
112 | 112 | ||
113 | unsigned type xatou()(const char *numstr) | 113 | unsigned type FAST_FUNC xatou()(const char *numstr) |
114 | { | 114 | { |
115 | return xatou(_sfx)(numstr, NULL); | 115 | return xatou(_sfx)(numstr, NULL); |
116 | } | 116 | } |
117 | 117 | ||
118 | /* Signed ones */ | 118 | /* Signed ones */ |
119 | 119 | ||
120 | type xstrto(_range_sfx)(const char *numstr, int base, | 120 | type FAST_FUNC xstrto(_range_sfx)(const char *numstr, int base, |
121 | type lower, | 121 | type lower, |
122 | type upper, | 122 | type upper, |
123 | const struct suffix_mult *suffixes) | 123 | const struct suffix_mult *suffixes) |
@@ -148,12 +148,12 @@ type xstrto(_range_sfx)(const char *numstr, int base, | |||
148 | return r; | 148 | return r; |
149 | } | 149 | } |
150 | 150 | ||
151 | type xstrto(_range)(const char *numstr, int base, type lower, type upper) | 151 | type FAST_FUNC xstrto(_range)(const char *numstr, int base, type lower, type upper) |
152 | { | 152 | { |
153 | return xstrto(_range_sfx)(numstr, base, lower, upper, NULL); | 153 | return xstrto(_range_sfx)(numstr, base, lower, upper, NULL); |
154 | } | 154 | } |
155 | 155 | ||
156 | type xato(_range_sfx)(const char *numstr, | 156 | type FAST_FUNC xato(_range_sfx)(const char *numstr, |
157 | type lower, | 157 | type lower, |
158 | type upper, | 158 | type upper, |
159 | const struct suffix_mult *suffixes) | 159 | const struct suffix_mult *suffixes) |
@@ -161,17 +161,17 @@ type xato(_range_sfx)(const char *numstr, | |||
161 | return xstrto(_range_sfx)(numstr, 10, lower, upper, suffixes); | 161 | return xstrto(_range_sfx)(numstr, 10, lower, upper, suffixes); |
162 | } | 162 | } |
163 | 163 | ||
164 | type xato(_range)(const char *numstr, type lower, type upper) | 164 | type FAST_FUNC xato(_range)(const char *numstr, type lower, type upper) |
165 | { | 165 | { |
166 | return xstrto(_range_sfx)(numstr, 10, lower, upper, NULL); | 166 | return xstrto(_range_sfx)(numstr, 10, lower, upper, NULL); |
167 | } | 167 | } |
168 | 168 | ||
169 | type xato(_sfx)(const char *numstr, const struct suffix_mult *suffixes) | 169 | type FAST_FUNC xato(_sfx)(const char *numstr, const struct suffix_mult *suffixes) |
170 | { | 170 | { |
171 | return xstrto(_range_sfx)(numstr, 10, XSTR_TYPE_MIN, XSTR_TYPE_MAX, suffixes); | 171 | return xstrto(_range_sfx)(numstr, 10, XSTR_TYPE_MIN, XSTR_TYPE_MAX, suffixes); |
172 | } | 172 | } |
173 | 173 | ||
174 | type xato()(const char *numstr) | 174 | type FAST_FUNC xato()(const char *numstr) |
175 | { | 175 | { |
176 | return xstrto(_range_sfx)(numstr, 10, XSTR_TYPE_MIN, XSTR_TYPE_MAX, NULL); | 176 | return xstrto(_range_sfx)(numstr, 10, XSTR_TYPE_MIN, XSTR_TYPE_MAX, NULL); |
177 | } | 177 | } |