llvm.org GIT mirror llvm / f0e3ca0
Most PPC M[TF]CR instructions do not have side effects git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178978 91177308-0d34-0410-b5e6-96231b3b80d8 Hal Finkel 7 years ago
2 changed file(s) with 20 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
223223
224224
225225 // 64-bit CR instructions
226 let neverHasSideEffects = 1 in {
226227 def MTCRF8 : XFXForm_5<31, 144, (outs crbitm:$FXM), (ins G8RC:$rS),
227228 "mtcrf $FXM, $rS", BrMCRX>,
228229 PPC970_MicroCode, PPC970_Unit_CRU;
231232 def MFCR8pseud: XFXForm_3<31, 19, (outs G8RC:$rT), (ins crbitm:$FXM),
232233 "#MFCR8pseud", SprMFCR>,
233234 PPC970_MicroCode, PPC970_Unit_CRU;
234
235 } // neverHasSideEffects = 1
236
237 // MFCR uses all CR registers, but marking that explicitly causes
238 // problems because some of them appear to be undefined. Because
239 // this form is used only in prologue code, just mark it as having
240 // side effects.
241 let /* Uses = [CR0, CR1, CR2, CR3, CR4, CR5, CR6] */ hasSideEffects = 1 in
235242 def MFCR8 : XFXForm_3<31, 19, (outs G8RC:$rT), (ins),
236243 "mfcr $rT", SprMFCR>,
237244 PPC970_MicroCode, PPC970_Unit_CRU;
13361336 def RESTORE_VRSAVE : Pseudo<(outs VRSAVERC:$vrsave), (ins memri:$F),
13371337 "#RESTORE_VRSAVE", []>;
13381338
1339 let neverHasSideEffects = 1 in {
13391340 def MTCRF : XFXForm_5<31, 144, (outs crbitm:$FXM), (ins GPRC:$rS),
13401341 "mtcrf $FXM, $rS", BrMCRX>,
13411342 PPC970_MicroCode, PPC970_Unit_CRU;
13541355 def MFCRpseud: XFXForm_3<31, 19, (outs GPRC:$rT), (ins crbitm:$FXM),
13551356 "#MFCRpseud", SprMFCR>,
13561357 PPC970_MicroCode, PPC970_Unit_CRU;
1357
1358
1359 def MFOCRF: XFXForm_5a<31, 19, (outs GPRC:$rT), (ins crbitm:$FXM),
1360 "mfocrf $rT, $FXM", SprMFCR>,
1361 PPC970_DGroup_First, PPC970_Unit_CRU;
1362 } // neverHasSideEffects = 1
1363
1364 // MFCR uses all CR registers, but marking that explicitly causes
1365 // problems because some of them appear to be undefined. Because
1366 // this form is used only in prologue code, just mark it as having
1367 // side effects.
1368 let /* Uses = [CR0, CR1, CR2, CR3, CR4, CR5, CR6] */ hasSideEffects = 1 in
13581369 def MFCR : XFXForm_3<31, 19, (outs GPRC:$rT), (ins),
13591370 "mfcr $rT", SprMFCR>,
13601371 PPC970_MicroCode, PPC970_Unit_CRU;
1361
1362 def MFOCRF: XFXForm_5a<31, 19, (outs GPRC:$rT), (ins crbitm:$FXM),
1363 "mfocrf $rT, $FXM", SprMFCR>,
1364 PPC970_DGroup_First, PPC970_Unit_CRU;
13651372
13661373 // Pseudo instruction to perform FADD in round-to-zero mode.
13671374 let usesCustomInserter = 1, Uses = [RM] in {