llvm.org GIT mirror llvm / b6c3a6c
Merging r223328: ------------------------------------------------------------------------ r223328 | hfinkel | 2014-12-04 00:46:20 +0000 (Thu, 04 Dec 2014) | 8 lines [PowerPC] 'cc' should be an alias only to 'cr0' We had mistakenly believed that GCC's 'cc' referred to the entire condition-code register (cr0 through cr7) -- and implemented this in r205630 to fix PR19326, but 'cc' is actually an alias only to 'cr0'. This is causing LLVM to clobber too much with legacy code with inline asm using the 'cc' clobber. Fixes PR21451. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_35@223747 91177308-0d34-0410-b5e6-96231b3b80d8 Hal Finkel 5 years ago
2 changed file(s) with 3 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
187187 def CR7 : CR<7, "cr7", [CR7LT, CR7GT, CR7EQ, CR7UN]>, DwarfRegNum<[75, 75]>;
188188 }
189189
190 // The full condition-code register. This is not modeled fully, but defined
191 // here primarily, for compatibility with gcc, to allow the inline asm "cc"
192 // clobber specification to work.
190 // An alias for "cr0" used by GCC.
193191 def CC : PPCReg<"cc">, DwarfRegAlias {
194 let Aliases = [CR0, CR1, CR2, CR3, CR4, CR5, CR6, CR7];
192 let Aliases = [CR0];
195193 }
196194
197195 // Link register
4040 br label %foo
4141
4242 foo:
43 call { i64, i64 } asm sideeffect "sc", "={r0},={r3},{r0},~{cc}" (i64 %a)
43 call { i64, i64 } asm sideeffect "sc", "={r0},={r3},{r0},~{cc},~{cr1},~{cr2},~{cr3},~{cr4},~{cr5},~{cr6},~{cr7}" (i64 %a)
4444 br i1 %c, label %bar, label %end
4545
4646 bar: