summaryrefslogtreecommitdiff
path: root/src/arch/x86/floatregs.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-09-19 18:26:42 -0700
committerGabe Black <gblack@eecs.umich.edu>2007-09-19 18:26:42 -0700
commitf3f3747431e001dc6c80da5b6489516b610c22d6 (patch)
tree24fcbc928df1619a82dbfd9ffa6d6f6809f509f6 /src/arch/x86/floatregs.hh
parenta54ae9f92b6000e8aaf5e056deaead8725c25a74 (diff)
downloadgem5-f3f3747431e001dc6c80da5b6489516b610c22d6.tar.xz
X86: Put in the foundation for x87 stack based fp registers.
--HG-- extra : convert_revision : 940f92efd4a9dc59106e991cc6d9836861ab69de
Diffstat (limited to 'src/arch/x86/floatregs.hh')
-rw-r--r--src/arch/x86/floatregs.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arch/x86/floatregs.hh b/src/arch/x86/floatregs.hh
index b9d6a5c43..30846ec00 100644
--- a/src/arch/x86/floatregs.hh
+++ b/src/arch/x86/floatregs.hh
@@ -162,6 +162,12 @@ namespace X86ISA
{
return (FloatRegIndex)(FLOATREG_MICROFP_BASE + index);
}
+
+ static inline FloatRegIndex
+ FLOATREG_STACK(int index, int top)
+ {
+ return (FloatRegIndex)(NUM_FLOATREGS + ((top - index + 8) % 8));
+ }
};
#endif // __ARCH_X86_FLOATREGS_HH__