ack icon indicating copy to clipboard operation
ack copied to clipboard

Status of EM languages

Open rochus-keller opened this issue 1 year ago • 4 comments

Does anyone know, whether the documentation in https://tack.sourceforge.net/olddocs/em.pdf of the EM language family is still precise and representative enough for the recent version of the toolkit (i.e. the most recent commit on the default branch, or the 6.0pre5 release)? If not, how about the old 5.6 release? If I would use the mentioned document to build a new front or back end creating or using the specified EM, would it still work with the rest of the tools?

rochus-keller avatar Jan 17 '24 22:01 rochus-keller

Yup, it's still accurate. We haven't made any spec changes (that I can remember!) since then.

If you're interested in doing either, there's a robust EM reading/writing library supplied. See https://github.com/davidgiven/ack/blob/default/modules/src/em_mes/em_mes.3 for the writer and https://github.com/davidgiven/ack/blob/default/modules/src/read_em/read_em.3 for the reader. It's not as trivial as it sounds because EM files can have two different encodings depending on whether you want plain text or binary.

davidgiven avatar Jan 17 '24 23:01 davidgiven

Great, thanks.

Somewhere you wrote that the generated code is good enough for CISC, but bad for RISC. How about the peephole and global optimizer? Is the resulting EM code significantly more efficient? Are there any performance results, e.g. on a CISC machine with and witouth the EM optimizer stages?

Has anyone ever tried to reuse the TCC backend, i.e. feed EM code to the TCC code generator? That would make all TCC backends accessible in one batch (i.e. i386, AMD64, arm, arm64, Risc-V).

rochus-keller avatar Jan 17 '24 23:01 rochus-keller