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

Added Zfinx and Zfh tests #367

Merged
merged 6 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# CHANGELOG
## [3.8.11] - 2024-03-26
- Added test suites for Zfh extensions.
- Introduced half word and half width in Nan boxing functionality to accomdate Zfh extensions.
- Added test suites for Zfinx extensions.

## [3.6.8] - 2023-06-22
- Fix broken hyperlink in README
Expand Down
21 changes: 20 additions & 1 deletion riscv-test-suite/env/arch_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,31 @@
#define FLREG fld
#define FSREG fsd
#define FREGWIDTH 8
#elif FLEN==16
#define FLREG flh
#define FSREG fsh
#define FREGWIDTH 2
#else
#define FLREG flq
#define FSREG fsq
#define FREGWIDTH 16
#endif

#if ZFINX==1
#define FLREG ld
#define FSREG sd
#define FREGWIDTH 8
#define FLEN 64
#if XLEN==64
#define SIGALIGN 8
#else
#define SIGALIGN 4
#endif
#elif ZDINX==1
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks wrong; ZFinx only needs 4B registers, NOT 8B registers. And, if both Zfinx and Zdinx exist, then you need to accommodate both sizes, don't you? And, they're different on RV64 vs. RV32. So Zdinx would need to execute 2 separate LW ops on an RV32 compared to a single LD that RV64 to replace a FLD.

#define FLREG LREG
#define FSREG SREG
#define FREGWIDTH 8
#define FLEN 64
#endif

#if SIGALIGN==8
#define CANARY \
Expand Down
15 changes: 13 additions & 2 deletions riscv-test-suite/env/test_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,29 @@


#define NAN_BOXED(__val__,__width__,__max__) ;\
.if __width__ == 16 ;\
.hword __val__ ;\
.endif ;\
.if __width__ == 32 ;\
.word __val__ ;\
.else ;\
.dword __val__ ;\
.endif ;\
.if __max__ > __width__ ;\
.set pref_bytes,(__max__-__width__)/32 ;\
.if __width__ == 16 ;\
.set pref_bytes,(__max__-__width__)/16;\
.else ;\
.set pref_bytes,(__max__-__width__)/32;\
.endif ;\
.else ;\
.set pref_bytes, 0 ;\
.endif ;\
.rept pref_bytes ;\
.word 0xffffffff ;\
.if __width__ == 16 ;\
.hword 0xffff ;\
.else ;\
.word 0xffffffff ;\
.endif ;\
.endr ;

#define ZERO_EXTEND(__val__,__width__,__max__) ;\
Expand Down
5,311 changes: 5,311 additions & 0 deletions riscv-test-suite/rv32i_m/Zfh/src/fadd_b1-01.S

Large diffs are not rendered by default.

Loading
Loading