[PATCH] D15614: TargetRegisterInfo: Add getRegAsmName()

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 28 07:17:51 PST 2016


tstellarAMD added a comment.

In http://reviews.llvm.org/D15614#324163, @echristo wrote:

> They did it via this:
>
>   class PPCReg<string n> : Register<n> {
>     let Namespace = "PPC";
>   }
>  
>   // 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<bits<5> num, string n> : PPCReg<n> {
>     let HWEncoding{4-0} = num;
>   }
>
>
> Where it just sets the register rather than using the default. Take a look at lib/Target/PPCRegisterInfo.td.


I'm not sure we are talking about this same thing, because this code appears to affect the encoding value and not the assembly string.


http://reviews.llvm.org/D15614





More information about the llvm-commits mailing list