[llvm-dev] Register Number

Sky Flyer via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 17 01:26:03 PDT 2015


Dear all,

in my TestRegisterInfo.td file, I defined a register like this:

class TestReg<bits<6> enc, string name> : Register<name> {
  let HWEncoding{5-0} = enc;
  let Namespace = "TEST";
}

def D0   : TestReg<0x01,   "d0">, DwarfRegNum<[1]>;

but when I compile, the result I have in TestGenAsmMatcher.inc is this:

case 'd':    // 7 strings to match.
  switch (Name[1]) {
      case '0':  // 1 string to match.
        return* 14*;       // "d0"

I supposed I will get either 1 (because of encoding) or 0 (because of
DwarfRegNum). Is this 14 something system generated? How can I assign my
own number to the registers?

Cheers,
ES
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150917/4d05240c/attachment.html>


More information about the llvm-dev mailing list