On Nov 14, 2006, at 4:06 AM, Simon Marlow wrote:
Peter Tanski wrote:
On Nov 13, 2006, at 6:54 AM, Simon Marlow wrote:
Peter Tanski wrote:

* YASM, at <http://www.tortall.net/projects/yasm/> ...

I like the look of YASM. In fact, using YASM we wouldn't have to make many changes to the NCG pretty printer, because it understands GAS syntax, right? At the least, this shortens the path to getting something working, even if it isn't the final solution.

I haven't used YASM on any of my own asm files yet but the relevant distribution is a single win32 or win64 executable and it has worked with asm produced by GCC. YASM also has a few associated libraries (libyasm, at <http://www.tortall.net/projects/yasm/wiki/Libyasm>) but I don't think GHC would need them.

According to the YASM manual, section 1.5 Supported Parsers, at <http://www.tortall.net/projects/yasm/manual/html/manual.html#running- parser>, "Yasm's support for GAS syntax is moderately good, although immature: not all directives are supported, and only 32-bit x86 and AMD64 architectures are supported. There is also no support for the GAS preprocessor. Despite these limitations, Yasm's GAS syntax support is good enough to handle essentially all x86 and AMD64 GCC compiler output." This should work unmodified with GHC, correct?

* Task point 4: modifications to driver, build system, etc.

Windows-native GHC won't require Perl, because it is using the NCG only. Perl would only be required for the splitter, but I imagine we'll be generating DLLs so splitting won't be an issue.

I must be incredibly daft. I hadn't considered that Windows-native GHC wouldn't continue to support the use of -fvia-C. (Not a bad idea! GHC had to make the leap to pure NCG some time!)

Ideally I'd like to refactor the native code generator to separate out all the architecture-specific stuff into separate files, and make it possible to compile in more than one backend at the same time (we might even compile in all of them by default).
...
By the way, I made some of my notes readable and general, as a start to the new Commentary NCG page.

Thanks, I took a quick look and it looks great!

You are very welcome. There is still some left for me to do, but I am glad I can help a little. I don't know which part of the task you think would be higher priority: adding support to the driver for CL command line options or refactoring the NCG (I could get to either fairly soon.)

Cheers,
Peter Tanski

_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to