[HN Gopher] The Pentium FDIV bug, reverse-engineered
       ___________________________________________________________________
        
       The Pentium FDIV bug, reverse-engineered
        
       Author : croes
       Score  : 84 points
       Date   : 2024-12-11 18:33 UTC (2 days ago)
        
 (HTM) web link (oldbytes.space)
 (TXT) w3m dump (oldbytes.space)
        
       | perdomon wrote:
       | This dude pulled out a microscope and said "there's your
       | problem." Super impressive work. Really great micro-read.
        
         | layer8 wrote:
         | To be fair, he knew what the problem was (errors in the lookup
         | table) beforehand.
        
       | Cumpiler69 wrote:
       | This is probably one of the reasons Intel went to a microcode
       | architecture after.
       | 
       | I wonder how many yet to be discover silicone bugs are out there
       | on modern chips?
        
         | KingLancelot wrote:
         | Silicone is plastic, Silicon is the element.
        
         | wmf wrote:
         | They always used microcode:
         | https://www.righto.com/2022/11/how-8086-processors-microcode...
         | 
         | I'm not sure when Intel started supporting microcode updates
         | but I think it was much later.
        
         | Lammy wrote:
         | Older Intel CPUs were already using microcode. Intel went after
         | NEC with a copyright case over 8086 microcode, and after AMD
         | with a copyright case over 287/386/486 microcode:
         | 
         | - https://thechipletter.substack.com/p/intel-vs-nec-the-
         | case-o...
         | 
         | - https://www.upi.com/Archives/1994/03/10/Jury-backs-AMD-in-
         | di...
         | 
         | I would totally believe the FDIV bug is why Intel went to a
         | _patchable_ microcode architecture however. See "Intel P6
         | Microcode Can Be Patched -- Intel Discloses Details of Download
         | Mechanism for Fixing CPU Bugs (1997)"
         | https://news.ycombinator.com/item?id=35934367
        
         | kens wrote:
         | Intel used microcode starting with the 8086. However, patchable
         | microcode wasn't introduced until the Pentium Pro. The original
         | purpose was for testing, being able to run special test
         | microcode routines. But after the Pentium, Intel realized that
         | being able to patch microcode was also good for fixing bugs in
         | the field.
        
       | molticrystal wrote:
       | The story was posted a couple days ago and ken left a couple
       | comments there: https://news.ycombinator.com/item?id=42388455
       | 
       | I look forward to the promised proper write up that should be out
       | soon.
        
       | Thaxll wrote:
       | So nowdays this table could have been fixed with a microcode
       | update right?
        
         | jeffbee wrote:
         | With a microcode update that ruins FDIV performance, sure. Even
         | at that time there were CPUs still using microcoded division,
         | like the AMD K5.
        
       | mega_dingus wrote:
       | Oh to remember mid-90s humor
       | 
       | How many Intel engineers does it take to change a light bulb?
       | 0.99999999
        
       | jghn wrote:
       | An anecdote regarding this bug that always cracks me up. My
       | college roommate showed up with a shiny new pentium machine that
       | year, and kept bragging about how awesome it was. We used some
       | math software called Maple that was pretty intensive for PCs at
       | the time, and he thought he was cool because he could do his
       | homework on his PC instead of on one of the unix machines in the
       | lab.
       | 
       | Except that he kept getting wrong answers on his homework.
       | 
       | And then he realized that when he did it on one of the unix
       | machines, he got correct answers.
       | 
       | And then a few months later he realized why ....
        
       ___________________________________________________________________
       (page generated 2024-12-13 23:00 UTC)