From: maartenbrock Date: Fri, 26 Nov 2004 20:11:10 +0000 (+0000) Subject: * device/lib/printf_large.c (calculate_digit): removed optimization for octal and... X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=214c992adfa1fa0b186bcc6400ffcf85e7f3c168;p=fw%2Fsdcc * device/lib/printf_large.c (calculate_digit): removed optimization for octal and hex as it was way too large git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3587 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index c608614c..89268a60 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,6 @@ 2004-11-18 Maarten Brock - * device/lib/printf_large.c (_print_format): fixed bug 1073386, - (calculate_digit): added optimization for octal and hex + * device/lib/printf_large.c (_print_format): fixed bug 1073386 * support/regression/tests/bug1057979.c: added test for bug 1073386 2004-11-25 Vangelis Rokas diff --git a/device/lib/printf_large.c b/device/lib/printf_large.c index 1aa50e1e..ef02a052 100644 --- a/device/lib/printf_large.c +++ b/device/lib/printf_large.c @@ -141,18 +141,6 @@ static const char memory_id[] = "IXCP-"; #if defined ASM_ALLOWED static void calculate_digit( unsigned char radix ) { - if (radix == 8) - { - value.byte[4] = value.ul & 0x07; - value.ul >>= 3; - } - else if (radix == 16) - { - value.byte[4] = value.ul & 0x0F; - value.ul >>= 4; - } - else - { unsigned char i; for( i = 32; i != 0; i-- ) @@ -182,22 +170,9 @@ _endasm; } } } -} #elif defined SDCC_STACK_AUTO static void calculate_digit( value_t* value, unsigned char radix ) { - if (radix == 8) - { - value->byte[4] = value->ul & 0x07; - value->ul >>= 3; - } - else if (radix == 16) - { - value->byte[4] = value->ul & 0x0F; - value->ul >>= 4; - } - else - { unsigned char i; for( i = 32; i != 0; i-- ) @@ -212,22 +187,9 @@ static void calculate_digit( value_t* value, unsigned char radix ) } } } -} #else static void calculate_digit( unsigned char radix ) { - if (radix == 8) - { - value.byte[4] = value.ul & 0x07; - value.ul >>= 3; - } - else if (radix == 16) - { - value.byte[4] = value.ul & 0x0F; - value.ul >>= 4; - } - else - { unsigned char i; for( i = 32; i != 0; i-- ) @@ -242,7 +204,6 @@ static void calculate_digit( unsigned char radix ) } } } -} #endif #if USE_FLOATS @@ -689,7 +650,7 @@ get_conversion_spec: value.l = va_arg(ap,char); if (!signed_argument) { - value.l &= 0xFF; + value.l &= 0xFF; } } else if (long_argument)