Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!wuarchive!rex!uflorida!mailer.cc.fsu.edu!prism!bb16 From: bb16@prism.gatech.EDU (Scott Bostater) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: v09i191: popadbug, test for 386 CPU bug (part 01/01) Message-ID: <19130@hydra.gatech.EDU> Date: 4 Jan 91 13:39:58 GMT References: <336@aplcomm.JHUAPL.EDU> Organization: Georgia Institute of Technology Lines: 45 In article <336@aplcomm.JHUAPL.EDU> tcs@mailer.jhuapl.edu (Carl Schelin) writes: >I ran this on my IBM Model 80 here at work and on a new clone >386 25mhz (three months old) and they both failed. The one at home >has a co-processor but the one here doesn't (80). > >Anyone know what this is supposed to do? I did a virus check before >running and rebooted immediately after running (just to make sure). >No problems so far. We've run it on several 386's where I work and it fails on all of them. It has not failed on the one 486 that we have. I haven't yet tried it on a 386sx (anybody out there with a SX tried it??). It also shows up in both of the Sun 386i's that I have access to. As far as I can tell from running the code in Turbo Debug, the only error is that the EAX register gets cleared. As the code stated this can be corrected by placing a NOP after the POPAD command (or single stepping through the code :-). Looks like a microcode timing error. As far as ramifications of this bug, I personnally don't think its too major of a problem unless you want to program assembly code. In that case you'll just have to remember to add the NOP after the POPAD command. When programming in 286 assembly language I have had little reason to use the POPA command since I hardly ever need to push/pop ALL the registers. Its normally faster to push/pop just the required registers. There would be even less justification to push/pop all of the 32-bit registers. Since there has been a moderate amount of 32-bit code produced by now and this is the first that the bug has shown up, I don't think the POPAD command is getting used. Not having access to a any 32 bit compilers, I don't know if any of them generate the POPAD command, but I would doubt it unless you were optimizing for smallest code size (and we all optimize for fastest execution, right? :-) IMHO, the bottom line is that 1) yes, Intel has another bug 2) no, the average programmer probably doesn't need to worry about it 3) writers of 32-bit compilers and OS's should be aware of it Well, that's my $0.05 worth ($0.02 plus overhead :-) -- Scott Bostater Georgia Tech Research Institute - Radar Systems Analysis "My soul finds rest in God alone; my salvation comes from Him" -Ps 62.1 uucp: ...!{allegra,amd,hplabs,ut-ngp}!gatech!prism!bb16 Internet: bb16@prism.gatech.edu