[LLVMdev] X86AsmPrinter + MASM and NASM backends

Chris Lattner sabre at nondot.org
Mon Jul 11 15:41:11 PDT 2005


On Mon, 11 Jul 2005, Aaron Gray wrote:
>> On Mon, 2005-07-11 at 19:24 +0100, Aaron Gray wrote:
>>> The NASM like the MASM does not have % symbols on the register names so 
>>> will
>>> either inherit from the MASM printer or have its own TableGen class.
>> 
>> Couldn't one conditionally output some macros for the assembler to
>> translate the reg names rather than having another .td file?  or is '%'
>> not a valid part of a macro on NASM?
>
> I've already written the code for MASM, besides it is neater that way.
>
> I have augmented the X86InstrInfo.td file with another target class for MASM, 
> and can either use the MASM class for NASM or do the same thing again 
> creating another target class for NASM.

You shouldn't have to add new classes to the .td file, just modify printOp 
for your asmprinters.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/




More information about the llvm-dev mailing list