Fix to i386_insert_ffrees (#2724, #1944)
authorSimon Marlow <marlowsd@gmail.com>
Tue, 11 Nov 2008 12:56:19 +0000 (12:56 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Tue, 11 Nov 2008 12:56:19 +0000 (12:56 +0000)
commitdcd38ff7690eb9bdfefc3e7b5c29b7269149df87
tree1d42010180f49e65a9292846ce61f702b3a566ea
parente580dd581da9e9549d6fc6e09a8ac164863a96d0
Fix to i386_insert_ffrees (#2724, #1944)
The i386 native code generator has to arrange that the FPU stack is
clear on exit from any function that uses the FPU.  Unfortunately it
was getting this wrong (and has been ever since this code was written,
I think): it was looking for basic blocks that used the FPU and adding
the code to clear the FPU stack on any non-local exit from the block.
In fact it should be doing this on a whole-function basis, rather than
individual basic blocks.
compiler/nativeGen/AsmCodeGen.lhs
compiler/nativeGen/MachInstrs.hs