Merge pull request #244 from Dygore/main

Added tests for full coverage of the FPU result sign module
This commit is contained in:
David Harris 2023-04-14 04:02:29 -07:00 committed by GitHub
commit e8d630d069
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,10 +32,19 @@ main:
csrs mstatus, t0 csrs mstatus, t0
#Pull denormalized FP number from memory and pass it to fclass.S for coverage #Pull denormalized FP number from memory and pass it to fclass.S for coverage
la t0, TestData la t0, TestData1
flw ft0, 0(t0) flw ft0, 0(t0)
fclass.s t1, ft0 fclass.s t1, ft0
#Result Sign Test Coverage
la t0, TestData2
flw ft0, 0(t0)
flw ft1, 4(t0)
fadd.s ft2, ft0, ft1 #Adds coverage for inf as arg for FADD
flw ft2, 4(t0)
fmsub.s ft3, ft0, ft1, ft2 #Adds coverage for fmaAs or Z Sign Bit
# Test legal instructions not covered elsewhere # Test legal instructions not covered elsewhere
flq ft0, 0(a0) flq ft0, 0(a0)
flh ft0, 8(a0) flh ft0, 8(a0)
@ -105,5 +114,8 @@ main:
.section .data .section .data
.align 3 .align 3
TestData: TestData1:
.int 0x00100000 #Denormalized FP number .int 0x00100000 #Denormalized FP number
TestData2:
.word 0x60000001 #Random FP Number (Pos)
.word 0x7f800000 #INF