<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
We are a research project in joint french-chinese laboratory. We are
considering using<br>
LLVM in our project but we'd like to have some additional info before
we dive in. <br>
Since we are new kids on the block, please bear with us...<br>
<br>
We are interested in using LLVM for emulation of real hardware. What we
have as<br>
input is the binary code of the program to run. Today we emulate each
instruction <br>
behavior sequentially, which has pros and cons. We want to build a
faster simulator,<br>
and an idea is to decompile the binary code into an LLVM
representation, then compile<br>
it to the simulation host and run it. Hopefully it would be faster
because perhaps we<br>
may use one LLVM instruction for several machine instructions, and we
can benefit <br>
from the real host stack and the real registers instead of a simulated
stack<br>
and simulated registers.<br>
<br>
So we have several questions:<br>
<br>
1. Do you have an opinion on the feasibility of the project ? <br>
Do you know if it has been done before.<br>
<br>
2. There is an in-memory representation for LLVM. Where shall we look
in the<br>
documentation about it to understand how to generate it properly ?<br>
<br>
3 We want to generate directly the in-memory IR and dynamicall call the
LLVM code<br>
generator on a chunk of code that has been decompiled, not a
complete program.<br>
<i> </i>Is this possible ? Is it worthwile in terms of
performance ?<br>
<br>
<br>
Sincerely,<br>
-- Vania<br>
<div class="moz-signature"><br>
<meta content="text/html;" http-equiv="Content-Type">
<title></title>
<font face="Helvetica, Arial, sans-serif">================================================
<br>
Vania JOLOBOFF<br>
LIAMA Sino French Laboratory
<br>
95 Zhongguancun East Road
<br>
Beijing 100080, China
<br>
Tel +86 10 8261 4528 <a class="moz-txt-link-freetext" href="http://liama.ia.ac.cn/">http://liama.ia.ac.cn/</a><br>
<a class="moz-txt-link-abbreviated" href="mailto:vania@liama.ia.ac.cn">vania@liama.ia.ac.cn</a> or <a class="moz-txt-link-abbreviated" href="mailto:vania.joloboff@inria.fr">vania.joloboff@inria.fr</a><br>
</font>
<br>
</div>
</body>
</html>