<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 21, 2012, at 2:58 PM, reed kotler wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Optima; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: monospace; ">The field Num seems to have no meaning. It is not recognized by the<span class="Apple-converted-space"> </span><br>backend tools. It does not hurt anything but should not be there.<br><br>class ARMReg<bits<4> num, string n, list<Register> subregs = []> :<span class="Apple-converted-space"> </span><br>Register<n> {<br>  field bits<4> Num;<br>  let Namespace = "ARM";<br>  let SubRegs = subregs;<br>  // All bits of ARM registers with sub-registers are covered by<span class="Apple-converted-space"> </span><br>sub-registers.<br>  let CoveredBySubRegs = 1;<br>}<br></span></span></blockquote></div><br><div>You are right, the field is not used currently. Instead, we have large switch statements like getARMRegisterNumbering().</div><div><br></div><div>Actually, I think it might be useful to have TableGen handle the register encoding numbering, just like it does for DWARF register numbers.</div><div><br></div><div>/jakob</div><div><br></div></body></html>