Review Board 2.0.15


MIPS: fix several instructions related to FS in decoder.isa

Review Request #999 - Created Jan. 16, 2012 and updated - Latest diff uploaded

Information
Deyuan Guo
gem5
Reviewers
Default
[--splitting the mips-fs patch--]

The first problem: eret
We met a compiling error of "NPC/NNPC may be used uninitialized", which caused by eret instruction.
Actually, we don't need to care about the initial values of NPC and NNPC here, so we simply put them into a DPRINTF function, then the ISA parser can recognize them.

Second: tlbwi/tlbwr
The tlbwi/tlbwr instructions only call the getITBPtr() function and insertAt ITB, then the ITB and DTB are not synchronized.
Because MIPS doesn't distinguish between ITB and DTB, we have to insertAt DTB at the same time, to make sure that the ITB and DTB have the same contents.
In addition, the Random misc reg cannot generate a random integer correctly, so a static variable temporarily used here to give the index of TLB.

Third: wait
The wait instruction is temporarily implemented just the same as sync instruction. 

Last: rdhwr
Implement the rdhwr instruction by generating a fault instead of FailUnimpl, because the linux kernel can emulate this kind of instructions when a coprocessor unusable fault occurs.