https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116504
Jeffrey A. Law <law at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|UNCONFIRMED |RESOLVED
Blocks|120763 |
--- Comment #9 from Jeffrey A. Law <law at gcc dot gnu.org> ---
I should have caught this earlier.
When you specify -mcpu=sifive-x280 you're picking up the vector length for that
design, specifically 512 bits. The code is not guaranteed to run on designs
with a smaller vlen.
QEMU defaults to a vector length of 128bits. So the code misbehaves.
Similarly the BPI is a 256 bit unit, so it misbehaves there too.
If you tell QEMU to use a 512 bit vector the test passes fine:
jlaw@x11-dpi:~/test/obj/rv/gcc/gcc$ ./a.out
Aborted
jlaw@x11-dpi:~/test/obj/rv/gcc/gcc$ QEMU_CPU=rv64,v=true,vlen=512 ./a.out
jlaw@x11-dpi:~/test/obj/rv/gcc/gcc$
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120763
[Bug 120763] [meta-bug] Tracker for bugs to visit during weekly RISC-V meeting