qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Illegal instruction reported by qemu-ppc with -cpu 7400


From: Khem Raj
Subject: Illegal instruction reported by qemu-ppc with -cpu 7400
Date: Sat, 12 Mar 2022 18:51:13 -0800

Hi All

I have built an app with musl C library for ppc32 using clang 14.0.0
and I am using -mcpu=7400 to compile the whole thing including musl.
This fails to run on qemu usermode reporting illegal instruction, a
bit of digging revealed that it's caused by opcode in strspn()
function from musl where clang is emitting vxor instruction and that's
where qemu ppc bails out.

Here is asm file generated by clang

https://paste.debian.net/1233982/

gcc ( 11.2 )

https://paste.debian.net/1233983/

As you can see the disassembly for gcc does not have vxor or any other
altivec instructions in it.
When I add -mno-altivec to clang then the issue is gone or when I use
-mcpu=power5 the issue is gone too.

This is preprocessed strspn.i
https://paste.debian.net/1233987/

I wonder if qemu-ppc -mcpu 7400 should have understood vxor instruction or not ?

Thanks
-Khem



reply via email to

[Prev in Thread] Current Thread [Next in Thread]