"sparc" -> "mips"

arch/mips/isa_desc/formats.h:
arch/mips/isa_desc/formats/basic.format:
arch/mips/isa_desc/formats/branch.format:
arch/mips/isa_desc/formats/integerop.format:
arch/mips/isa_desc/formats/mem.format:
arch/mips/isa_desc/formats/noop.format:
arch/mips/isa_desc/formats/trap.format:
arch/mips/isa_traits.cc:
arch/mips/isa_traits.hh:
    changing "sparc" strings to "mips" everywhere

--HG--
extra : convert_revision : eaecf9eeac26e3ef0726deef2fb5d7e9ad172984
This commit is contained in:
Korey Sewell 2006-01-26 16:19:44 -05:00
parent efc4620de1
commit 2bc106a8e7
9 changed files with 44 additions and 40 deletions

View file

@ -1,19 +1,22 @@
//Include the basic format //Include the basic format
//Templates from this format are used later //Templates from this format are used later
##include "m5/arch/sparc/isa_desc/formats/basic.format" ##include "m5/arch/mips/isa_desc/formats/basic.format"
//Include the integerOp and integerOpCc format //Include the integerOp and integerOpCc format
##include "m5/arch/sparc/isa_desc/formats/integerop.format" ##include "m5/arch/mips/isa_desc/formats/integerop.format"
//Include the floatOp format
##include "m5/arch/mips/isa_desc/formats/floatop.format"
//Include the mem format //Include the mem format
##include "m5/arch/sparc/isa_desc/formats/mem.format" ##include "m5/arch/mips/isa_desc/formats/mem.format"
//Include the trap format //Include the trap format
##include "m5/arch/sparc/isa_desc/formats/trap.format" ##include "m5/arch/mips/isa_desc/formats/trap.format"
//Include the branch format //Include the branch format
##include "m5/arch/sparc/isa_desc/formats/branch.format" ##include "m5/arch/mips/isa_desc/formats/branch.format"
//Include the noop format //Include the noop format
##include "m5/arch/sparc/isa_desc/formats/noop.format" ##include "m5/arch/mips/isa_desc/formats/noop.format"

View file

@ -57,7 +57,7 @@ def template BasicDecodeWithMnemonic {{
// The most basic instruction format... used only for a few misc. insts // The most basic instruction format... used only for a few misc. insts
def format BasicOperate(code, *flags) {{ def format BasicOperate(code, *flags) {{
iop = InstObjParams(name, Name, 'SparcStaticInst', CodeBlock(code), flags) iop = InstObjParams(name, Name, 'MipsStaticInst', CodeBlock(code), flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecode.subst(iop) decode_block = BasicDecode.subst(iop)

View file

@ -7,12 +7,12 @@ output header {{
/** /**
* Base class for integer operations. * Base class for integer operations.
*/ */
class Branch : public SparcStaticInst class Branch : public MipsStaticInst
{ {
protected: protected:
/// Constructor /// Constructor
Branch(const char *mnem, MachInst _machInst, OpClass __opClass) : SparcStaticInst(mnem, _machInst, __opClass) Branch(const char *mnem, MachInst _machInst, OpClass __opClass) : MipsStaticInst(mnem, _machInst, __opClass)
{ {
} }
@ -41,7 +41,7 @@ def template BranchExecute {{
} }
//If we have an exception for some reason, //If we have an exception for some reason,
//deal with it //deal with it
catch(SparcException except) catch(MipsException except)
{ {
//Deal with exception //Deal with exception
return No_Fault; return No_Fault;
@ -58,7 +58,7 @@ def template BranchExecute {{
def format Branch(code, *opt_flags) {{ def format Branch(code, *opt_flags) {{
orig_code = code orig_code = code
cblk = CodeBlock(code) cblk = CodeBlock(code)
iop = InstObjParams(name, Name, 'SparcStaticInst', cblk, opt_flags) iop = InstObjParams(name, Name, 'MipsStaticInst', cblk, opt_flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecodeWithMnemonic.subst(iop) decode_block = BasicDecodeWithMnemonic.subst(iop)

View file

@ -7,12 +7,12 @@ output header {{
/** /**
* Base class for integer operations. * Base class for integer operations.
*/ */
class IntegerOp : public SparcStaticInst class IntegerOp : public MipsStaticInst
{ {
protected: protected:
/// Constructor /// Constructor
IntegerOp(const char *mnem, MachInst _machInst, OpClass __opClass) : SparcStaticInst(mnem, _machInst, __opClass) IntegerOp(const char *mnem, MachInst _machInst, OpClass __opClass) : MipsStaticInst(mnem, _machInst, __opClass)
{ {
} }
@ -46,7 +46,7 @@ def template IntegerExecute {{
} }
//If we have an exception for some reason, //If we have an exception for some reason,
//deal with it //deal with it
catch(SparcException except) catch(MipsException except)
{ {
//Deal with exception //Deal with exception
return No_Fault; return No_Fault;
@ -82,7 +82,7 @@ def format IntegerOp(code, *opt_flags) {{
for (marker, value) in (('ivValue', '0'), ('icValue', '0'), for (marker, value) in (('ivValue', '0'), ('icValue', '0'),
('xvValue', '0'), ('xcValue', '0')): ('xvValue', '0'), ('xcValue', '0')):
code.replace(marker, value) code.replace(marker, value)
iop = InstObjParams(name, Name, 'SparcStaticInst', cblk, opt_flags) iop = InstObjParams(name, Name, 'MipsStaticInst', cblk, opt_flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecodeWithMnemonic.subst(iop) decode_block = BasicDecodeWithMnemonic.subst(iop)
@ -102,7 +102,7 @@ def format IntegerOpCc(code, icValue, ivValue, xcValue, xvValue, *opt_flags) {{
for (marker, value) in (('ivValue', ivValue), ('icValue', icValue), for (marker, value) in (('ivValue', ivValue), ('icValue', icValue),
('xvValue', xvValue), ('xcValue', xcValue)): ('xvValue', xvValue), ('xcValue', xcValue)):
code.replace(marker, value) code.replace(marker, value)
iop = InstObjParams(name, Name, 'SparcStaticInst', cblk, opt_flags) iop = InstObjParams(name, Name, 'MipsStaticInst', cblk, opt_flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecodeWithMnemonic.subst(iop) decode_block = BasicDecodeWithMnemonic.subst(iop)

View file

@ -7,12 +7,12 @@ output header {{
/** /**
* Base class for integer operations. * Base class for integer operations.
*/ */
class Mem : public SparcStaticInst class Mem : public MipsStaticInst
{ {
protected: protected:
/// Constructor /// Constructor
Mem(const char *mnem, MachInst _machInst, OpClass __opClass) : SparcStaticInst(mnem, _machInst, __opClass) Mem(const char *mnem, MachInst _machInst, OpClass __opClass) : MipsStaticInst(mnem, _machInst, __opClass)
{ {
} }
@ -41,7 +41,7 @@ def template MemExecute {{
} }
//If we have an exception for some reason, //If we have an exception for some reason,
//deal with it //deal with it
catch(SparcException except) catch(MipsException except)
{ {
//Deal with exception //Deal with exception
return No_Fault; return No_Fault;
@ -58,7 +58,7 @@ def template MemExecute {{
def format Mem(code, *opt_flags) {{ def format Mem(code, *opt_flags) {{
orig_code = code orig_code = code
cblk = CodeBlock(code) cblk = CodeBlock(code)
iop = InstObjParams(name, Name, 'SparcStaticInst', cblk, opt_flags) iop = InstObjParams(name, Name, 'MipsStaticInst', cblk, opt_flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecodeWithMnemonic.subst(iop) decode_block = BasicDecodeWithMnemonic.subst(iop)
@ -69,7 +69,7 @@ def format Mem(code, *opt_flags) {{
def format Cas(code, *opt_flags) {{ def format Cas(code, *opt_flags) {{
orig_code = code orig_code = code
cblk = CodeBlock(code) cblk = CodeBlock(code)
iop = InstObjParams(name, Name, 'SparcStaticInst', cblk, opt_flags) iop = InstObjParams(name, Name, 'MipsStaticInst', cblk, opt_flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecodeWithMnemonic.subst(iop) decode_block = BasicDecodeWithMnemonic.subst(iop)

View file

@ -7,12 +7,12 @@ output header {{
/** /**
* Base class for integer operations. * Base class for integer operations.
*/ */
class Noop : public SparcStaticInst class Noop : public MipsStaticInst
{ {
protected: protected:
/// Constructor /// Constructor
Noop(const char *mnem, MachInst _machInst, OpClass __opClass) : SparcStaticInst(mnem, _machInst, __opClass) Noop(const char *mnem, MachInst _machInst, OpClass __opClass) : MipsStaticInst(mnem, _machInst, __opClass)
{ {
} }
@ -39,7 +39,7 @@ def template NoopExecute {{
def format Noop(code, *opt_flags) {{ def format Noop(code, *opt_flags) {{
orig_code = code orig_code = code
cblk = CodeBlock(code) cblk = CodeBlock(code)
iop = InstObjParams(name, Name, 'SparcStaticInst', cblk, opt_flags) iop = InstObjParams(name, Name, 'MipsStaticInst', cblk, opt_flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecodeWithMnemonic.subst(iop) decode_block = BasicDecodeWithMnemonic.subst(iop)

View file

@ -7,12 +7,12 @@ output header {{
/** /**
* Base class for integer operations. * Base class for integer operations.
*/ */
class Trap : public SparcStaticInst class Trap : public MipsStaticInst
{ {
protected: protected:
/// Constructor /// Constructor
Trap(const char *mnem, MachInst _machInst, OpClass __opClass) : SparcStaticInst(mnem, _machInst, __opClass) Trap(const char *mnem, MachInst _machInst, OpClass __opClass) : MipsStaticInst(mnem, _machInst, __opClass)
{ {
} }
@ -45,7 +45,7 @@ def template TrapExecute {{
def format Trap(code, *opt_flags) {{ def format Trap(code, *opt_flags) {{
orig_code = code orig_code = code
cblk = CodeBlock(code) cblk = CodeBlock(code)
iop = InstObjParams(name, Name, 'SparcStaticInst', cblk, opt_flags) iop = InstObjParams(name, Name, 'MipsStaticInst', cblk, opt_flags)
header_output = BasicDeclare.subst(iop) header_output = BasicDeclare.subst(iop)
decoder_output = BasicConstructor.subst(iop) decoder_output = BasicConstructor.subst(iop)
decode_block = BasicDecodeWithMnemonic.subst(iop) decode_block = BasicDecodeWithMnemonic.subst(iop)

View file

@ -26,15 +26,16 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "arch/sparc/isa_traits.hh" #include "arch/mips/isa_traits.hh"
#include "cpu/static_inst.hh" #include "cpu/static_inst.hh"
#include "sim/serialize.hh" #include "sim/serialize.hh"
// Alpha UNOP (ldq_u r31,0(r0)) // Alpha UNOP (ldq_u r31,0(r0))
const MachInst SPARCISA::NoopMachInst = 0x2ffe0000; // @todo: fix to MIPS specific
const MachInst MipsISA::NoopMachInst = 0x2ffe0000;
void void
SPARCISA::RegFile::serialize(std::ostream &os) MipsISA::RegFile::serialize(std::ostream &os)
{ {
intRegFile.serialize(os); intRegFile.serialize(os);
floatRegFile.serialize(os); floatRegFile.serialize(os);
@ -45,7 +46,7 @@ SPARCISA::RegFile::serialize(std::ostream &os)
void void
AlphaISA::RegFile::unserialize(Checkpoint *cp, const std::string &section) MipsISA::RegFile::unserialize(Checkpoint *cp, const std::string &section)
{ {
intRegFile.unserialize(cp, section); intRegFile.unserialize(cp, section);
floatRegFile.unserialize(cp, section); floatRegFile.unserialize(cp, section);

View file

@ -26,18 +26,18 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef __ARCH_SPARC_ISA_TRAITS_HH__ #ifndef __ARCH_MIPS_ISA_TRAITS_HH__
#define __ARCH_SPARC_ISA_TRAITS_HH__ #define __ARCH_MIPS_ISA_TRAITS_HH__
#include "arch/sparc/faults.hh" #include "arch/mips/faults.hh"
#include "base/misc.hh" #include "base/misc.hh"
#include "sim/host.hh" #include "sim/host.hh"
class FastCPU; class FastCPU;
//class FullCPU; class FullCPU;
//class Checkpoint; class Checkpoint;
#define TARGET_SPARC #define TARGET_MIPS
template <class ISA> class StaticInst; template <class ISA> class StaticInst;
template <class ISA> class StaticInstPtr; template <class ISA> class StaticInstPtr;
@ -48,7 +48,7 @@ template <class ISA> class StaticInstPtr;
// int ITB_ASN_ASN(uint64_t reg); // int ITB_ASN_ASN(uint64_t reg);
//} //}
class SPARCISA class MipsISA
{ {
public: public:
@ -463,7 +463,7 @@ class SPARCISA
}; };
typedef SPARCISA TheISA; typedef MIPSISA TheISA;
typedef TheISA::MachInst MachInst; typedef TheISA::MachInst MachInst;
typedef TheISA::Addr Addr; typedef TheISA::Addr Addr;
@ -525,4 +525,4 @@ class SyscallReturn {
#include "arch/alpha/ev5.hh" #include "arch/alpha/ev5.hh"
#endif #endif
#endif // __ARCH_SPARC_ISA_TRAITS_HH__ #endif // __ARCH_MIPS_ISA_TRAITS_HH__