|Difference between Interpreter and DR email@example.com (Greg Simon) (1996-10-16)|
|Difference between Interpreter and DR firstname.lastname@example.org (Stephen J Bevan) (1996-10-18)|
|Re: Difference between Interpreter and DR email@example.com (Christian Smith) (1996-10-18)|
|Re: Difference between Interpreter and DR firstname.lastname@example.org (1996-10-20)|
|Re: Difference between Interpreter and DR email@example.com (1996-10-25)|
|From:||Stephen J Bevan <firstname.lastname@example.org>|
|Date:||18 Oct 1996 00:06:23 -0400|
I'm confused about the difference between an interpreter and a DR
(dynamic recompiler). ...
The following may help :-
, author= "Cathy May"
, title= "Mimic: A Fast System/370 Simulator"
, crossref= "iait:1987"
, pages= "1--13"
, refs= 26
, checked= 19940516
, keywords= "simulation"
, abstract= "Software simulation of one computer on another tends to
be slow. Traditional simulators typically execute about 100
instructions on the host machine per instruction simulated. Newer
simulators reduce the expansion factor to about 10, by saving and
reusing translations of individual instructions. This paper describes
an experimental simulator which takes the progression one step
further, translating groups of instructions as a unit. This approach,
combined with flow analysis, reduces the expansion factor to about 4.
The new simulator simulates System/370 on a RISC, namely the IBM RT
, sjb= "Categorises simulators into three types or generations.
The first generation simulators decode and execute each instruction in
turn. Second generation simulators cache dynamically created code
that simulates an instruction -- this reduces the decode overhead. A
third generation simulator translates a group of instructions
(typically a basic block) as one unit and caches that for future use.
Mimic is a third-generation simulator -- arguably it is a 3+ since it
deals with more than basic blocks. Mimic attempts to translate jumps!
It does this by performing flow analysis on the S/370 instructions
taking into account register values where known. This often allows it
to translate local jumps such that are used to implement loops thereby
translating the whole of an inner loop into the RT code.
Each S/370 register is stored in a RT register. This is simplified by
the fact that the S/370 and RT have the same size and number of
registers. To deal with the need for scratch registers in certain
routines, the least used registers (or perhaps ones not even used at
all) are flushed to memory for the duration of the routine and then
reloaded on exit.
Memory address translation is dealt with by aligning the S/370 image
on a 16Mb boundary so that only the top byte of the address needs to
A facility is included that allows critical parts of the S/370 program
to be hand translated and have this included in the simulator, though
the interface is awkward. This facility can prove beneficial for
certain loops that defy the flow analysis.
Mimic can save translations across executions of a program to further
reduce execution time on subsequent executions.
Mimic does not support decimal (presumably BCD?) or floating-point
Exceptions, self-modifying code and misaligned loads are not supported.
It is reported that the expansion factor for two large programs is
about 4 -- considerably better than first and second generation
, title= "Proceedings SIGPLAN '87 Symposium on Interpreters and
, booktitle= "Proceedings SIGPLAN '87 Symposium on Interpreters and
, publisher= "ACM"
, organization= "ACM"
, month= jun
, year= 1987
, note= "Also available as SIGPLAN Notices 22(7) July 1987."
Return to the
Search the comp.compilers archives again.