[PATCH] [Tablegen] Fix alias instruction printer mangling opcodes with optional suffixes.

Matthew Wahab Matthew.Wahab at arm.com
Fri Jan 2 02:06:06 PST 2015


> From: hfinkel at anl.gov [mailto:hfinkel at anl.gov]
> Sent: 23 December 2014 23:27
>
> ================
> Comment at: utils/TableGen/AsmWriterEmitter.cpp:1029
> @@ -1026,2 +1028,3 @@
>    O << "          printOperand(MI, unsigned(AsmString[I++]) - 1, OS);\n";
> -  O << "      } else {\n";
> +  O << "      } else if (NeedOpcodeSep &&\n";
> +  O << "                 (AsmString[I] == ' ' || AsmString[I] == '\t'))
> {\n";
> ----------------
> So the general idea here is that we always eat the first ' ' or '\t' and
> replace it with a '\t'. All other whitespace (including that in between
> operands) passes through as provided. Is that right?

That's right. The current printer puts a tab between the opcode and the first operand. This needs to be suppressed until after those operands which are not separated from the opcode. Whitespace after the first separator will appear as is.

> http://reviews.llvm.org/D6530
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/


-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No:  2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No:  2548782




More information about the llvm-commits mailing list