From: Hal Finkel Date: Tue, 26 Mar 2013 21:50:26 +0000 (+0000) Subject: Restore real bit lengths on PPC register numbers X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=567fa62ddc32c69e4dfe5a365463f06df5abc051;p=platform%2Fupstream%2Fllvm.git Restore real bit lengths on PPC register numbers As suggested by Bill Schmidt (in reviewing r178067), use the real register number bit lengths (which is self-documenting, and prevents using illegal numbers), and set only the relevant bits in HWEncoding (which defaults to 0). No functionality change intended. llvm-svn: 178077 --- diff --git a/llvm/lib/Target/PowerPC/PPCRegisterInfo.td b/llvm/lib/Target/PowerPC/PPCRegisterInfo.td index 28c590c..c5e3255 100644 --- a/llvm/lib/Target/PowerPC/PPCRegisterInfo.td +++ b/llvm/lib/Target/PowerPC/PPCRegisterInfo.td @@ -26,8 +26,8 @@ class PPCReg : Register { // We identify all our registers with a 5-bit ID, for consistency's sake. // GPR - One of the 32 32-bit general-purpose registers -class GPR num, string n> : PPCReg { - let HWEncoding = num; +class GPR num, string n> : PPCReg { + let HWEncoding{4-0} = num; } // GP8 - One of the 32 64-bit general-purpose registers @@ -38,29 +38,29 @@ class GP8 : PPCReg { } // SPR - One of the 32-bit special-purpose registers -class SPR num, string n> : PPCReg { - let HWEncoding = num; +class SPR num, string n> : PPCReg { + let HWEncoding{9-0} = num; } // FPR - One of the 32 64-bit floating-point registers -class FPR num, string n> : PPCReg { - let HWEncoding = num; +class FPR num, string n> : PPCReg { + let HWEncoding{4-0} = num; } // VR - One of the 32 128-bit vector registers -class VR num, string n> : PPCReg { - let HWEncoding = num; +class VR num, string n> : PPCReg { + let HWEncoding{4-0} = num; } // CR - One of the 8 4-bit condition registers -class CR num, string n, list subregs> : PPCReg { - let HWEncoding = num; +class CR num, string n, list subregs> : PPCReg { + let HWEncoding{2-0} = num; let SubRegs = subregs; } // CRBIT - One of the 32 1-bit condition register fields -class CRBIT num, string n> : PPCReg { - let HWEncoding = num; +class CRBIT num, string n> : PPCReg { + let HWEncoding{4-0} = num; } // General-purpose registers