From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74634 invoked by alias); 2 Jul 2015 09:17:45 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 74616 invoked by uid 89); 2 Jul 2015 09:17:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 02 Jul 2015 09:17:43 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-32-TEEuLqZBQe2SYGvUBD3qig-1 Received: from [10.2.206.47] ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 2 Jul 2015 10:17:36 +0100 Message-ID: <559501B1.6090801@arm.com> Date: Thu, 02 Jul 2015 09:17:00 -0000 From: Andre Vieira User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Nick Clifton , vapier@gentoo.org CC: gdb-patches@sourceware.org Subject: Re: RFA: AArch64 sim References: <87vbe8hvfo.fsf@redhat.com> In-Reply-To: <87vbe8hvfo.fsf@redhat.com> X-MC-Unique: TEEuLqZBQe2SYGvUBD3qig-1 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-SW-Source: 2015-07/txt/msg00072.txt.bz2 On 28/06/15 13:24, Nick Clifton wrote: > Hi Mike, > > The attached patch adds an aarch64 simulator to gdb's sim library. It > is based upon the smallaarch64sim project: > > http://sourceforge.net/projects/smallaarch64sim/ > > I converted it to C (from C++) because I prefer coding in C, extended > it so that it could run on non x86 hosts, and added some more > instruction emulations. > > This is still a work in progress as it does not yet emulate all the > aarch64 instructions, nor does it have a testsuite. Plus of course > there are bound to be bugs to be fixed. But with this sim in place I > am able to run the gcc and g++ testsuites for an aarch64-elf toolchain > and see results like this: > > =3D=3D=3D gcc Summary for aarch64-sim =3D=3D=3D > > # of expected passes 89895 > # of unexpected failures 3462 > # of expected failures 243 > # of unresolved testcases 3 > # of unsupported tests 1903 > > =3D=3D=3D gcc Summary for aarch64-sim/-mabi=3Dilp32 =3D=3D=3D > > # of expected passes 90026 > # of unexpected failures 3276 > # of expected failures 242 > # of unresolved testcases 4 > # of unsupported tests 1936 > > =3D=3D=3D g++ Summary for aarch64-sim =3D=3D=3D > > # of expected passes 78136 > # of unexpected failures 1318 > # of expected failures 261 > # of unsupported tests 3903 > > =3D=3D=3D g++ Summary for aarch64-sim/-mabi=3Dilp32 =3D=3D=3D > > # of expected passes 78608 > # of unexpected failures 960 > # of unexpected successes 4 > # of expected failures 257 > # of unsupported tests 3895 > > So an approximate 96% pass rate for gcc and a 98% pass rate for G++. > Not too bad for a first attempt. > > Is this patch OK to apply ? > > Cheers > Nick > > sim/ChangeLog > 2015-06-28 Nick Clifton > > * configure.tgt (sim_arch): Add aarch64 target. > * configure: Regenerate. > * aarch64: New directory. > * aarch64/aclocal.m4: Generate. > * aarch64/config.in: Generate. > * aarch64/configure: Generate. > * aarch64/configure.ac: New file. > * aarch64/cpustate.c: New file. Models the AArch64 registers. > * aarch64/cpustate.h: New file. > * aarch64/decode.h: Prototypes and types for the decoder > functions. > * aarch64/gdb-if.c: New file. Interface with GDB. > * aarch64/main.c: New file. Stand alone front end for the > simulator. > * aarch64/Makefile.in: New file. > * aarch64/memory.c: New file. Models the AArch64 memory subsystem. > * aarch64/memory.h: New file. > * aarch64/simulator.c: New file. Emulated AArch64 instructions. > * aarch64/simulator.h: New file. > > include/gdb/ChangeLog > 2015-06-28 Nick Clifton > > * sim-aarch64.h: New file. > Hi Nick, I realize EXTRA_SIM_CFLAGS with "-lm" is in there to deal with the use=20 of math lib. Though I think EXTRA_SIM_CFLAGS is being expanded too early=20 in the compile command, i.e. before libsim.a is passed on. Shouldn't it=20 be put after libsim.a? As it could potentially cause a linker failure. Kind Regards, Andre Vieira