>> The GAS intel code generator generates percents, look at the >> X86InstrInfo.td file it is full of them. > > Ah, I see what you're talking about. Please feel free to remove all of > those from the Intel format. For example, change this: > > def IN8rr : I<0xEC, RawFrm, (ops), > "in{b} {%dx, %al|%AL, %DX}">, Imp<[DX], [AL]>; > > to: > > def IN8rr : I<0xEC, RawFrm, (ops), > "in{b} {%dx, %al|AL, DX}">, Imp<[DX], [AL]>; > > For register allocatable values, changing printOp in the > X86IntelAsmPrinter should do the job.Yes GNU AS works either with or without % symbols for its register names. So presumably we remove the percents from the intel generator and then have the X86MASMPrinter inherit from the X86IntelAsmPrinter as was originally intended.> Also, when you do things like this, please send patches. Also, patches > should generally be sent to the llvmbugs list (which is designed for bugs > and patches), not llvmdev. In response to your recent 'MASM Backend' > mail, please update it per the feedback I gave for the 'isWindows' flag > email, and resent to llvmbugs.I will make these changes and create some patches. Aaron
On Tue, 12 Jul 2005, Aaron Gray wrote:>>> X86InstrInfo.td file it is full of them. >> >> Ah, I see what you're talking about. Please feel free to remove all of >> those from the Intel format. For example, change this: >> >> def IN8rr : I<0xEC, RawFrm, (ops), >> "in{b} {%dx, %al|%AL, %DX}">, Imp<[DX], [AL]>; >> >> to: >> >> def IN8rr : I<0xEC, RawFrm, (ops), >> "in{b} {%dx, %al|AL, DX}">, Imp<[DX], [AL]>; >> >> For register allocatable values, changing printOp in the X86IntelAsmPrinter >> should do the job. > > Yes GNU AS works either with or without % symbols for its register names. So > presumably we remove the percents from the intel generator and then have the > X86MASMPrinter inherit from the X86IntelAsmPrinter as was originally > intended.Please don't worry about preserving compatibility with GAS in Intel mode. GAS has several bugs in its support for intel mode that makes it hard to depend on. Feel free to change the current intel printer in any way to do what you need to support MASM. -Chris -- http://nondot.org/sabre/ http://llvm.org/
> Please don't worry about preserving compatibility with GAS in Intel mode. > GAS has several bugs in its support for intel mode that makes it hard to > depend on. Feel free to change the current intel printer in any way to do > what you need to support MASM.Okay. I am just a bit confused about the sub target stuff. Shall I ignore that for now. Also the target triplet and 'forWindows'/'forCygwin' stuff can be ignored and done separately. Aaron