[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: illegal hardware instruction during MIPS-I ELF linux useremulation
From: |
Peter Maydell |
Subject: |
Re: illegal hardware instruction during MIPS-I ELF linux useremulation |
Date: |
Mon, 23 Sep 2019 17:41:47 +0100 |
On Mon, 23 Sep 2019 at 17:26, Libo Zhou <address@hidden> wrote:
>
> Hi Philippe, Peter,
>
> In target/mips/translate_init.inc.c you can actually see that CPU_MIPS32
> ultimately contains ISA_MIPS1. It's just no CPU model explicitly uses
> ISA_MIPS. But I agree that if my assembly has a removed instruction then it's
> possible to have an invalid machine code in my program.
>
> As for the cross-compiler, I used a tool chain containing a compiler, an
> assembler, and a linker. I produced the final ELF like this:
>
> $ mipsel-linux-unknown-gcc -g -S test.c -o test.s
> $ mipsel-linux-unknown-as -g test.s -o test.o
> $ mipsel-linux-unknown-ld test.o -o test
Can you run QEMU with some debugging options:
qemu-mipsel -d in_asm,exec,cpu,unimp,guest_errors,nochain -D debug.log
-singlestep test
and then put the resulting debug.log somewhere we can get it?
(it'll probably be quite large)
thanks
-- PMM