Personal tools

Harpy

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(Added section Examples, with a link to calc)
(Tutorials: Updated links)
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
 
==Description==
 
==Description==
   
Harpy is a library for run-time x86 code generation in Haskell programs. Harpy requires several Haskell extensions and GHC-specific features (the Haskell FFI, Template Haskell, multi-parameter type classes and monad transformers).
+
Harpy is a library for run-time x86 code generation in Haskell programs. Harpy requires several Haskell extensions and GHC-specific features (Template Haskell, multi-parameter type classes and monad transformers). It is available from [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/harpy Hackage]
 
* [http://uebb.cs.tu-berlin.de/harpy/ Project homepage]
 
* [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/harpy on hackage]
 
   
 
==Limitations==
 
==Limitations==
Line 11: Line 11:
   
 
== Tutorials==
 
== Tutorials==
  +
 
* Writing x86 code generators with Harpy:
 
* Writing x86 code generators with Harpy:
** [http://uebb.cs.tu-berlin.de/harpy/download/tutorial.pdf a fast factorial function]
+
** [http://www.grabmueller.de/martin/www/pub/harpy-demo-haskell07.pdf Harpy: Run-time Code Generation in Haskell] (PDF), describing a fast factorial function
** [http://uebb.cs.tu-berlin.de/harpy/download/larger-tutorial.pdf run-time compiler for call-by-value lambda calculus]
+
** [http://community.haskell.org/~martin/repos/harpy/doc/tutorial.lhs A fast factorial function] (literate Haskell source code)
** [http://augustss.blogspot.com/2007/06/playing-with-harpy-recently-there-was.html Generating x86 assembly]
+
** [http://community.haskell.org/~martin/repos/harpy/doc/larger-tutorial.lhs Run-time compiler for call-by-value lambda calculus] (literate Haskell source code)
** [http://augustss.blogspot.com/2007/06/simple-compiler-in-my-last-post-i.html Compiling a DSL to x86 assembly]
+
** [http://augustss.blogspot.nl/2007/06/playing-with-harpy-recently-there-was.html Generating x86 assembly]
** [http://augustss.blogspot.com/2007/06/disassembly-harpy-package-also-contains.html Disassembling x86]
+
** [http://augustss.blogspot.nl/2007/06/simple-compiler-in-my-last-post-i.html Compiling a DSL to x86 assembly]
** [http://augustss.blogspot.com/2007/06/generating-more-code-with-harpy-after.html Generating more code with Harpy]
+
** [http://augustss.blogspot.nl/2007/06/disassembly-harpy-package-also-contains.html Disassembling x86]
  +
** [http://augustss.blogspot.nl/2007/06/generating-more-code-with-harpy-after.html Generating more code with Harpy]
   
 
== Examples ==
 
== Examples ==
 
* [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/calc calc: A small compiler for arithmetic expressions]
 
* [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/calc calc: A small compiler for arithmetic expressions]
  +
  +
[[Category:Compiler tools]]

Latest revision as of 12:49, 22 January 2013

Contents

[edit] 1 Description

Harpy is a library for run-time x86 code generation in Haskell programs. Harpy requires several Haskell extensions and GHC-specific features (Template Haskell, multi-parameter type classes and monad transformers). It is available from Hackage

[edit] 2 Limitations

  • 64-bit mode is not supported
  • MMX, SSE, SSE2 and SSE3 instructions and registers are not supported.
  • The disassembler supports (in principle) 64-bit mode and SSE instructions, but this has not been tested.
  • Buffer overflow checks have to be done manually with checkBufferSize or ensureBufferSize

[edit] 3 Tutorials

[edit] 4 Examples