Problem with GenAsmMatcher: ($addr)

Hi all,

My instruction is something like “LDA ($5000),Y”. So my argstr pattern in the td file is “($$$addr),Y”. The problem is that I’m getting an error from tablegen -gen-asm-matcher:

error: unable to find operand: ‘addr)’.

Then I looked at GenAsmMatcher.cpp and tried “($$${addr}),Y” but got “error: unable to find operand: ‘$addr’”

So,

  1. How do I fix this?
  2. Is there any documentation on what the format of the argstr should be?