Hi Wolfgang,

On 30/08/11 19:29, Wolfgang Denk wrote:
> Dear Graeme Russ,
> 
> In message 
> <CALButC+t=oul9xgqnfyadzmgpjrp7mdrwee9lkogyheg1d+...@mail.gmail.com> you 
> wrote:
>>
>>> If you want to support arbitrary buffer sizes, then just use
>>>
>>>        #define CIRC_BUF_IDX(idx) ((idx) % CONFIG_SYS_TMP_CON_BUF_SZ)
>>
>> I know, but I was concerned that you wouldn't like the use of modulo
>> arithmetic for every putc() - But I suppose thats cheaper than a compare
>> plus branch...
> 
> Well, the difference of "i & (CONFIG_SYS_TMP_CON_BUF_SZ-1)" versus
> "i % CONFIG_SYS_TMP_CON_BUF_SZ" is 1 versus 4 assembler instructions
> on Power, and 2 versus 5 assembler instructions on ARM.  I think we
> can tolerate this.

And it's only hit during printf() before console is initialised :)

Respinning now

Regards,

Graeme
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to