[LLVMdev] X86AsmPrinter + MASM and NASM backends
Chris Lattner
sabre at nondot.org
Sun Jul 10 20:46:12 PDT 2005
On Sat, 2 Jul 2005, Aaron Gray wrote:
>>> The only thing I did not like was a clsh between the enum X86 and the new
>>> namespace X86, which I had to rename as x86 :(
>>>
>>> Anyway, I suppose the lower case 'x' in 'x86' fits in with the lowercase
>>> 'llvm' namespace.
>>
>> I'm not sure I follow. X86 is a namespace. I assume you're running into
>> some strange VC thing or something (?). If not, please submit a patch to
>> change the x86 namespaces to the X86 namespace. It's possible that the
>> problem I described above was causing this issue for you.
>
> No dont worry about that now. Just the X86 namespace was clashing with the
> X86 instruction enum when it was not nested under the LLVM namespace.
Ok.
> I have written the X86MASMPrinter and will test it tommorow. It had to
> override behaviour right back to the AsmPrinter class as it had to override
> the basic 'gas' behaviour of the AsmPrinter class.
Ok.
> I am not really sure whether to do a X86NASMPrinter or whether to bypass that
> for now and work on an X86COFFWriter which would be more useful to me ?
I wouldn't suggest writing an X86NASMPrinter: just change the current
Intel printer to do what you want. Noone is currently using the intel
printer, so you can do what you wish to it.
> Also looking at your ELF code I do not know how to fit it in exactly with the
> command line switches etc.
I don't know which you would prefer. I'm actively (but slowly) hacking on
the ELF writer in my spare time. It will probably be a lot easier to
write the COFF writer after the ELF write is done, so you can use it as an
example.
In any case, getting the nasm writer working will be much easier still.
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list