<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 17, 2016 at 4:59 AM, Christian Reitwiessner via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi!<br>
<br>
I'm working on a project that aims to do very cheap verification of<br>
generic computations on blockchains (specifically Ethereum).<br>
For that, I would like to compile complex code (think of hash functions<br>
or key derivation functions) into a very simplistic architecture for<br>
which it is trivial to write an interpreter.<br>
An architecture like TinyRAM [1] would be ideal, i.e. it has the usual<br>
arithmetic and logical operations on registers, conditional jumps and<br>
memory read- and write access only via specific instructions (although<br>
this is not too important).<br>
Is there an llvm backend that comes close to that? If not, how hard is<br>
it to implement such a backend?<br>
Oh and by the way, brainfuck might also be a suitable architecture :-)<br>
<br>
Thanks,<br>
Christian.<br></blockquote><div><br></div><div>Good timing, Christian!</div><div><br></div><div>We're now in the process of upstreaming a very simple backend for a processor with similar characteristics (integer registers, register-memory operations) and enough power to run C++. Here's the email with links to patches: <a href="http://lists.llvm.org/pipermail/llvm-dev/2016-February/095118.html">http://lists.llvm.org/pipermail/llvm-dev/2016-February/095118.html</a></div><div><br></div><div>The backend is now being reviewed - its ISA is described in comments in the Tablegen file contained in the backend patch</div><div>Feel free to take a look and leave comments</div><div>Eli</div><div><br></div><div><br></div><div> </div></div></div></div>