function to lookup the proper tablegen'ed register enumeration. Previously,
it was using the encoded value directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185026
91177308-0d34-0410-b5e6-
96231b3b80d8
unsigned RegNo,
uint64_t Address,
const void *Decoder) {
unsigned RegNo,
uint64_t Address,
const void *Decoder) {
- Inst.addOperand(MCOperand::CreateReg(RegNo));
+ if (RegNo > 31)
+ return MCDisassembler::Fail;
+ unsigned Reg = getReg(Decoder, Mips::CCRRegClassID, RegNo);
+ Inst.addOperand(MCOperand::CreateReg(Reg));
return MCDisassembler::Success;
}
return MCDisassembler::Success;
}
# CHECK: ceil.w.s $f6, $f7
0x46 0x00 0x39 0x8e
# CHECK: ceil.w.s $f6, $f7
0x46 0x00 0x39 0x8e
-# CHECK: cfc1 $6, $7
-0x44 0x46 0x38 0x00
+# CHECK: cfc1 $6, $fcc0
+0x44 0x46 0x08 0x00
# CHECK: clo $6, $7
0x70 0xe6 0x30 0x21
# CHECK: clo $6, $7
0x70 0xe6 0x30 0x21
# CHECK: clz $6, $7
0x70 0xe6 0x30 0x20
# CHECK: clz $6, $7
0x70 0xe6 0x30 0x20
-# CHECK: ctc1 $6, $7
-0x44 0xc6 0x38 0x00
+# CHECK: ctc1 $6, $fcc0
+0x44 0xc6 0x08 0x00
# CHECK: cvt.d.s $f6, $f7
0x46 0x00 0x39 0xa1
# CHECK: cvt.d.s $f6, $f7
0x46 0x00 0x39 0xa1
# CHECK: ceil.w.s $f6, $f7
0x8e 0x39 0x00 0x46
# CHECK: ceil.w.s $f6, $f7
0x8e 0x39 0x00 0x46
-# CHECK: cfc1 $6, $7
-0x00 0x38 0x46 0x44
+# CHECK: cfc1 $6, $fcc0
+0x00 0x08 0x46 0x44
# CHECK: clo $6, $7
0x21 0x30 0xe6 0x70
# CHECK: clo $6, $7
0x21 0x30 0xe6 0x70
# CHECK: clz $6, $7
0x20 0x30 0xe6 0x70
# CHECK: clz $6, $7
0x20 0x30 0xe6 0x70
-# CHECK: ctc1 $6, $7
-0x00 0x38 0xc6 0x44
+# CHECK: ctc1 $6, $fcc0
+0x00 0x08 0xc6 0x44
# CHECK: cvt.d.s $f6, $f7
0xa1 0x39 0x00 0x46
# CHECK: cvt.d.s $f6, $f7
0xa1 0x39 0x00 0x46
# CHECK: ceil.w.s $f6, $f7
0x46 0x00 0x39 0x8e
# CHECK: ceil.w.s $f6, $f7
0x46 0x00 0x39 0x8e
-# CHECK: cfc1 $6, $7
-0x44 0x46 0x38 0x00
+# CHECK: cfc1 $6, $fcc0
+0x44 0x46 0x08 0x00
# CHECK: clo $6, $7
0x70 0xe6 0x30 0x21
# CHECK: clo $6, $7
0x70 0xe6 0x30 0x21
# CHECK: clz $6, $7
0x70 0xe6 0x30 0x20
# CHECK: clz $6, $7
0x70 0xe6 0x30 0x20
-# CHECK: ctc1 $6, $7
-0x44 0xc6 0x38 0x00
+# CHECK: ctc1 $6, $fcc0
+0x44 0xc6 0x08 0x00
# CHECK: cvt.d.s $f6, $f7
0x46 0x00 0x39 0xa1
# CHECK: cvt.d.s $f6, $f7
0x46 0x00 0x39 0xa1
# CHECK: ceil.w.s $f6, $f7
0x8e 0x39 0x00 0x46
# CHECK: ceil.w.s $f6, $f7
0x8e 0x39 0x00 0x46
-# CHECK: cfc1 $6, $7
-0x00 0x38 0x46 0x44
+# CHECK: cfc1 $6, $fcc0
+0x00 0x08 0x46 0x44
# CHECK: clo $6, $7
0x21 0x30 0xe6 0x70
# CHECK: clo $6, $7
0x21 0x30 0xe6 0x70
# CHECK: clz $6, $7
0x20 0x30 0xe6 0x70
# CHECK: clz $6, $7
0x20 0x30 0xe6 0x70
-# CHECK: ctc1 $6, $7
-0x00 0x38 0xc6 0x44
+# CHECK: ctc1 $6, $fcc0
+0x00 0x08 0xc6 0x44
# CHECK: cvt.d.s $f6, $f7
0xa1 0x39 0x00 0x46
# CHECK: cvt.d.s $f6, $f7
0xa1 0x39 0x00 0x46