Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump QEMU to v8.1.0 #1334

Merged
merged 2 commits into from
Sep 26, 2023

Conversation

patrick-rivos
Copy link
Collaborator

@patrick-rivos patrick-rivos commented Sep 22, 2023

QEMU v7.1.0 has an issue with some vector instructions. This manifests in the (trunk) GCC testsuite with failures like this:

qemu-riscv64: ../../qemu/target/riscv/translate.c:211: decode_save_opc: Assertion `ctx->insn_start != NULL' failed.
/scratch/tc-testing/colab-trunk/build-rv64gcv/../scripts/wrapper/qemu/riscv64-unknown-linux-gnu-run: line 15: 267862 Segmentation fault      (core dumped) QEMU_CPU="$(march-to-cpu-opt --get-riscv-tag $1)" qemu-riscv$xlen -r 5.10 "${qemu_args[@]}" -L ${RISC_V_SYSROOT} "$@"
FAIL: gcc.target/riscv/rvv/autovec/gather-scatter/scatter_store_run-3.c execution test

Bumping to v8.1.0 resolves these failures.

Copy link
Collaborator

@kito-cheng kito-cheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yeah, IIRC I hit that some where before and then I bump my local qemu to latest, but seems like I never create PR to bump that. also this gcc fix are necessary for bare-metal testing, but anyway I am fine to bump that first.

Anyway, LGTM :P

@patrick-rivos
Copy link
Collaborator Author

Looks like this causes a few newlib failures - I'll look into why

/home/runner/work/riscv-gnu-toolchain/riscv-gnu-toolchain/scripts/testsuite-filter gcc newlib /home/runner/work/riscv-gnu-toolchain/riscv-gnu-toolchain/test/allowlist `find build-gcc-newlib-stage2/gcc/testsuite/ -name *.sum |paste -sd "," -`
		=== gcc: Unexpected fails for rv32gc ilp32d medlow ===
FAIL: gcc.c-torture/execute/20000822-1.c   -O0  execution test
FAIL: gcc.c-torture/execute/20000822-1.c   -O1  execution test
FAIL: gcc.c-torture/execute/20000822-1.c   -O2  execution test
FAIL: gcc.c-torture/execute/20000822-1.c   -O2 -flto -fno-use-linker-plugin -flto-partition=none  execution test
FAIL: gcc.c-torture/execute/20000822-1.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  execution test
FAIL: gcc.c-torture/execute/20000822-1.c   -O3 -g  execution test
FAIL: gcc.c-torture/execute/20000822-1.c   -Os  execution test
FAIL: gcc.c-torture/execute/921215-1.c   -O0  execution test
FAIL: gcc.c-torture/execute/931002-1.c   -O0  execution test
FAIL: gcc.c-torture/execute/nestfunc-1.c   -O0  execution test
FAIL: gcc.c-torture/execute/nestfunc-2.c   -O0  execution test
FAIL: gcc.c-torture/execute/nestfunc-3.c   -O0  execution test
FAIL: gcc.c-torture/execute/nestfunc-3.c   -O1  execution test
FAIL: gcc.c-torture/execute/nestfunc-3.c   -O2  execution test
FAIL: gcc.c-torture/execute/nestfunc-3.c   -O2 -flto -fno-use-linker-plugin -flto-partition=none  execution test
FAIL: gcc.c-torture/execute/nestfunc-3.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  execution test
FAIL: gcc.c-torture/execute/nestfunc-3.c   -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
FAIL: gcc.c-torture/execute/nestfunc-3.c   -O3 -g  execution test
FAIL: gcc.c-torture/execute/nestfunc-3.c   -Os  execution test
FAIL: gcc.c-torture/execute/nestfunc-5.c   -O0  execution test
FAIL: gcc.c-torture/execute/nestfunc-5.c   -O1  execution test
FAIL: gcc.c-torture/execute/nestfunc-5.c   -O2  execution test
FAIL: gcc.c-torture/execute/nestfunc-5.c   -O2 -flto -fno-use-linker-plugin -flto-partition=none  execution test
FAIL: gcc.c-torture/execute/nestfunc-5.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  execution test
FAIL: gcc.c-torture/execute/nestfunc-5.c   -O3 -g  execution test
FAIL: gcc.c-torture/execute/nestfunc-5.c   -Os  execution test
FAIL: gcc.c-torture/execute/nestfunc-6.c   -O0  execution test
FAIL: gcc.c-torture/execute/nestfunc-6.c   -O1  execution test
FAIL: gcc.c-torture/execute/nestfunc-6.c   -O2  execution test
FAIL: gcc.c-torture/execute/nestfunc-6.c   -O2 -flto -fno-use-linker-plugin -flto-partition=none  execution test
FAIL: gcc.c-torture/execute/nestfunc-6.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  execution test
FAIL: gcc.c-torture/execute/nestfunc-6.c   -O3 -g  execution test
FAIL: gcc.c-torture/execute/nestfunc-6.c   -Os  execution test
FAIL: gcc.dg/trampoline-1.c execution test
FAIL: gcc.dg/torture/pr86389.c   -O0  execution test
FAIL: gcc.dg/torture/pr86389.c   -O1  execution test
FAIL: gcc.dg/torture/pr86389.c   -O2  execution test
FAIL: gcc.dg/torture/pr86389.c   -O2 -flto -fno-use-linker-plugin -flto-partition=none  execution test
FAIL: gcc.dg/torture/pr86389.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr86389.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr86389.c   -Os  execution test
FAIL: gcc.dg/torture/stackalign/nested-5.c   -O0  execution test
FAIL: gcc.dg/torture/stackalign/nested-5.c   -O0 -fpic execution test
FAIL: gcc.dg/torture/stackalign/nested-5.c   -O1  execution test
FAIL: gcc.dg/torture/stackalign/nested-5.c   -O1 -fpic execution test
FAIL: gcc.dg/torture/stackalign/nested-5.c   -O2  execution test
FAIL: gcc.dg/torture/stackalign/nested-5.c   -O2 -flto -fno-use-linker-plugin -flto-partition=none  execution test
FAIL: gcc.dg/torture/stackalign/nested-5.c   -O2 -flto -fno-use-linker-plugin -flto-partition=none -fpic execution test
FAIL: gcc.dg/torture/stackalign/nested-5.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/stackalign/nested-5.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects -fpic execution test
FAIL: gcc.dg/torture/stackalign/nested-5.c   -O2 -fpic execution test
FAIL: gcc.dg/torture/stackalign/nested-5.c   -O3 -g  execution test
FAIL: gcc.dg/torture/stackalign/nested-5.c   -O3 -g -fpic execution test
FAIL: gcc.dg/torture/stackalign/nested-5.c   -Os  execution test
FAIL: gcc.dg/torture/stackalign/nested-5.c   -Os -fpic execution test
FAIL: gcc.dg/torture/stackalign/nested-6.c   -O0  execution test
FAIL: gcc.dg/torture/stackalign/nested-6.c   -O0 -fpic execution test
FAIL: gcc.dg/torture/stackalign/nested-6.c   -O1  execution test
FAIL: gcc.dg/torture/stackalign/nested-6.c   -O1 -fpic execution test
FAIL: gcc.dg/torture/stackalign/nested-6.c   -O2  execution test
FAIL: gcc.dg/torture/stackalign/nested-6.c   -O2 -flto -fno-use-linker-plugin -flto-partition=none  execution test
FAIL: gcc.dg/torture/stackalign/nested-6.c   -O2 -flto -fno-use-linker-plugin -flto-partition=none -fpic execution test
FAIL: gcc.dg/torture/stackalign/nested-6.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/stackalign/nested-6.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects -fpic execution test
FAIL: gcc.dg/torture/stackalign/nested-6.c   -O2 -fpic execution test
FAIL: gcc.dg/torture/stackalign/nested-6.c   -O3 -g  execution test
FAIL: gcc.dg/torture/stackalign/nested-6.c   -O3 -g -fpic execution test
FAIL: gcc.dg/torture/stackalign/nested-6.c   -Os  execution test
FAIL: gcc.dg/torture/stackalign/nested-6.c   -Os -fpic execution test
FAIL: gcc.dg/tree-ssa/tailcall-7-run.c execution test

               ========= Summary of gcc testsuite =========
                            | # of unexpected case / # of unique unexpected case
                            |          gcc |          g++ |     gfortran |
     rv32gc/ ilp32d/ medlow |   70 /    13 |    0 /     0 |      - |
make: *** [Makefile:1055: report-gcc-newlib] Error 1

@kito-cheng
Copy link
Collaborator

I guess those fails will gone after you apply the fix that I mention before to GCC will drop all fails, if so I am OK to put those fails to allowlist for now.

@patrick-rivos
Copy link
Collaborator Author

patrick-rivos commented Sep 25, 2023

After cherry-picking that the GCC fix, all those listed failures are resolved. I've added the failures to the allowlist with a link to the fixing commit.

Weirdly enough we get a new failure with the cherry-picked commit, but it's fixed on trunk so I'm not going to worry about it :)

                === gcc: Unexpected fails for rv64gc lp64d medlow ===
FAIL: gcc.target/riscv/pr93304.c   -O2 -flto -fno-use-linker-plugin -flto-partition=none   scan-assembler-not t2
FAIL: gcc.target/riscv/pr93304.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects   scan-assembler-not t2

               ========= Summary of gcc testsuite =========
                            | # of unexpected case / # of unique unexpected case
                            |          gcc |          g++ |     gfortran |
     rv64gc/  lp64d/ medlow |    2 /     1 |    0 /     0 |      - |
make: *** [Makefile:1055: report-gcc-newlib] Error 1

@kito-cheng
Copy link
Collaborator

Feel free to merge once you think OK :)

@patrick-rivos patrick-rivos merged commit 5afde2d into riscv-collab:master Sep 26, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants