Hi Phil,

While trying microblazeel-linux-user on the master branch I hit this:

$ qemu-microblazeel ctest
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault (core dumped)

Bisect found this commit:
415aae543edad19eda8f66955dde386c7fd7c680 is the first bad commit
commit 415aae543edad19eda8f66955dde386c7fd7c680
Author: Philippe Mathieu-Daudé <phi...@linaro.org>
Date:   Tue Sep 24 23:45:54 2024 +0200

    target/microblaze: Consider endianness while translating code
    
    Consider the CPU ENDI bit, swap instructions when the CPU
    endianness doesn't match the binary one.
    
    Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
    Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
    Message-Id: <20241105130431.22564-17-phi...@linaro.org>

 target/microblaze/cpu.h       | 7 +++++++
 target/microblaze/translate.c | 5 +++--
 2 files changed, 10 insertions(+), 2 deletions(-)
bisect found first bad commit


It looks like we're getting the endianness wrong in this case.

This works:
qemu-microblazeel -cpu microblaze,little-endian=on ctest

Was this intended while moving towards single binary?

If yes, I wonder if we also should change the default to little-endian.
Big-endian MB is discontinued from newer Microblaze versions.
I'd rather have to type -cpu microblaze,little-endian=off for big-endian.

Cheers,
Edgar

Reply via email to