Difference between revisions of "Harpy"
From HaskellWiki
m (Added category) |
(→Tutorials: Updated links) |
||
(One intermediate revision by the same 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 ( | + | 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] |
− | |||
− | |||
− | |||
==Limitations== | ==Limitations== | ||
Line 14: | Line 11: | ||
== Tutorials== | == Tutorials== | ||
+ | |||
* Writing x86 code generators with Harpy: | * Writing x86 code generators with Harpy: | ||
− | ** [http:// | + | ** [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:// | + | ** [http://community.haskell.org/~martin/repos/harpy/doc/tutorial.lhs A fast factorial function] (literate Haskell source code) |
− | ** [http://augustss.blogspot. | + | ** [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. | + | ** [http://augustss.blogspot.nl/2007/06/playing-with-harpy-recently-there-was.html Generating x86 assembly] |
− | ** [http://augustss.blogspot. | + | ** [http://augustss.blogspot.nl/2007/06/simple-compiler-in-my-last-post-i.html Compiling a DSL to x86 assembly] |
− | ** [http://augustss.blogspot. | + | ** [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 == |
Latest revision as of 12:49, 22 January 2013
Contents
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
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
Tutorials
- Writing x86 code generators with Harpy:
- Harpy: Run-time Code Generation in Haskell (PDF), describing a fast factorial function
- A fast factorial function (literate Haskell source code)
- Run-time compiler for call-by-value lambda calculus (literate Haskell source code)
- Generating x86 assembly
- Compiling a DSL to x86 assembly
- Disassembling x86
- Generating more code with Harpy