ANNOUNCE: Harpy 0.4 - Runtime code generation for x86 machine code

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ANNOUNCE: Harpy 0.4 - Runtime code generation for x86 machine code

Martin Grabmueller
We are pleased to announce the release of Harpy 0.4, a library for
runtime code generation for x86 machine code.

Harpy is available from Hackage:

  http://hackage.haskell.org/cgi-bin/hackage-scripts/package/harpy-0.4

Also see Harpy's homepage, which features two tutorials and access to
the darcs repo (and to the Haddock documentation, until it is available
from Hackage, too):

  http://uebb.cs.tu-berlin.de/harpy/

Harpy is supposed to be built with GHC 6.8 and GHC 6.6 (with Cabal 1.2
or greater).  Please report any build problems you encounter.

This release features the following additions and fixes:

- New convenience top-level module "Harpy", which re-exports
  Harpy.CodeGenMonad, Harpy.Call and Harpy.X86Assembler

- It is now possible to override Harpy's automatic code buffer
  management.  The new field 'customCodeBuffer' in the type
  'CodeGenConfig' can be set to 'Just (buf, size)', where 'buf' is a
  pointer to a memory region of 'size' bytes.  Harpy will then use the
  supplied code buffer and will not perform any automatic code buffer
  allocation on overflow.  Overflow checking is still performed and
  will result in an exception in the CodeGen monad.

- When using the high-level assembler in X86Assembler, the code buffer
  is automatically protected from overflow.

- Floating point operations added to X86Assembler (only for double
  operands yet).

- Preliminary support for SSE instructions.  Currently, only the
  packed and scalar floating-point arithmetic operations are supported
  (both in the low-level module Harpy.X86CodeGen and as methods in
  Harpy.X86Assembler)

- Code buffer default size has been increased from 128 to 4096 bytes.

- The CodeGenMonad fails when a label is defined twice.

- It is now possible to associate names with labels, using the new
  operation newNamedLabel.  The given names will show up in the
  disassembly, which makes debugging of generated code much easier.

- The doc directory contains a second, slightly larger tutorial now.

- The examples/evaluator directory contains a small example
  interpreter for arithmetic expressions, which translates expressions
  entered at the keayboard to machine code on the fly.  This is the
  demo program we presented at the Haskell Workshop 2007.

Happy Haskell Hacking with Harpy,

  Martin and Dirk




_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe

signature.asc (260 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ANNOUNCE: Harpy 0.4 - Runtime code generation for x86 machine code

Austin Seipp
> - When using the high-level assembler in X86Assembler, the code buffer
>   is automatically protected from overflow.

This one update alone is worth the whole upgrade; while experimenting
with Harpy in several of my own personal compiler-related projects,
the necessity of ensureBufferSize was a major limitation in code
generation since I found it did nothing but litter the resulting asm and
distract from the actual code generation (considering I figure the
assembler could count the bytes a lot easier than I could.)

Great work on a great library. I have already installed it and
definitely will be putting it to use in the near future :)

--
"It was in the days of the rains that their prayers went up,
not from the fingering of knotted prayer cords or the spinning
of prayer wheels, but from the great pray-machine in the
monastery of Ratri, goddess of the Night."
 Roger Zelazny
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe