From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ReGio-00028p-U4 for qemu-devel@nongnu.org; Fri, 23 Dec 2011 20:48:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ReGin-0001MD-Lj for qemu-devel@nongnu.org; Fri, 23 Dec 2011 20:48:26 -0500 Received: from csmailer.cs.nctu.edu.tw ([140.113.235.130]:22878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ReGin-0001Gg-66 for qemu-devel@nongnu.org; Fri, 23 Dec 2011 20:48:25 -0500 Received: from csmailer.cs.nctu.edu.tw (localhost [127.0.0.1]) by csmailer.cs.nctu.edu.tw (Postfix) with ESMTP id 19761A2F for ; Sat, 24 Dec 2011 09:45:47 +0800 (CST) Received: from alumni.cs.nctu.edu.tw (alumni.cs.nctu.edu.tw [140.113.235.116]) by csmailer.cs.nctu.edu.tw (Postfix) with ESMTP id 0F49AA2E for ; Sat, 24 Dec 2011 09:45:47 +0800 (CST) Received: (from chenwj@localhost) by alumni.cs.nctu.edu.tw (8.14.4/8.14.4/Submit) id pBO1mIrd003726 for qemu-devel@nongnu.org; Sat, 24 Dec 2011 09:48:18 +0800 (CST) (envelope-from chenwj) Date: Sat, 24 Dec 2011 09:48:18 +0800 From: =?utf-8?B?6Zmz6Z+L5Lu7?= Message-ID: <20111224014818.GA92397@cs.nctu.edu.tw> References: <20111223120057.GA16026@cs.nctu.edu.tw> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Use Clang to compile Qemu? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Fri, Dec 23, 2011 at 02:07:53PM +0100, David Turner wrote: > Some parts of QEMU (the JIT) require the use of a global register varia= ble > to point to the "env" CPU state variable. >=20 > This feature is not supported by Clang (which is not very surprising gi= ven > that it uses LLVM as its backend, and LLVM explicitely doesn't support = this) >=20 > Until the JIT is modified to not require this anymore, it is very unlik= ely > that Clang will be able to build QEMU. >=20 > There were previous discussions about such a change on this mailing lis= t, > but I believe nobody started working on that change because many feared= it > was a lot of work that would have a negative impact on performance (tho= ugh > I think it was all conjecture, i.e. no one really tried it and got any = real > data). You're right. Here is the discussion, http://lists.gnu.org/archive/html/qemu-devel/2011-05/msg01116.html Since TCI (Tiny Code Interpreter) doesn't need AREG0, I configure QEMU = to use TCI and try it out. Here's my flow. --- # apply patches under /usr/ports/emulators/qemu-devel/files/ first $ ../configure --prefix=3D$INSTALL --target-list=3Di386-bsd-user \ --enable-tcg-interpreter \ --cc=3Dclang $ gmake install --- So far so good (perhaps freebsd guys should upstream those patches?). B= ut I am stuck at the error below, --- $ qemu-i386 -bsd freebsd hello Unable to load interpreter --- Any thoughts? Thanks! :) Regards, chenwj --=20 Wei-Ren Chen (=E9=99=B3=E9=9F=8B=E4=BB=BB) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj