}
static int64_t getRS(uint32_t insn) {
- int16_t val = (insn & 0x3FFF);
- return val;
+ return MBlazeRegisterInfo::getSpecialRegisterFromNumbering(insn&0x3FFF);
}
static int64_t getIMM(uint32_t insn) {
case MBlazeII::FRCS:
instr.addOperand(MCOperand::CreateReg(getRD(insn)));
- instr.addOperand(MCOperand::CreateImm(getRS(insn)));
+ instr.addOperand(MCOperand::CreateReg(getRS(insn)));
break;
case MBlazeII::FCRCS:
+ instr.addOperand(MCOperand::CreateReg(getRS(insn)));
instr.addOperand(MCOperand::CreateReg(getRA(insn)));
- instr.addOperand(MCOperand::CreateImm(getRS(insn)));
break;
case MBlazeII::FCRCX:
//===----------------------------------------------------------------------===//
// Misc. instructions
//===----------------------------------------------------------------------===//
-def MFS : SPC<0x25, 0x2, (outs GPR:$dst), (ins SPR:$src),
- "mfs $dst, $src", [], IIAlu>;
+let Form=FRCS in {
+ def MFS : SPC<0x25, 0x2, (outs GPR:$dst), (ins SPR:$src),
+ "mfs $dst, $src", [], IIAlu>;
+}
-def MTS : SPC<0x25, 0x3, (outs SPR:$dst), (ins GPR:$src),
- "mts $dst, $src", [], IIAlu>;
+let Form=FCRCS in {
+ def MTS : SPC<0x25, 0x3, (outs SPR:$dst), (ins GPR:$src),
+ "mts $dst, $src", [], IIAlu>;
+}
def MSRSET : MSR<0x25, 0x20, (outs GPR:$dst), (ins uimm15:$set),
"msrset $dst, $set", [], IIAlu>;