diff options
author | Ali Saidi <Ali.Saidi@ARM.com> | 2009-11-16 11:37:03 -0600 |
---|---|---|
committer | Ali Saidi <Ali.Saidi@ARM.com> | 2009-11-16 11:37:03 -0600 |
commit | 171e7f7b24eead1fa82202549e3fad9a0df7b017 (patch) | |
tree | 89de2d449e91ac4296aeb6cb1f3ed63f2929b088 /src | |
parent | 9127ee5ac8913eacfc62967bd4b275a1845d8a9b (diff) | |
download | gem5-171e7f7b24eead1fa82202549e3fad9a0df7b017.tar.xz |
imported patch isa_fixes2.diff
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/arm/isa/decoder.isa | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/src/arch/arm/isa/decoder.isa b/src/arch/arm/isa/decoder.isa index 27af81382..5a6e8773a 100644 --- a/src/arch/arm/isa/decoder.isa +++ b/src/arch/arm/isa/decoder.isa @@ -221,18 +221,26 @@ format DataOp { 1: decode OPCODE { // The following two instructions aren't supposed to be defined 0x8: DataOp::movw({{ Rd = IMMED_11_0 | (RN << 12) ; }}); - 0x9: DataImmOp::msr_ia_cpsr ({{ - //assert(!RN<1:0>); - if (OPCODE_18) { - Cpsr = Cpsr<31:20> | rotated_imm | Cpsr<15:0>; - } - if (OPCODE_19) { - CondCodes = rotated_imm; - } + 0x9: decode RN { + 0: decode IMM { + 0: PredImmOp::nop({{ ; }}); + 1: WarnUnimpl::yield(); + 2: WarnUnimpl::wfe(); + 3: WarnUnimpl::wfi(); + 4: WarnUnimpl::sev(); + } + default: PredImmOp::msr_i_cpsr({{ + uint32_t newCpsr = + cpsrWriteByInstr(Cpsr | CondCodes, + rotated_imm, RN, false); + Cpsr = ~CondCodesMask & newCpsr; + CondCodes = CondCodesMask & newCpsr; + }}); + } + 0xa: PredOp::movt({{ Rd = IMMED_11_0 << 16 | RN << 28 | Rd<15:0>; }}); + 0xb: PredImmOp::msr_i_spsr({{ + Spsr = spsrWriteByInstr(Spsr, rotated_imm, RN, false); }}); - - 0xa: WarnUnimpl::mrs_i_cpsr(); - 0xb: WarnUnimpl::mrs_i_spsr(); } } 0x2: AddrMode2::addrMode2(Disp, disp); |