PowerPC: Fix object creation with PPC::MTCRF8 instruction
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>
Mon, 8 Oct 2012 18:25:11 +0000 (18:25 +0000)
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>
Mon, 8 Oct 2012 18:25:11 +0000 (18:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165411 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp

index c0248a6045562969b925032838b6d2362d1e09fb..1fba5b8dc358060b81019903ac80367064cbf948 100644 (file)
@@ -168,7 +168,9 @@ unsigned PPCMCCodeEmitter::
 get_crbitm_encoding(const MCInst &MI, unsigned OpNo,
                     SmallVectorImpl<MCFixup> &Fixups) const {
   const MCOperand &MO = MI.getOperand(OpNo);
-  assert((MI.getOpcode() == PPC::MTCRF || MI.getOpcode() == PPC::MFOCRF) &&
+  assert((MI.getOpcode() == PPC::MTCRF || 
+          MI.getOpcode() == PPC::MFOCRF ||
+          MI.getOpcode() == PPC::MTCRF8) &&
          (MO.getReg() >= PPC::CR0 && MO.getReg() <= PPC::CR7));
   return 0x80 >> getPPCRegisterNumbering(MO.getReg());
 }