<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 03/29/2012 08:54 AM, Jakob Stoklund Olesen wrote:
<blockquote cite="mid:2FAEF1D8-60BC-4488-A065-DCE2B484B169@2pi.dk"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<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-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 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>
</blockquote>
Yes, I was thinking to file a bug against tablegen for this.<br>
<br>
But then the definition should be in target.td for Num and others
should just have a "let".<br>
<br>
Reed<br>
</body>
</html>