From 3f9b0cc5ca126950fcce5a9b5ebf2f485ee812f2 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Thu, 16 Jul 2009 09:26:38 -0700 Subject: [PATCH] X86: Fix x87 stack register indexing. --- src/arch/x86/floatregs.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/x86/floatregs.hh b/src/arch/x86/floatregs.hh index dc9867c42..2108db8d5 100644 --- a/src/arch/x86/floatregs.hh +++ b/src/arch/x86/floatregs.hh @@ -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); } }; -- 2.30.2