From 2425d081246cd54203ff09d4a45ad83d91375dc5 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 18 Jun 2020 10:45:04 +0100 Subject: [PATCH] investigating mtocrf/mtcrf issue --- src/soc/decoder/isa/caller.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/soc/decoder/isa/caller.py b/src/soc/decoder/isa/caller.py index 8b40a1c8..e5d14652 100644 --- a/src/soc/decoder/isa/caller.py +++ b/src/soc/decoder/isa/caller.py @@ -410,7 +410,7 @@ class ISACaller: print("setup: 0x%x 0x%x %s" % (pc, ins & 0xffffffff, bin(ins))) print ("NIA, CIA", self.pc.CIA.value, self.pc.NIA.value) - yield self.dec2.dec.raw_opcode_in.eq(ins) + yield self.dec2.dec.raw_opcode_in.eq(ins & 0xffffffff) yield self.dec2.dec.bigendian.eq(0) # little / big? def execute_one(self): @@ -457,8 +457,7 @@ class ISACaller: # https://bugs.libre-soc.org/show_bug.cgi?id=390 if int_op == InternalOp.OP_MTCRF.value: dec_insn = yield self.dec2.e.insn - print ("mtcrf", bin(dec_insn), (dec_insn & (1<<20))) - if dec_insn & (1<<21) != 0: # sigh + if dec_insn & (1<<20) != 0: # sigh asmop = 'mtocrf' else: asmop = 'mtcrf' -- 2.30.2