From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0fdx-0005xx-BO for qemu-devel@nongnu.org; Tue, 07 Jan 2014 18:01:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0fds-0006QB-84 for qemu-devel@nongnu.org; Tue, 07 Jan 2014 18:01:05 -0500 Received: from mail-lb0-f172.google.com ([209.85.217.172]:56661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0fds-0006Q5-06 for qemu-devel@nongnu.org; Tue, 07 Jan 2014 18:01:00 -0500 Received: by mail-lb0-f172.google.com with SMTP id x18so772690lbi.3 for ; Tue, 07 Jan 2014 15:00:58 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <52CC8006.9030305@weilnetz.de> References: <1389113488-18005-1-git-send-email-peter.maydell@linaro.org> <52CC8006.9030305@weilnetz.de> From: Peter Maydell Date: Tue, 7 Jan 2014 23:00:38 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 0/4] disas: add libvixl to support A64 disassembly List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Patch Tracking , Alexander Graf , QEMU Developers , Blue Swirl , Claudio Fontana , Aurelien Jarno , Anthony Liguori , =?UTF-8?B?QWxleCBCZW5uw6ll?= , "kvmarm@lists.cs.columbia.edu" , Christoffer Dall , Richard Henderson On 7 January 2014 22:30, Stefan Weil wrote: > here are some first annotations. > > --- > > Git complains because patch 3 adds blank lines at EOF: > > Applying: disas: add libvixl source code for AArch64 A64 disassembler > /home/stefan/src/qemu/qemu.org/a64-vixl/.git/rebase-apply/patch:1382: > new blank line at EOF. > + > /home/stefan/src/qemu/qemu.org/a64-vixl/.git/rebase-apply/patch:11354: > new blank line at EOF. > + > warning: 2 lines add whitespace errors. Doh. I saw those as I applied the patches and then forgot to investigate and fix them. > I'd prefer one file disas/aarch64.cc instead of these two files: > > disas/aarch64-cxx.cc | 80 > +++++++++++++++++++++++++++++++++++++++++++ > disas/aarch64.c | 39 +++++++++++++++++++++ > > This would also allow removing the extern statement in the C++ code (and > use a local function). See the comment in aarch64-cxx.cc -- to do that we'd need to make sure bfd.h was valid for C++ as well as C compilation. This came up when Andreas reviewed the RFC and that was Claudio's explanation for the split, which is why I added the comment. Claudio -- do you recall what the exact issue here is? Specifically, I think the problem is that if we put print_insn_aarch64() in the C++ file then we need to have its prototype in bfd.h guarded with "extern C {}" if (and only if) we're compiling a C++ file. If you care about restricting the C++-isms to the C++ files that's a bit ugly. But we could do that if people prefer. Some experimentation suggests it would also be possible to just do extern "C" { #include "disas/bfd.h" } in the C++ file. If that doesn't have any hidden gotchas I don't know about it looks like the nicest solution. > Spelling bugs: > > disas/libvixl/src/a64/constants-a64.h:/* Add/substract extend > */ > substract ==> subtract I don't really want to mess with the upstream libvixl code too much for preference. Unlike the binutils disassemblers, we still have the option in future for pulling in updated versions. > Compiler warnings (w32, w64): > > CXX disas/aarch64-cxx.o > In file included from > /home/stefan/src/qemu/qemu.org/a64-vixl/disas/libvixl/src/a64/simulator-a64.h:32:0, > from > /home/stefan/src/qemu/qemu.org/a64-vixl/disas/aarch64-cxx.cc:25: > /home/stefan/src/qemu/qemu.org/a64-vixl/disas/libvixl/src/a64/instructions-a64.h:60:36: > warning: left shift coun > t >= width of type [enabled by default] > > (more of that kind for disas/libvixl/src/a64/instructions-a64.o) > > These warnings are caused by Windows sizeof(long) == 4, so 1L has to be > replaced by 1LL or 1ULL to represent a 64 bit value, or use a type cast > like (int64_t)1. Those I think we really do need to fix, though, since they're bugs. > I tested cross compilation for w32 and w64 (see comments below) and > started the w32 executable (wine > bin/debug/i686-w64-mingw32/aarch64-softmmu/qemu-system-aarch64 -L > pc-bios --sdl). Thanks for testing this. thanks -- PMM