[PATCH] D41967: [PPC] Add a new register XER aliased to CARRY

Guozhi Wei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 16 11:30:22 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL322591: [PPC] Add a new register XER aliased to CARRY (authored by Carrot, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D41967?vs=129700&id=130002#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D41967

Files:
  llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.td


Index: llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.td
===================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.td
+++ llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.td
@@ -208,10 +208,14 @@
 // VRsave register
 def VRSAVE: SPR<256, "vrsave">, DwarfRegNum<[109]>;
 
+def XER: SPR<1, "xer">, DwarfRegNum<[76]>;
+
 // Carry bit.  In the architecture this is really bit 0 of the XER register
 // (which really is SPR register 1);  this is the only bit interesting to a
 // compiler.
-def CARRY: SPR<1, "ca">, DwarfRegNum<[76]>;
+def CARRY: SPR<1, "xer">, DwarfRegNum<[76]> {
+  let Aliases = [XER];
+}
 
 // FP rounding mode:  bits 30 and 31 of the FP status and control register
 // This is not allocated as a normal register; it appears only in
@@ -351,7 +355,7 @@
 }
 
 def VRSAVERC : RegisterClass<"PPC", [i32], 32, (add VRSAVE)>;
-def CARRYRC : RegisterClass<"PPC", [i32], 32, (add CARRY)> {
+def CARRYRC : RegisterClass<"PPC", [i32], 32, (add CARRY, XER)> {
   let CopyCost = -1;
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41967.130002.patch
Type: text/x-patch
Size: 1049 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180116/f33641e7/attachment.bin>


More information about the llvm-commits mailing list