RE: Can we declare a variable as 'int' in the driver -???

I’ve repro’d this here – this is, as I originally suggested, a bug in the
compiler (the optimizer). It’s quite rare these days to discover these
types of bugs in the compiler since its wide use.
You need to raise this as a bug with MS. Note that there will be no charge
for this once confirmed as a bug (you’ll be given a refund for any fees paid
up-front).

Interestingly, changing iCount to a short or char forces the compiler to use
another register for iteration count (the original register is still used
for the 24h, 18h, … series). This forces the compiler to generate correct
code.

Regards,

Paul Bunn, UltraBac.com, 425-644-6000
Microsoft MVP - WindowsNT/2000
http://www.ultrabac.com

-----Original Message-----
From: Eshanye.K.P [mailto:xxxxx@procsys.com]
Sent: Friday, June 23, 2000 3:01 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Can we declare a variable as ‘int’ in the driver
???

Actually if the condition of the foor loop in the free build is iCount >=
0
then in the m/c code there is no comparision at all there will be a
unconditional jump to the beginig of the foor loop like this

000b9 83 ef 08 sub edi, 8
000bc eb ce jmp SHORT $L13115

  • so it goes to infinite loop. Where are in the condition of for loop in
    the
    free build is iCount > -1 thne in the machine code there is a comparision
    and
    then this a “ja” [jump if above ??] to the begining of the for loop…
    like this

000ba 83 ef 08 sub edi, 8
000bd 83 ff f8 cmp edi, -8 ; fffffff8H
000c0 77 cb ja SHORT $L13115

so this wont be an infinite loop !!! [This is the optimisation of the
compiler ??]

[snip]