summaryrefslogtreecommitdiff
path: root/libbb/xatonum_template.c
diff options
context:
space:
mode:
authorDenis Vlasenko2008-06-27 02:52:20 +0000
committerDenis Vlasenko2008-06-27 02:52:20 +0000
commitdefc1ea34074e7882724c460260d307cdf981a70 (patch)
treefca9b9a5fe243f9c0c76b84824ea2ff92ea8e589 /libbb/xatonum_template.c
parent26bc57d8b26425f23f4be974cce7bf35c95c9a1a (diff)
downloadbusybox-defc1ea34074e7882724c460260d307cdf981a70.zip
busybox-defc1ea34074e7882724c460260d307cdf981a70.tar.gz
*: 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.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/libbb/xatonum_template.c b/libbb/xatonum_template.c
index 9f9dc11..2360ae8 100644
--- a/libbb/xatonum_template.c
+++ b/libbb/xatonum_template.c
@@ -12,7 +12,7 @@ You need to define the following (example):
#define XSTR_STRTOU strtoul
*/
-unsigned type xstrtou(_range_sfx)(const char *numstr, int base,
+unsigned type FAST_FUNC xstrtou(_range_sfx)(const char *numstr, int base,
unsigned type lower,
unsigned type upper,
const struct suffix_mult *suffixes)
@@ -71,25 +71,25 @@ unsigned type xstrtou(_range_sfx)(const char *numstr, int base,
bb_error_msg_and_die("invalid number '%s'", numstr);
}
-unsigned type xstrtou(_range)(const char *numstr, int base,
+unsigned type FAST_FUNC xstrtou(_range)(const char *numstr, int base,
unsigned type lower,
unsigned type upper)
{
return xstrtou(_range_sfx)(numstr, base, lower, upper, NULL);
}
-unsigned type xstrtou(_sfx)(const char *numstr, int base,
+unsigned type FAST_FUNC xstrtou(_sfx)(const char *numstr, int base,
const struct suffix_mult *suffixes)
{
return xstrtou(_range_sfx)(numstr, base, 0, XSTR_UTYPE_MAX, suffixes);
}
-unsigned type xstrtou()(const char *numstr, int base)
+unsigned type FAST_FUNC xstrtou()(const char *numstr, int base)
{
return xstrtou(_range_sfx)(numstr, base, 0, XSTR_UTYPE_MAX, NULL);
}
-unsigned type xatou(_range_sfx)(const char *numstr,
+unsigned type FAST_FUNC xatou(_range_sfx)(const char *numstr,
unsigned type lower,
unsigned type upper,
const struct suffix_mult *suffixes)
@@ -97,27 +97,27 @@ unsigned type xatou(_range_sfx)(const char *numstr,
return xstrtou(_range_sfx)(numstr, 10, lower, upper, suffixes);
}
-unsigned type xatou(_range)(const char *numstr,
+unsigned type FAST_FUNC xatou(_range)(const char *numstr,
unsigned type lower,
unsigned type upper)
{
return xstrtou(_range_sfx)(numstr, 10, lower, upper, NULL);
}
-unsigned type xatou(_sfx)(const char *numstr,
+unsigned type FAST_FUNC xatou(_sfx)(const char *numstr,
const struct suffix_mult *suffixes)
{
return xstrtou(_range_sfx)(numstr, 10, 0, XSTR_UTYPE_MAX, suffixes);
}
-unsigned type xatou()(const char *numstr)
+unsigned type FAST_FUNC xatou()(const char *numstr)
{
return xatou(_sfx)(numstr, NULL);
}
/* Signed ones */
-type xstrto(_range_sfx)(const char *numstr, int base,
+type FAST_FUNC xstrto(_range_sfx)(const char *numstr, int base,
type lower,
type upper,
const struct suffix_mult *suffixes)
@@ -148,12 +148,12 @@ type xstrto(_range_sfx)(const char *numstr, int base,
return r;
}
-type xstrto(_range)(const char *numstr, int base, type lower, type upper)
+type FAST_FUNC xstrto(_range)(const char *numstr, int base, type lower, type upper)
{
return xstrto(_range_sfx)(numstr, base, lower, upper, NULL);
}
-type xato(_range_sfx)(const char *numstr,
+type FAST_FUNC xato(_range_sfx)(const char *numstr,
type lower,
type upper,
const struct suffix_mult *suffixes)
@@ -161,17 +161,17 @@ type xato(_range_sfx)(const char *numstr,
return xstrto(_range_sfx)(numstr, 10, lower, upper, suffixes);
}
-type xato(_range)(const char *numstr, type lower, type upper)
+type FAST_FUNC xato(_range)(const char *numstr, type lower, type upper)
{
return xstrto(_range_sfx)(numstr, 10, lower, upper, NULL);
}
-type xato(_sfx)(const char *numstr, const struct suffix_mult *suffixes)
+type FAST_FUNC xato(_sfx)(const char *numstr, const struct suffix_mult *suffixes)
{
return xstrto(_range_sfx)(numstr, 10, XSTR_TYPE_MIN, XSTR_TYPE_MAX, suffixes);
}
-type xato()(const char *numstr)
+type FAST_FUNC xato()(const char *numstr)
{
return xstrto(_range_sfx)(numstr, 10, XSTR_TYPE_MIN, XSTR_TYPE_MAX, NULL);
}