This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Modification of RVV CSR test file
Needs ReviewPublic

Authored by nannan1025 on Dec 28 2021, 6:27 PM.

Details

Summary

The RVV CSR test file can be tested successfully without the mattr attribute

Diff Detail

Unit TestsFailed

Event Timeline

nannan1025 created this revision.Dec 28 2021, 6:27 PM
nannan1025 requested review of this revision.Dec 28 2021, 6:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 28 2021, 6:27 PM
craig.topper retitled this revision from Modification of RVV CSR test file to [RISCV] Modification of RVV CSR test file.Dec 28 2021, 6:44 PM

Whether Vector CSRs should be allowed to be accessed when V extensions are not enabled?

I mean, is there a wrong implementation or a wrong test case?

craig.topper added a subscriber: craig.topper.EditedDec 28 2021, 8:41 PM

Whether Vector CSRs should be allowed to be accessed when V extensions are not enabled?

I mean, is there a wrong implementation or a wrong test case?

I found this patch where the F extension check was removed from fcsr, fflags, and frm based on binutils not checking. https://reviews.llvm.org/D58932 But it looks like binutils may have implemented checking after that patch https://sourceware.org/legacy-ml/binutils/2019-12/msg00222.html

Nelson1225 added a comment.EditedDec 28 2021, 8:47 PM

But it looks like binutils may have implemented checking after that patch https://sourceware.org/legacy-ml/binutils/2019-12/msg00222.html

Yes, if you enable GNU assembler -mcsr-check option, then you probably will see some CSR warnings for checking the march, rv32-only and read-only. But I forgot why we chosen to report warnings rather than errors...

VincentWu added a comment.EditedDec 29 2021, 10:42 PM

Whether Vector CSRs should be allowed to be accessed when V extensions are not enabled?

I mean, is there a wrong implementation or a wrong test case?

I found this patch where the F extension check was removed from fcsr, fflags, and frm based on binutils not checking. https://reviews.llvm.org/D58932 But it looks like binutils may have implemented checking after that patch https://sourceware.org/legacy-ml/binutils/2019-12/msg00222.html

I think we should make Vector ext same as F extensions.
make CSRs can be accessed without V ext.

So I think this patch is make sense now.