On Tue, Apr 28, 2015 at 10:47:42PM +0000, Matthew Fortune wrote:
> For non-performance testing I am keen to make as much use of qemu as
> possible in test environments. That includes all of bare metal testing
> using qemu system emulator, Linux tools via the user-mode emulator. I
> haven't ever looked at the performance of building GCC inside a QEMU
> emulated full system emulator with Linux but I suspect it may be
> prohibitively slow.

Last I tried, QEMU was reasonably good at emulating ARM opcodes, but it
was also gleefully accepting unaligned accesses that would have trapped
on the genuine hardware. Thus, QEMU is not good for testing unaligned
accesses.


>From the 486SX onwards, x86 CPU have an "alignment check" flag in the
flags register (bit 18). If set, then unaligned accesses trigger CPU
exceptions (converted by the Linux kernel into SIGBUS). I don't know
what would happen if that flag was enabled within a QEMU instance
emulating an ARM CPU on an x86 system, but it is at least conceivable
that it _could_ turn it into a functioning ARM emulation that traps on
unaligned accesses. This is worth a try.


        --Thomas Pornin

_______________________________________________
Gcc-cfarm-users mailing list
Gcc-cfarm-users@gna.org
https://mail.gna.org/listinfo/gcc-cfarm-users

Reply via email to