Re: counters that wrap around

Anthony Barbachan (barbacha@trill.cis.fordham.edu)
Tue, 25 Aug 1998 22:34:15 -0400


-----Original Message-----
From: Mitchell Blank Jr <mitch@execpc.com>
To: Roger Espel Llima <espel@iAgora.com>
Cc: linux-kernel@vger.rutgers.edu <linux-kernel@vger.rutgers.edu>
Date: Tuesday, August 25, 1998 9:43 PM
Subject: Re: counters that wrap around

>Roger Espel Llima wrote:
>> Is it that unreasonable to do something like (forgive the Intel asm
>> syntax..)
>>
>> add variable, 1
>> adc variable64, 0
>>
>> instead of
>>
>> inc variable
>>
>> like we're (I assume) doing now?
>
>My mistake. I assumed that using 'unsigned long long' caused gcc to play
>register tango on i386, and that was what people were complaining about.
>I should have checked the .s first.
>
>Since it's so cheap, is there any real reason to replace all those
>counters with u64's and add support for printing them?
>

Its not very cheap on most hardware as the norm is still 32 bit registers.
And incrimenting a 64 bit value on a 32 bit chip will take several
instructions.

>-Mitch
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.rutgers.edu
>Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html