home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.arch      Apparently more than just beeps & boops      131,241 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 129,741 of 131,241   
   Michael S to Terje Mathisen   
   Re: Saving and restoring FP state   
   22 Sep 25 18:17:05   
   
   From: already5chosen@yahoo.com   
      
   On Mon, 22 Sep 2025 17:05:45 +0200   
   Terje Mathisen  wrote:   
      
   > Andy Valencia wrote:   
   > > BGB  writes:   
   > >>> Why on earth would you use floating point instructions   
   > >>> in an interrupt handler?   
   > >> I didn't go and track down which code was using FPU instructions,   
   > >> but seemingly something was,   
   > >   
   > > I believe I noted once before that I had to guide a driver   
   > > developer for HP/UX away from using floating point for his driver's   
   > > event counters.  His reason for their use?  They can count to   
   > > bigger numbers.   
   >   
   > Did you ask him what happened after the counter passed 2^53 and he   
   > added 1.0 to the counter? With RNE that's a NOP...   
   >   
   > Using 64-bit counters are far better, even on a 32-bit CPU, even if   
   > you then need thread-safe/atomic code sequences.   
   >   
   > Terje   
   >   
   >   
      
   Since the counter is in memory, using FP does not help thread safety.   
   As to 2**53, that's enough for most things. At least for counting   
   events that do not happen more often than few millions times per   
   second.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca