This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: AArch64 sim
- From: Andre Vieira <Andre dot SimoesDiasVieira at arm dot com>
- To: Nick Clifton <nickc at redhat dot com>, vapier at gentoo dot org
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 02 Jul 2015 10:17:37 +0100
- Subject: Re: RFA: AArch64 sim
- Authentication-results: sourceware.org; auth=none
- References: <87vbe8hvfo dot fsf at redhat dot com>
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:
=== gcc Summary for aarch64-sim ===
# of expected passes 89895
# of unexpected failures 3462
# of expected failures 243
# of unresolved testcases 3
# of unsupported tests 1903
=== gcc Summary for aarch64-sim/-mabi=ilp32 ===
# of expected passes 90026
# of unexpected failures 3276
# of expected failures 242
# of unresolved testcases 4
# of unsupported tests 1936
=== g++ Summary for aarch64-sim ===
# of expected passes 78136
# of unexpected failures 1318
# of expected failures 261
# of unsupported tests 3903
=== g++ Summary for aarch64-sim/-mabi=ilp32 ===
# 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 <nickc@redhat.com>
* 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 <nickc@redhat.com>
* sim-aarch64.h: New file.
Hi Nick,
I realize EXTRA_SIM_CFLAGS with "-lm" is in there to deal with the use
of math lib. Though I think EXTRA_SIM_CFLAGS is being expanded too early
in the compile command, i.e. before libsim.a is passed on. Shouldn't it
be put after libsim.a? As it could potentially cause a linker failure.
Kind Regards,
Andre Vieira