diff options
author | Korey Sewell <ksewell@umich.edu> | 2006-03-14 18:28:51 -0500 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2006-03-14 18:28:51 -0500 |
commit | 6547e8882ba8fa538a8a80040b7eb82baedc540a (patch) | |
tree | b5aa6ba54489a4cd48f97e152e28f810da97c57d /arch/mips/isa | |
parent | af975813e546b5a951d5e7108454946afd31e434 (diff) | |
download | gem5-6547e8882ba8fa538a8a80040b7eb82baedc540a.tar.xz |
Minor Sconscript edit ... mips decoder changes ... initialize NNPC and output fault name in simple cpu
SConscript:
Separate Alpha EIO from syscall building for other architectures
arch/isa_specific.hh:
change MIPS constant to 34k
arch/mips/isa/decoder.isa:
Allow sll,ssnop,nop, and ehb to be determined through decoder using
the different types of default cases
arch/mips/isa/formats/branch.isa:
Delete debug code
arch/mips/isa/formats/noop.isa:
add a Nop format
arch/mips/isa_traits.hh:
use constants instead of enums
arch/mips/process.cc:
point to the correct header file
cpu/simple/cpu.cc:
Output the actual fault name
sim/process.cc:
Inititalize NNPC
--HG--
extra : convert_revision : adb0026dfad25b14c98fb03c98bfe9c681bba6f8
Diffstat (limited to 'arch/mips/isa')
-rw-r--r-- | arch/mips/isa/decoder.isa | 16 | ||||
-rw-r--r-- | arch/mips/isa/formats/branch.isa | 4 | ||||
-rw-r--r-- | arch/mips/isa/formats/noop.isa | 4 |
3 files changed, 15 insertions, 9 deletions
diff --git a/arch/mips/isa/decoder.isa b/arch/mips/isa/decoder.isa index ac97241ed..93e7238f8 100644 --- a/arch/mips/isa/decoder.isa +++ b/arch/mips/isa/decoder.isa @@ -30,11 +30,17 @@ decode OPCODE_HI default Unknown::unknown() { //Table A-3 Note: "1. Specific encodings of the rt, rd, and sa fields //are used to distinguish among the SLL, NOP, SSNOP and EHB functions." - 0x0: decode RS { - 0x0: sll({{ Rd = Rt.uw << SA; }}); - //0x0:nop({{ ; }}); //really sll r0,r0,0 - // 0x1:ssnop({{ ; }});//really sll r0,r0,1 - // 0x3:ehb({{ ; }}); //really sll r0,r0,3 + 0x0: decode RS { + 0x0: decode RT { + 0x0: decode RD default Nop::nop() { + 0x0: decode SA { + 0x1: ssnop({{ ; }}); //really sll r0,r0,1 + 0x3: ehb({{ ; }}); //really sll r0,r0,3 + } + } + } + + default: sll({{ Rd = Rt.uw << SA; }}); } 0x2: decode SRL { diff --git a/arch/mips/isa/formats/branch.isa b/arch/mips/isa/formats/branch.isa index 0d2ad7855..ce84f4b51 100644 --- a/arch/mips/isa/formats/branch.isa +++ b/arch/mips/isa/formats/branch.isa @@ -265,8 +265,6 @@ def format Branch(code,*flags) {{ code += ' NNPC = NNPC;\n' code += '} \n' - code += 'cout << hex << "NPC: " << NPC << " + " << disp << " = " << NNPC << endl;' - iop = InstObjParams(name, Name, 'Branch', CodeBlock(code), ('IsDirectControl', 'IsCondControl')) @@ -305,8 +303,6 @@ def format Jump(code,*flags) {{ if strlen > 1 and name[1:] == 'al': code = 'r31 = NNPC;\n' + code - #code += 'if(NNPC == 0x80000638) { NNPC = r31; cout << "SKIPPING JUMP TO SIM_GET_MEM_CONF" << endl;}' - #code += 'target = NNPC;' iop = InstObjParams(name, Name, 'Jump', CodeBlock(code),\ ('IsIndirectControl', 'IsUncondControl')) diff --git a/arch/mips/isa/formats/noop.isa b/arch/mips/isa/formats/noop.isa index d35179005..2aa4816e3 100644 --- a/arch/mips/isa/formats/noop.isa +++ b/arch/mips/isa/formats/noop.isa @@ -88,3 +88,7 @@ def format BasicOperateWithNopCheck(code, *opt_args) {{ exec_output = BasicExecute.subst(iop) }}; +def format Nop() {{ + decode_block = 'return new Nop(\"sll r0,r0,0\",machInst);\n' +}}; + |