X86: Fix x87 stack register indexing.
authorGabe Black <gblack@eecs.umich.edu>
Thu, 16 Jul 2009 16:26:38 +0000 (09:26 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Thu, 16 Jul 2009 16:26:38 +0000 (09:26 -0700)
src/arch/x86/floatregs.hh

index dc9867c4209d9344f21365f4302d9d3265d837a9..2108db8d5c8b90fe5e0b4a7e77064b4f282bc5f7 100644 (file)
@@ -166,7 +166,7 @@ namespace X86ISA
     static inline FloatRegIndex
     FLOATREG_STACK(int index, int top)
     {
-        return (FloatRegIndex)(NUM_FLOATREGS + ((top + index + 8) % 8));
+        return FLOATREG_FPR((top + index + 8) % 8);
     }
 };