[PATCH] [mips] [IAS] Implement the .asciiz directive.
toma.tabacu at imgtec.com
Mon Feb 16 03:38:53 PST 2015
Rafael, I was wondering if you could help me with the implementation of this directive ?
The .asciiz assembler directive is the same as .asciz, except it's not accepted by all architectures (the only in-tree users are MIPS and XCore).
The problem with MIPS is that it should accept both .asciiz and .asciz (I don't know what XCore is supposed to do, since they haven't implemented an XCoreAsmParser).
I see three ways to implement .ascciiz:
1. Add .asciiz to the DirectiveKindMap in AsmParser (which will make it available for all architectures).
2. Make AsmParser::parseDirectiveAscii public and use it for parsing .asciiz in MipsAsmParser.cpp.
3. Make AsmParser::parseEscapedString public and use it in a reimplementation of AsmParser::parseDirectiveAscii in MipsAsmParser.cpp.
In this patch, I have chosen the 3rd approach, as it seemed the least intrusive.
More information about the llvm-commits