News for hackers. Stuff that matters.
Re:The Evolution of the QEMU Translator by beagle3 on Friday January 29, 2021 @04:39AM (#25955643)
TCG is actually the 2nd generation backend. The 1st generation was much worse, but it was incredibly elegant: the operations were just written as functions in C, as you may do for an interpreter - and then memcpy’d one after the other.

So a compiler from one architecture to another which is as easy to write as an interpreter (but without interpreter overhead), is independent of the target architecture - and it just works. I remember being blown away by the elegance.

Re:The Evolution of the QEMU Translator by CodesInChaos on Friday January 29, 2021 @03:51PM (#25962347)
You might want to take a look at Partial evaluation, which is a similarly elegant technique.

https://en.wikipedia.org/wiki/Partial_evaluation

https://labs.oracle.com/pls/apex/f?p=LABS:0::APPLICATION_PRO...