Re: A lint classic

From: Rick Merrill (RickMerrill_at_comTHROW.net)
Date: 06/02/04


Date: Tue, 01 Jun 2004 23:47:59 GMT

Oliver Betz wrote:
> Rick Merrill <RickMerrill@comTHROW.net> wrote:
>
>
>>>new_var = var << 16000; !!!
>>
>>I've SEEN that code before: it used the most
>>stable 'clock' in the h/w to create a delay!!
>
>
> Until the new compiler release optimizes away the statement silently.
>
> Delays shouldn't be done by HLL loops. Only assembler code or hardware
> counters should be used.

No joke! (I didn't say it was my code! It was in a code review - a
la the OP's example)



Relevant Pages

  • Re: "We Never Use Assembly Language"
    ... interface with assembler code. ... Shifting the burden to GPU hardware is certainly a reasonable approach ... programming that has the luxury of JAVA style memory management. ...
    (alt.lang.asm)
  • Re: "We Never Use Assembly Language"
    ... interface with assembler code. ... scales down very badly on less powerful hardware. ... Multiple core and multiple processor hardware comes at a cost apart ... programming that has the luxury of JAVA style memory management. ...
    (alt.lang.asm)
  • Re: Reducing HDD writing affect on whole system.
    ... Not "visible" delays, I mean. ... For system that I'm speaking now is a Dell's laptop w/ AMD Tutorion64 ... GHz, 2G RAM, w/ Hitachi SATA 750G in it. ... hardware problem. ...
    (Debian-User)
  • Re: Reducing HDD writing affect on whole system.
    ... a severe hardware problem. ... to me it makes not speed tests but whither an HDD alive, ... the SATA HDD w/ less capacity was fsck-ed much longer than PATA one ... Not "visible" delays, I mean. ...
    (Debian-User)
  • Re: 24X2 character LCD driver code
    ... Have you tried runing the code in MPSIM to verify the delays? ... sure your simulation clock matches the hardware. ...
    (sci.electronics.design)