From ce18d900a17cdda2cc041b51c56e6c84fb155331 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 13 Mar 2007 16:13:21 +0000 Subject: Replaced makeExtMI with predecode. Removed the getOpcode function from StaticInst which only made sense for Alpha. Started implementing the x86 predecoder. --HG-- extra : convert_revision : a13ea257c8943ef25e9bc573024a99abacf4a70d --- src/arch/x86/utility.hh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/arch/x86/utility.hh') diff --git a/src/arch/x86/utility.hh b/src/arch/x86/utility.hh index 1d9d8d3d5..0baa249c3 100644 --- a/src/arch/x86/utility.hh +++ b/src/arch/x86/utility.hh @@ -72,9 +72,16 @@ namespace X86ISA return false; } - inline ExtMachInst - makeExtMI(MachInst inst, ThreadContext * xc) { - return inst; + PredecodeResult { + MoreBytes = 1, + ExtMIReady = 2 + }; + + unsigned int + predecode(ExtMachInst &extMachInst, Addr currPC, MachInst machInst, + ThreadContext * xc) { + //Do something to fill up extMachInst... + return MoreBytes | ExtMIReady; } inline bool isCallerSaveIntegerRegister(unsigned int reg) { -- cgit v1.2.3 From a2b56088fb4d12aee73ecfeaba88cfa46f98567e Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Thu, 15 Mar 2007 02:47:42 +0000 Subject: Make the predecoder an object with it's own switched header file. Start adding predecoding functionality to x86. src/arch/SConscript: src/arch/alpha/utility.hh: src/arch/mips/utility.hh: src/arch/sparc/utility.hh: src/cpu/base.hh: src/cpu/o3/fetch.hh: src/cpu/o3/fetch_impl.hh: src/cpu/simple/atomic.cc: src/cpu/simple/base.cc: src/cpu/simple/base.hh: src/cpu/static_inst.hh: src/arch/alpha/predecoder.hh: src/arch/mips/predecoder.hh: src/arch/sparc/predecoder.hh: Make the predecoder an object with it's own switched header file. --HG-- extra : convert_revision : 77206e29089130e86b97164c30022a062699ba86 --- src/arch/x86/utility.hh | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'src/arch/x86/utility.hh') diff --git a/src/arch/x86/utility.hh b/src/arch/x86/utility.hh index 0baa249c3..8c5d20c6e 100644 --- a/src/arch/x86/utility.hh +++ b/src/arch/x86/utility.hh @@ -59,11 +59,22 @@ #define __ARCH_X86_UTILITY_HH__ #include "arch/x86/types.hh" +#include "base/hashmap.hh" #include "base/misc.hh" #include "sim/host.hh" class ThreadContext; +namespace __hash_namespace { + template<> + struct hash { + size_t operator()(const X86ISA::ExtMachInst &emi) const { + //Because these are all the same, return 0 + return 0; + }; + }; +} + namespace X86ISA { static inline bool @@ -72,18 +83,6 @@ namespace X86ISA return false; } - PredecodeResult { - MoreBytes = 1, - ExtMIReady = 2 - }; - - unsigned int - predecode(ExtMachInst &extMachInst, Addr currPC, MachInst machInst, - ThreadContext * xc) { - //Do something to fill up extMachInst... - return MoreBytes | ExtMIReady; - } - inline bool isCallerSaveIntegerRegister(unsigned int reg) { panic("register classification not implemented"); return false; -- cgit v1.2.3