Skip to content

Generating C disassemblers and assemblers from Sail #658

Answered by Alasdair
moste00 asked this question in Q&A
Discussion options

You must be logged in to vote

Sail already has a C backend. The Sail manual linked above seems to imply that all Sail is translatable to C, however, almost all discussions that I see about Sail here and elsewhere reference the C backend only in the context of generating an "execution model", namely the execute function clauses of an arch model.

The only thing that is not currently translated is the string parsing part of the mappings. If we wanted to translate those we might need to generate something more like a yacc grammar. In particular the string append pattern x ^ y doesn't have a good translation, as you can't decide how to split the input string without a somewhat sophisticated parsing approach. Right now be…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by moste00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants