Decode: Make the Decoder class defined per ISA.
--HG-- rename : src/cpu/decode.cc => src/arch/generic/decoder.cc rename : src/cpu/decode.hh => src/arch/generic/decoder.hh
This commit is contained in:
@@ -44,6 +44,7 @@ Import('*')
|
||||
|
||||
# List of headers to generate
|
||||
isa_switch_hdrs = Split('''
|
||||
decoder.hh
|
||||
interrupts.hh
|
||||
isa.hh
|
||||
isa_traits.hh
|
||||
|
||||
44
src/arch/alpha/decoder.hh
Normal file
44
src/arch/alpha/decoder.hh
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (c) 2012 Google
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met: redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer;
|
||||
* redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution;
|
||||
* neither the name of the copyright holders nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Authors: Gabe Black
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_ALPHA_DECODER_HH__
|
||||
#define __ARCH_ALPHA_DECODER_HH__
|
||||
|
||||
#include "arch/generic/decoder.hh"
|
||||
|
||||
namespace AlphaISA
|
||||
{
|
||||
|
||||
class Decoder : public GenericISA::Decoder
|
||||
{};
|
||||
|
||||
} // namespace AlphaISA
|
||||
|
||||
#endif // __ARCH_ALPHA_DECODER_HH__
|
||||
@@ -122,6 +122,7 @@
|
||||
#include <string>
|
||||
|
||||
|
||||
#include "arch/alpha/decoder.hh"
|
||||
#include "arch/alpha/kgdb.h"
|
||||
#include "arch/alpha/regredir.hh"
|
||||
#include "arch/alpha/remote_gdb.hh"
|
||||
@@ -131,7 +132,6 @@
|
||||
#include "base/remote_gdb.hh"
|
||||
#include "base/socket.hh"
|
||||
#include "base/trace.hh"
|
||||
#include "cpu/decode.hh"
|
||||
#include "cpu/static_inst.hh"
|
||||
#include "cpu/thread_context.hh"
|
||||
#include "debug/GDBAcc.hh"
|
||||
|
||||
44
src/arch/arm/decoder.hh
Normal file
44
src/arch/arm/decoder.hh
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (c) 2012 Google
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met: redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer;
|
||||
* redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution;
|
||||
* neither the name of the copyright holders nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Authors: Gabe Black
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_ARM_DECODER_HH__
|
||||
#define __ARCH_ARM_DECODER_HH__
|
||||
|
||||
#include "arch/generic/decoder.hh"
|
||||
|
||||
namespace ArmISA
|
||||
{
|
||||
|
||||
class Decoder : public GenericISA::Decoder
|
||||
{};
|
||||
|
||||
} // namespace ArmISA
|
||||
|
||||
#endif // __ARCH_ARM_DECODER_HH__
|
||||
@@ -134,6 +134,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "arch/arm/decoder.hh"
|
||||
#include "arch/arm/pagetable.hh"
|
||||
#include "arch/arm/registers.hh"
|
||||
#include "arch/arm/remote_gdb.hh"
|
||||
@@ -143,7 +144,6 @@
|
||||
#include "base/remote_gdb.hh"
|
||||
#include "base/socket.hh"
|
||||
#include "base/trace.hh"
|
||||
#include "cpu/decode.hh"
|
||||
#include "cpu/static_inst.hh"
|
||||
#include "cpu/thread_context.hh"
|
||||
#include "cpu/thread_state.hh"
|
||||
|
||||
31
src/arch/generic/SConscript
Normal file
31
src/arch/generic/SConscript
Normal file
@@ -0,0 +1,31 @@
|
||||
# Copyright (c) 2012 Google
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met: redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer;
|
||||
# redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution;
|
||||
# neither the name of the copyright holders nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# Authors: Gabe Black
|
||||
|
||||
Import('*')
|
||||
|
||||
Source('decoder.cc')
|
||||
@@ -28,6 +28,11 @@
|
||||
* Authors: Gabe Black
|
||||
*/
|
||||
|
||||
#include "cpu/decode.hh"
|
||||
#include "arch/generic/decoder.hh"
|
||||
|
||||
DecodeCache<TheISA::decodeInst> Decoder::cache;
|
||||
namespace GenericISA
|
||||
{
|
||||
|
||||
DecodeCache<TheISA::decodeInst> Decoder::defaultCache;
|
||||
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 Google
|
||||
* Copyright (c) 2011-2012 Google
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -28,8 +28,8 @@
|
||||
* Authors: Gabe Black
|
||||
*/
|
||||
|
||||
#ifndef __CPU_DECODE_HH__
|
||||
#define __CPU_DECODE_HH__
|
||||
#ifndef __ARCH_GENERIC_DECODER_HH__
|
||||
#define __ARCH_GENERIC_DECODER_HH__
|
||||
|
||||
#include "arch/isa_traits.hh"
|
||||
#include "arch/types.hh"
|
||||
@@ -37,13 +37,16 @@
|
||||
#include "cpu/decode_cache.hh"
|
||||
#include "cpu/static_inst.hh"
|
||||
|
||||
namespace GenericISA
|
||||
{
|
||||
|
||||
/// The decoder class. This class doesn't do much of anything now, but in the
|
||||
/// future it will be redefinable per ISA and allow more interesting behavior.
|
||||
class Decoder
|
||||
{
|
||||
protected:
|
||||
/// A cache of decoded instruction objects.
|
||||
static DecodeCache<TheISA::decodeInst> cache;
|
||||
static DecodeCache<TheISA::decodeInst> defaultCache;
|
||||
|
||||
public:
|
||||
/// Decode a machine instruction.
|
||||
@@ -52,8 +55,10 @@ class Decoder
|
||||
StaticInstPtr
|
||||
decode(TheISA::ExtMachInst mach_inst, Addr addr)
|
||||
{
|
||||
return cache.decode(mach_inst, addr);
|
||||
return defaultCache.decode(mach_inst, addr);
|
||||
}
|
||||
};
|
||||
|
||||
#endif // __CPU_DECODE_HH__
|
||||
} // namespace GenericISA
|
||||
|
||||
#endif // __ARCH_GENERIC_DECODER_HH__
|
||||
44
src/arch/mips/decoder.hh
Normal file
44
src/arch/mips/decoder.hh
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (c) 2012 Google
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met: redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer;
|
||||
* redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution;
|
||||
* neither the name of the copyright holders nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Authors: Gabe Black
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_MIPS_DECODER_HH__
|
||||
#define __ARCH_MIPS_DECODER_HH__
|
||||
|
||||
#include "arch/generic/decoder.hh"
|
||||
|
||||
namespace MipsISA
|
||||
{
|
||||
|
||||
class Decoder : public GenericISA::Decoder
|
||||
{};
|
||||
|
||||
} // namespace MipsISA
|
||||
|
||||
#endif // __ARCH_MIPS_DECODER_HH__
|
||||
@@ -135,9 +135,9 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "arch/mips/decoder.hh"
|
||||
#include "arch/mips/remote_gdb.hh"
|
||||
#include "arch/mips/vtophys.hh"
|
||||
#include "cpu/decode.hh"
|
||||
#include "cpu/thread_state.hh"
|
||||
#include "debug/GDBAcc.hh"
|
||||
#include "debug/GDBMisc.hh"
|
||||
|
||||
44
src/arch/power/decoder.hh
Normal file
44
src/arch/power/decoder.hh
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (c) 2012 Google
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met: redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer;
|
||||
* redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution;
|
||||
* neither the name of the copyright holders nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Authors: Gabe Black
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_POWER_DECODER_HH__
|
||||
#define __ARCH_POWER_DECODER_HH__
|
||||
|
||||
#include "arch/generic/decoder.hh"
|
||||
|
||||
namespace PowerISA
|
||||
{
|
||||
|
||||
class Decoder : public GenericISA::Decoder
|
||||
{};
|
||||
|
||||
} // namespace PowerISA
|
||||
|
||||
#endif // __ARCH_POWER_DECODER_HH__
|
||||
44
src/arch/sparc/decoder.hh
Normal file
44
src/arch/sparc/decoder.hh
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (c) 2012 Google
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met: redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer;
|
||||
* redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution;
|
||||
* neither the name of the copyright holders nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Authors: Gabe Black
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_SPARC_DECODER_HH__
|
||||
#define __ARCH_SPARC_DECODER_HH__
|
||||
|
||||
#include "arch/generic/decoder.hh"
|
||||
|
||||
namespace SparcISA
|
||||
{
|
||||
|
||||
class Decoder : public GenericISA::Decoder
|
||||
{};
|
||||
|
||||
} // namespace SparcISA
|
||||
|
||||
#endif // __ARCH_SPARC_DECODER_HH__
|
||||
44
src/arch/x86/decoder.hh
Normal file
44
src/arch/x86/decoder.hh
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (c) 2012 Google
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met: redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer;
|
||||
* redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution;
|
||||
* neither the name of the copyright holders nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Authors: Gabe Black
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_X86_DECODER_HH__
|
||||
#define __ARCH_X86_DECODER_HH__
|
||||
|
||||
#include "arch/generic/decoder.hh"
|
||||
|
||||
namespace X86ISA
|
||||
{
|
||||
|
||||
class Decoder : public GenericISA::Decoder
|
||||
{};
|
||||
|
||||
} // namespace X86ISA
|
||||
|
||||
#endif // __ARCH_X86_DECODER_HH__
|
||||
@@ -108,7 +108,6 @@ SimObject('NativeTrace.py')
|
||||
Source('activity.cc')
|
||||
Source('base.cc')
|
||||
Source('cpuevent.cc')
|
||||
Source('decode.cc')
|
||||
Source('exetrace.cc')
|
||||
Source('func_unit.cc')
|
||||
Source('inteltrace.cc')
|
||||
|
||||
@@ -55,6 +55,7 @@ namespace TheISA {
|
||||
namespace Kernel {
|
||||
class Statistics;
|
||||
};
|
||||
class Decoder;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -117,7 +118,7 @@ class CheckerThreadContext : public ThreadContext
|
||||
return checkerCPU;
|
||||
}
|
||||
|
||||
Decoder *getDecoderPtr() { return actualTC->getDecoderPtr(); }
|
||||
TheISA::Decoder *getDecoderPtr() { return actualTC->getDecoderPtr(); }
|
||||
|
||||
System *getSystemPtr() { return actualTC->getSystemPtr(); }
|
||||
|
||||
|
||||
@@ -1772,7 +1772,7 @@ InOrderCPU::getDTBPtr()
|
||||
return resPool->getDataUnit()->tlb();
|
||||
}
|
||||
|
||||
Decoder *
|
||||
TheISA::Decoder *
|
||||
InOrderCPU::getDecoderPtr()
|
||||
{
|
||||
return &resPool->getInstUnit()->decoder;
|
||||
|
||||
@@ -342,7 +342,7 @@ class InOrderCPU : public BaseCPU
|
||||
TheISA::TLB *getITBPtr();
|
||||
TheISA::TLB *getDTBPtr();
|
||||
|
||||
Decoder *getDecoderPtr();
|
||||
TheISA::Decoder *getDecoderPtr();
|
||||
|
||||
/** Accessor Type for the SkedCache */
|
||||
typedef uint32_t SkedID;
|
||||
|
||||
@@ -36,10 +36,10 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "arch/decoder.hh"
|
||||
#include "arch/predecoder.hh"
|
||||
#include "arch/tlb.hh"
|
||||
#include "config/the_isa.hh"
|
||||
#include "cpu/decode.hh"
|
||||
#include "cpu/inorder/resources/cache_unit.hh"
|
||||
#include "cpu/inorder/inorder_dyn_inst.hh"
|
||||
#include "cpu/inorder/pipeline_traits.hh"
|
||||
@@ -89,7 +89,7 @@ class FetchUnit : public CacheUnit
|
||||
|
||||
void trap(Fault fault, ThreadID tid, DynInstPtr inst);
|
||||
|
||||
Decoder decoder;
|
||||
TheISA::Decoder decoder;
|
||||
|
||||
private:
|
||||
void squashCacheRequest(CacheReqPtr req_ptr);
|
||||
|
||||
@@ -83,7 +83,7 @@ class InOrderThreadContext : public ThreadContext
|
||||
*/
|
||||
CheckerCPU *getCheckerCpuPtr() { return NULL; }
|
||||
|
||||
Decoder *getDecoderPtr() { return cpu->getDecoderPtr(); }
|
||||
TheISA::Decoder *getDecoderPtr() { return cpu->getDecoderPtr(); }
|
||||
|
||||
System *getSystemPtr() { return cpu->system; }
|
||||
|
||||
|
||||
@@ -42,13 +42,13 @@
|
||||
#include <cstdio>
|
||||
#include <iomanip>
|
||||
|
||||
#include "arch/sparc/decoder.hh"
|
||||
#include "arch/sparc/predecoder.hh"
|
||||
#include "arch/sparc/registers.hh"
|
||||
#include "arch/sparc/utility.hh"
|
||||
#include "arch/tlb.hh"
|
||||
#include "base/socket.hh"
|
||||
#include "cpu/base.hh"
|
||||
#include "cpu/decode.hh"
|
||||
#include "cpu/legiontrace.hh"
|
||||
#include "cpu/static_inst.hh"
|
||||
#include "cpu/thread_context.hh"
|
||||
|
||||
@@ -44,11 +44,11 @@
|
||||
#ifndef __CPU_O3_FETCH_HH__
|
||||
#define __CPU_O3_FETCH_HH__
|
||||
|
||||
#include "arch/decoder.hh"
|
||||
#include "arch/predecoder.hh"
|
||||
#include "arch/utility.hh"
|
||||
#include "base/statistics.hh"
|
||||
#include "config/the_isa.hh"
|
||||
#include "cpu/decode.hh"
|
||||
#include "cpu/pc_event.hh"
|
||||
#include "cpu/timebuf.hh"
|
||||
#include "cpu/translation.hh"
|
||||
@@ -340,7 +340,7 @@ class DefaultFetch
|
||||
}
|
||||
|
||||
/** The decoder. */
|
||||
Decoder decoder;
|
||||
TheISA::Decoder decoder;
|
||||
|
||||
private:
|
||||
DynInstPtr buildInst(ThreadID tid, StaticInstPtr staticInst,
|
||||
|
||||
@@ -85,7 +85,7 @@ class O3ThreadContext : public ThreadContext
|
||||
|
||||
CheckerCPU *getCheckerCpuPtr() { return NULL; }
|
||||
|
||||
Decoder *getDecoderPtr() { return &cpu->fetch.decoder; }
|
||||
TheISA::Decoder *getDecoderPtr() { return &cpu->fetch.decoder; }
|
||||
|
||||
/** Returns a pointer to this CPU. */
|
||||
virtual BaseCPU *getCpuPtr() { return cpu; }
|
||||
|
||||
@@ -45,12 +45,12 @@
|
||||
#ifndef __CPU_SIMPLE_BASE_HH__
|
||||
#define __CPU_SIMPLE_BASE_HH__
|
||||
|
||||
#include "arch/decoder.hh"
|
||||
#include "arch/predecoder.hh"
|
||||
#include "base/statistics.hh"
|
||||
#include "config/the_isa.hh"
|
||||
#include "cpu/base.hh"
|
||||
#include "cpu/checker/cpu.hh"
|
||||
#include "cpu/decode.hh"
|
||||
#include "cpu/pc_event.hh"
|
||||
#include "cpu/simple_thread.hh"
|
||||
#include "cpu/static_inst.hh"
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#ifndef __CPU_SIMPLE_THREAD_HH__
|
||||
#define __CPU_SIMPLE_THREAD_HH__
|
||||
|
||||
#include "arch/decoder.hh"
|
||||
#include "arch/isa.hh"
|
||||
#include "arch/isa_traits.hh"
|
||||
#include "arch/registers.hh"
|
||||
@@ -51,7 +52,6 @@
|
||||
#include "arch/types.hh"
|
||||
#include "base/types.hh"
|
||||
#include "config/the_isa.hh"
|
||||
#include "cpu/decode.hh"
|
||||
#include "cpu/thread_context.hh"
|
||||
#include "cpu/thread_state.hh"
|
||||
#include "debug/FloatRegs.hh"
|
||||
@@ -128,7 +128,7 @@ class SimpleThread : public ThreadState
|
||||
TheISA::TLB *itb;
|
||||
TheISA::TLB *dtb;
|
||||
|
||||
Decoder decoder;
|
||||
TheISA::Decoder decoder;
|
||||
|
||||
// constructor: initialize SimpleThread from given process structure
|
||||
// FS
|
||||
@@ -199,7 +199,7 @@ class SimpleThread : public ThreadState
|
||||
|
||||
CheckerCPU *getCheckerCpuPtr() { return NULL; }
|
||||
|
||||
Decoder *getDecoderPtr() { return &decoder; }
|
||||
TheISA::Decoder *getDecoderPtr() { return &decoder; }
|
||||
|
||||
System *getSystemPtr() { return system; }
|
||||
|
||||
|
||||
@@ -55,12 +55,12 @@
|
||||
// DTB pointers.
|
||||
namespace TheISA
|
||||
{
|
||||
class Decoder;
|
||||
class TLB;
|
||||
}
|
||||
class BaseCPU;
|
||||
class CheckerCPU;
|
||||
class Checkpoint;
|
||||
class Decoder;
|
||||
class EndQuiesceEvent;
|
||||
class SETranslatingPortProxy;
|
||||
class FSTranslatingPortProxy;
|
||||
@@ -135,7 +135,7 @@ class ThreadContext
|
||||
|
||||
virtual CheckerCPU *getCheckerCpuPtr() = 0;
|
||||
|
||||
virtual Decoder *getDecoderPtr() = 0;
|
||||
virtual TheISA::Decoder *getDecoderPtr() = 0;
|
||||
|
||||
virtual System *getSystemPtr() = 0;
|
||||
|
||||
@@ -306,7 +306,7 @@ class ProxyThreadContext : public ThreadContext
|
||||
|
||||
CheckerCPU *getCheckerCpuPtr() { return actualTC->getCheckerCpuPtr(); }
|
||||
|
||||
Decoder *getDecoderPtr() { return actualTC->getDecoderPtr(); }
|
||||
TheISA::Decoder *getDecoderPtr() { return actualTC->getDecoderPtr(); }
|
||||
|
||||
System *getSystemPtr() { return actualTC->getSystemPtr(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user