>>>> Right, presumably Wndows does not set the TT. Should Windows or MSVC++ >>>> have one ? If so how do I go about it. Maybe Jeff should be involved ? >>> >>> It should/will. Currently there is no C/C++ front-end that works on >>> native windows, but that doesn't really matter. In the future, we want >>> to key off the target triple that makes sense. >>> >>> Cygwin uses: i686-pc-cygwin and mingw uses i686-pc-mingw32, so I think >>> that using i686-pc-masm and i686-pc-nasm make sense. >> >> Okay, how do we implement that ? > > In your LLC changes, just check for *-nasm and/or *-masm in the same > places that *-darwin and *-cygwin are.Okay I will look into that tommorow.>>>>> 4. The name forWindows isn't very specific, as there are multiple dev >>>>> systems available on windows (including cygwin, mingw, masm, nasm, >>>>> etc). Please use something more specific. >>>> >>>> Maybe it should be MSVC specific then ? >>> >>> Sure, but presumably you want to differentiate between nasm and masm (if >>> they are not compatible) right? >> >> Right > > Then you need something more specific than 'isWindows'. I'd suggest, > isNASM and isMASM.'for' rather than 'is' forMSVC ? There is more to it than that :( I was going from the _WIN32 preprocessor symbol. So maybe 'forWIN32' if it is actually needed. Aaron
On Tue, 12 Jul 2005, Aaron Gray wrote:>>>> Sure, but presumably you want to differentiate between nasm and masm (if >>>> they are not compatible) right? >>> >>> Right >> >> Then you need something more specific than 'isWindows'. I'd suggest, >> isNASM and isMASM. > > 'for' rather than 'is'Yeah sorry.> forMSVC ? There is more to it than that :( > I was going from the _WIN32 preprocessor symbol. So maybe 'forWIN32' if it is > actually needed.I'll leave this to you and jeffc to hash out. I'll point out again that if NASM and MASM are not the same, that using 'win32' will not work, because it will be defined for both of them. It looks like Nate just committed the subtarget support, so you might want to look at that. -Chris -- http://nondot.org/sabre/ http://llvm.org/
Chris Lattner wrote:> On Tue, 12 Jul 2005, Aaron Gray wrote: > >>>>> Sure, but presumably you want to differentiate between nasm and >>>>> masm (if they are not compatible) right? >>>> >>>> >>>> Right >>> >>> >>> Then you need something more specific than 'isWindows'. I'd >>> suggest, isNASM and isMASM. >> >> >> 'for' rather than 'is' > > > Yeah sorry. > >> forMSVC ? There is more to it than that :( >> I was going from the _WIN32 preprocessor symbol. So maybe 'forWIN32' >> if it is actually needed. > > > I'll leave this to you and jeffc to hash out. I'll point out again > that if NASM and MASM are not the same, that using 'win32' will not > work, because it will be defined for both of them. > > It looks like Nate just committed the subtarget support, so you might > want to look at that. > > -Chris >_WIN32 is not suitable. It will also be defined for mingw, and as Chris pointed out it does not differentiate between NASM and MASM. To check for being built by MSVC++, look for _MSC_VER. I'm not sure how to differentiate between gcc and mingw.