X-Git-Url: http://git.joshuawise.com/firearm.git/blobdiff_plain/cb0428b6a01af21f4c98bb827405d18239a1f97f..c65110a8c83463c0f95391c2ec7e0277de333c62:/Decode.v diff --git a/Decode.v b/Decode.v index 359bbc0..b58951a 100644 --- a/Decode.v +++ b/Decode.v @@ -65,9 +65,9 @@ module Decode( `DECODE_CDP, /* Coprocessor data op */ `DECODE_MRCMCR, /* Coprocessor register transfer */ `DECODE_SWI: /* SWI */ - rpc = inpc - 8; + rpc = inpc + 8; `DECODE_ALU: /* ALU */ - rpc = inpc - (insn[25] ? 8 : (insn[4] ? 12 : 8)); + rpc = inpc + (insn[25] ? 8 : (insn[4] ? 12 : 8)); default: /* X everything else out */ rpc = 32'hxxxxxxxx; endcase @@ -171,6 +171,7 @@ module Decode( begin read_0 = insn[19:16]; /* Rn */ read_1 = insn[3:0]; /* Rm */ + read_2 = insn[15:12]; op0_out = regs0; if(insn[25]) begin @@ -180,6 +181,7 @@ module Decode( op1_out = shift_res; carry_out = shift_cflag_out; end + op2_out = regs2; end `DECODE_LDMSTM: /* Block data transfer */ begin