Re: System Panic Makes My Life Easier
Ivan Sergio Borgonovo <[email protected]>
| Newsgroups | gmane.org.user-groups.linux.svlug |
|---|---|
| Organization | http://www.WebThatWorks.it |
| Message-ID | <[email protected]> |
On 08/06/2016 09:05 PM, Akkana Peck wrote: > Is it possible that the compiler of the time optimized to use the > FPU even for integer division? In that case, the part of ls where it > calculates the number of output columns, then divides the total > number of files by the number of columns to get the number of rows > (and other similar calculations), might use the FPU even though it > shouldn't need to. Hardly. That would make very few historical sense. I can't think of any way they could have reached that "optimization" (aka bug). That kind of "optimization" is going to have some sense just if you're running just one process in a processor that can run simultaneously an instruction on the ALU and the FPU and where you don't incur in any substantial wait state to collect results from the FPU. In that context if you have 2 div nearby, but you're going to need the result enough far apart you may decide to execute one div on the ALU and another one on the FPU. But consider that converting a fp to an integer is some more work and that makes really unlikely you're going to gain anything. Considering history of CPU development and compilers that makes it extremely unlikely. gcc has never been thought to be run in such a context and the way you're going to build up a compiler would make very hard you'd even think about that optimization in 1999-2000 in a Linux context on an AMD cpu (or mostly ever, everywhere). K5 in 1995 already had 2 ALU and 1 FPU. I'm not going to check datasheets to look at wait states, instruction execution cycles etc... but I'd say that kind of "optimization" is really really unlikely. -- Ivan Sergio Borgonovo http://www.webthatworks.it http://www.borgonovo.net