Michal Nazarewicz wrote:
> On Fri, Aug 03 2012, George Spelvin wrote:
>> Shrink the reciprocal approximations used in put_dec_full4
>> based on the comments in put_dec_full9.
>
> Have you verified that the comment is correct?
I rechecked all the validity limits myself.
>> r = (q *
>> +/* See comment in put_dec_full9 for choice of constants */
>> static noinline_for_stack
>> char *put_dec_full4(char *buf, unsigned q)
>> {
>> unsigned r;
>> - r = (q * 0xcccd) >> 19;
>> + r = (q * 0xccd) >> 15;
>> *buf++ = (q - 10 * r) + '0';
>> -
On Fri, Aug 3, 2012 at 7:21 AM, George Spelvin wrote:
> Shrink the reciprocal approximations used in put_dec_full4
> based on the comments in put_dec_full9.
>
> Signed-off-by: George Spelvin
> Cc: Denys Vlasenko
> Cc: Michal Nazarewicz
> ---
> lib/vsprintf.c |5 +++--
> 1 file changed, 3
On Fri, Aug 3, 2012 at 7:21 AM, George Spelvin li...@horizon.com wrote:
Shrink the reciprocal approximations used in put_dec_full4
based on the comments in put_dec_full9.
Signed-off-by: George Spelvin li...@horizon.com
Cc: Denys Vlasenko vda.li...@googlemail.com
Cc: Michal Nazarewicz
+/* See comment in put_dec_full9 for choice of constants */
static noinline_for_stack
char *put_dec_full4(char *buf, unsigned q)
{
unsigned r;
- r = (q * 0xcccd) 19;
+ r = (q * 0xccd) 15;
*buf++ = (q - 10 * r) + '0';
- q = (r * 0x199a)
Michal Nazarewicz m...@google.com wrote:
On Fri, Aug 03 2012, George Spelvin li...@horizon.com wrote:
Shrink the reciprocal approximations used in put_dec_full4
based on the comments in put_dec_full9.
Have you verified that the comment is correct?
I rechecked all the validity limits myself.
On Fri, Aug 03 2012, George Spelvin wrote:
> Shrink the reciprocal approximations used in put_dec_full4
> based on the comments in put_dec_full9.
>
> Signed-off-by: George Spelvin
> Cc: Denys Vlasenko
> Cc: Michal Nazarewicz
Have you verified that the comment is correct?
> ---
>
On Fri, Aug 03 2012, George Spelvin li...@horizon.com wrote:
Shrink the reciprocal approximations used in put_dec_full4
based on the comments in put_dec_full9.
Signed-off-by: George Spelvin li...@horizon.com
Cc: Denys Vlasenko vda.li...@googlemail.com
Cc: Michal Nazarewicz min...@mina86.com
Shrink the reciprocal approximations used in put_dec_full4
based on the comments in put_dec_full9.
Signed-off-by: George Spelvin
Cc: Denys Vlasenko
Cc: Michal Nazarewicz
---
lib/vsprintf.c |5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
I was looking over the code and noticed
Shrink the reciprocal approximations used in put_dec_full4
based on the comments in put_dec_full9.
Signed-off-by: George Spelvin li...@horizon.com
Cc: Denys Vlasenko vda.li...@googlemail.com
Cc: Michal Nazarewicz min...@mina86.com
---
lib/vsprintf.c |5 +++--
1 file changed, 3 insertions(+),
10 matches
Mail list logo