From: Gabe Black Date: Thu, 16 Jul 2009 16:26:38 +0000 (-0700) Subject: X86: Fix x87 stack register indexing. X-Git-Tag: Calvin_Submission~209^2~7^2~3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3f9b0cc5ca126950fcce5a9b5ebf2f485ee812f2;p=gem5.git X86: Fix x87 stack register indexing. --- 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); } };