Miasma generates machine code generators from a table of instruction descriptions. It's written in Scheme and generates code in C or Python, currently. Here's the README.
Download miasma-0.3.tar.gz or miasma-0.1.tar.gz.