+ } else if (RC == PPC::CRBITRCRegisterClass) {
+ // FIXME: We use CRi here because there is no mtcrf on a bit. Since the
+ // backend currently only uses CR1EQ as an individual bit, this should
+ // not cause any bug. If we need other uses of CR bits, the following
+ // code may be invalid.
+ if (SrcReg >= PPC::CR0LT || SrcReg <= PPC::CR0UN)
+ return StoreRegToStackSlot(TII, PPC::CR0, isKill, FrameIdx,
+ PPC::CRRCRegisterClass, NewMIs);
+ else if (SrcReg >= PPC::CR1LT || SrcReg <= PPC::CR1UN)
+ return StoreRegToStackSlot(TII, PPC::CR1, isKill, FrameIdx,
+ PPC::CRRCRegisterClass, NewMIs);
+ if (SrcReg >= PPC::CR2LT || SrcReg <= PPC::CR2UN)
+ return StoreRegToStackSlot(TII, PPC::CR2, isKill, FrameIdx,
+ PPC::CRRCRegisterClass, NewMIs);
+ if (SrcReg >= PPC::CR3LT || SrcReg <= PPC::CR3UN)
+ return StoreRegToStackSlot(TII, PPC::CR3, isKill, FrameIdx,
+ PPC::CRRCRegisterClass, NewMIs);
+ if (SrcReg >= PPC::CR4LT || SrcReg <= PPC::CR4UN)
+ return StoreRegToStackSlot(TII, PPC::CR4, isKill, FrameIdx,
+ PPC::CRRCRegisterClass, NewMIs);
+ if (SrcReg >= PPC::CR5LT || SrcReg <= PPC::CR5UN)
+ return StoreRegToStackSlot(TII, PPC::CR5, isKill, FrameIdx,
+ PPC::CRRCRegisterClass, NewMIs);
+ if (SrcReg >= PPC::CR6LT || SrcReg <= PPC::CR6UN)
+ return StoreRegToStackSlot(TII, PPC::CR6, isKill, FrameIdx,
+ PPC::CRRCRegisterClass, NewMIs);
+ if (SrcReg >= PPC::CR7LT || SrcReg <= PPC::CR7UN)
+ return StoreRegToStackSlot(TII, PPC::CR7, isKill, FrameIdx,
+ PPC::CRRCRegisterClass, NewMIs);