summaryrefslogtreecommitdiff
path: root/src/arch/x86/insts/static_inst.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-07-16 09:29:29 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-07-16 09:29:29 -0700
commitba6b8389ee72e17a6b966f2af24e80b2cff83e48 (patch)
treebb6ead4503f4b0fb5bd9e086799ccea18724d149 /src/arch/x86/insts/static_inst.hh
parent80c834ccac0b92cccd9756d4a2ec4cd4b46b6711 (diff)
downloadgem5-ba6b8389ee72e17a6b966f2af24e80b2cff83e48.tar.xz
X86: Take limitted advantage of the compilers type checking for microop operands.
Diffstat (limited to 'src/arch/x86/insts/static_inst.hh')
-rw-r--r--src/arch/x86/insts/static_inst.hh12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/arch/x86/insts/static_inst.hh b/src/arch/x86/insts/static_inst.hh
index 8480f2713..4ca7a4984 100644
--- a/src/arch/x86/insts/static_inst.hh
+++ b/src/arch/x86/insts/static_inst.hh
@@ -64,6 +64,18 @@
namespace X86ISA
{
/**
+ * Class for register indices passed to instruction constructors. Using a
+ * wrapper struct for these lets take advantage of the compiler's type
+ * checking.
+ */
+ struct InstRegIndex
+ {
+ RegIndex idx;
+ explicit InstRegIndex(RegIndex _idx) : idx(_idx)
+ {}
+ };
+
+ /**
* Base class for all X86 static instructions.
*/