From 268a0116d33d18d66b250a14e8e5ecf39346e418 Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Sun, 22 Sep 2024 22:31:23 -0700 Subject: [PATCH] Test sew16 (zvfh) fp tests --- Makefile | 4 +- configs/vfadd.vf.toml | 14 + configs/vfadd.vv.toml | 14 + configs/vfcvt.f.x.v.toml | 5 + configs/vfcvt.f.xu.v.toml | 5 + configs/vfcvt.rtz.x.f.v.toml | 15 + configs/vfcvt.rtz.xu.f.v.toml | 15 + configs/vfcvt.x.f.v.toml | 14 + configs/vfcvt.xu.f.v.toml | 15 + configs/vfdiv.vf.toml | 14 + configs/vfdiv.vv.toml | 14 + configs/vfmacc.vf.toml | 14 + configs/vfmacc.vv.toml | 14 + configs/vfmadd.vf.toml | 14 + configs/vfmadd.vv.toml | 14 + configs/vfmax.vf.toml | 14 + configs/vfmax.vv.toml | 14 + configs/vfmerge.vfm.toml | 14 + configs/vfmin.vf.toml | 14 + configs/vfmin.vv.toml | 14 + configs/vfmsac.vf.toml | 14 + configs/vfmsac.vv.toml | 14 + configs/vfmsub.vf.toml | 14 + configs/vfmsub.vv.toml | 14 + configs/vfmul.vf.toml | 14 + configs/vfmul.vv.toml | 14 + configs/vfmv.f.s.toml | 1 + configs/vfmv.s.f.toml | 1 + configs/vfmv.v.f.toml | 1 + configs/vfncvt.f.f.w.toml | 5 + configs/vfncvt.f.x.w.toml | 5 + configs/vfncvt.f.xu.w.toml | 5 + configs/vfncvt.rod.f.f.w.toml | 5 + configs/vfncvt.rtz.x.f.w.toml | 14 + configs/vfncvt.rtz.xu.f.w.toml | 14 + configs/vfncvt.xu.f.w.toml | 15 + configs/vfnmacc.vf.toml | 14 + configs/vfnmacc.vv.toml | 14 + configs/vfnmadd.vf.toml | 14 + configs/vfnmadd.vv.toml | 14 + configs/vfnmsac.vf.toml | 14 + configs/vfnmsac.vv.toml | 14 + configs/vfnmsub.vf.toml | 14 + configs/vfnmsub.vv.toml | 14 + configs/vfrdiv.vf.toml | 14 + configs/vfredmax.vs.toml | 14 + configs/vfredmin.vs.toml | 14 + configs/vfredosum.vs.toml | 14 + configs/vfredusum.vs.toml | 11 + configs/vfrsub.vf.toml | 14 + configs/vfsgnj.vf.toml | 12 + configs/vfsgnj.vv.toml | 12 + configs/vfsgnjn.vf.toml | 12 + configs/vfsgnjn.vv.toml | 12 + configs/vfsgnjx.vf.toml | 12 + configs/vfsgnjx.vv.toml | 12 + configs/vfslide1down.vf.toml | 14 + configs/vfslide1up.vf.toml | 14 + configs/vfsub.vf.toml | 14 + configs/vfsub.vv.toml | 14 + configs/vfwadd.vf.toml | 14 + configs/vfwadd.vv.toml | 14 + configs/vfwadd.wf.toml | 14 + configs/vfwadd.wv.toml | 14 + configs/vfwcvt.f.f.v.toml | 5 + configs/vfwcvt.f.x.v.toml | 5 + configs/vfwcvt.f.xu.v.toml | 5 + configs/vfwcvt.rtz.x.f.v.toml | 15 + configs/vfwcvt.rtz.xu.f.v.toml | 15 + configs/vfwcvt.x.f.v.toml | 14 + configs/vfwcvt.xu.f.v.toml | 14 + configs/vfwmacc.vf.toml | 14 + configs/vfwmacc.vv.toml | 14 + configs/vfwmsac.vf.toml | 14 + configs/vfwmsac.vv.toml | 14 + configs/vfwmul.vf.toml | 14 + configs/vfwmul.vv.toml | 14 + configs/vfwnmacc.vf.toml | 14 + configs/vfwnmacc.vv.toml | 14 + configs/vfwnmsac.vf.toml | 14 + configs/vfwnmsac.vv.toml | 14 + configs/vfwredosum.vs.toml | 14 + configs/vfwredusum.vs.toml | 11 + configs/vfwsub.vf.toml | 14 + configs/vfwsub.vv.toml | 14 + configs/vfwsub.wf.toml | 14 + configs/vfwsub.wv.toml | 14 + configs/vmfeq.vf.toml | 14 + configs/vmfeq.vv.toml | 14 + configs/vmfge.vf.toml | 14 + configs/vmfgt.vf.toml | 14 + configs/vmfle.vf.toml | 14 + configs/vmfle.vv.toml | 14 + configs/vmflt.vf.toml | 14 + configs/vmflt.vv.toml | 14 + configs/vmfne.vf.toml | 14 + configs/vmfne.vv.toml | 14 + generator/insn.go | 12 +- generator/insn_g.go | 12 +- generator/insn_util.go | 2 +- generator/tests.go | 51 +++ go.mod | 1 + go.sum | 2 + main.go | 3 + testfloat3/genCases.h | 9 + testfloat3/genCases_f16.c | 583 +++++++++++++++++++++++++++++++++ testfloat3/testfloat3.c | 21 ++ testfloat3/testfloat3.go | 29 ++ testfloat3/testfloat3.h | 9 + 109 files changed, 1944 insertions(+), 6 deletions(-) create mode 100644 testfloat3/genCases_f16.c diff --git a/Makefile b/Makefile index f2cb136..514f83d 100644 --- a/Makefile +++ b/Makefile @@ -60,9 +60,9 @@ MABI = lp64d ifeq ($(XLEN), 32) MABI = ilp32f -VARCH = zvl${VLEN}b_zve32f +VARCH = zvl${VLEN}b_zve32f_zfh_zvfh else -VARCH = zvl${VLEN}b_zve64d +VARCH = zvl${VLEN}b_zve64d_zfh_zvfh endif RISCV_PREFIX = riscv64-unknown-elf- diff --git a/configs/vfadd.vf.toml b/configs/vfadd.vf.toml index 61316b5..1215de7 100644 --- a/configs/vfadd.vf.toml +++ b/configs/vfadd.vf.toml @@ -2,6 +2,20 @@ name = "vfadd.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfadd.vv.toml b/configs/vfadd.vv.toml index e5a74f4..fe31a62 100644 --- a/configs/vfadd.vv.toml +++ b/configs/vfadd.vv.toml @@ -3,6 +3,20 @@ format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfcvt.f.x.v.toml b/configs/vfcvt.f.x.v.toml index 31ff18d..cdf07be 100644 --- a/configs/vfcvt.f.x.v.toml +++ b/configs/vfcvt.f.x.v.toml @@ -2,6 +2,11 @@ name = "vfcvt.f.x.v" format = "vd,vs2,vm" [tests] +sew16 = [ + [0xffff], + [0xfffe], + [0x2], +] sew32 = [ [0xffffffff], [0xfffffffe], diff --git a/configs/vfcvt.f.xu.v.toml b/configs/vfcvt.f.xu.v.toml index 7a83c61..c9fb59b 100644 --- a/configs/vfcvt.f.xu.v.toml +++ b/configs/vfcvt.f.xu.v.toml @@ -2,6 +2,11 @@ name = "vfcvt.f.xu.v" format = "vd,vs2,vm" [tests] +sew16 = [ + [0xffff], + [0xfffe], + [0x2], +] sew32 = [ [0xffffffff], [0xfffffffe], diff --git a/configs/vfcvt.rtz.x.f.v.toml b/configs/vfcvt.rtz.x.f.v.toml index d1e899f..6677af5 100644 --- a/configs/vfcvt.rtz.x.f.v.toml +++ b/configs/vfcvt.rtz.x.f.v.toml @@ -2,6 +2,21 @@ name = "vfcvt.rtz.x.f.v" format = "vd,vs2,vm" [tests] +sew16 = [ + [0x7e00], # Quiet NaN + [0x7e01], # Quiet NaN "1" + [0x7e02], # Quiet NaN "2" + [0x7d00], # Signaling NaN + [0x7c00], # Inf + [0xfc00], # -Inf + [0x0000], # 0 + [0x8000], # -0 + [0xc248], # -3.14159 + [0x4248], # 3.14159 + [0x0001], # Subnormal + [0x03ff], # Subnormal +] + sew32 = [ [0x7fc00000], # Quiet NaN [0x7fc00001], # Quiet NaN "1" diff --git a/configs/vfcvt.rtz.xu.f.v.toml b/configs/vfcvt.rtz.xu.f.v.toml index 75d7bbe..ae11262 100644 --- a/configs/vfcvt.rtz.xu.f.v.toml +++ b/configs/vfcvt.rtz.xu.f.v.toml @@ -2,6 +2,21 @@ name = "vfcvt.rtz.xu.f.v" format = "vd,vs2,vm" [tests] +sew16 = [ + [0x7e00], # Quiet NaN + [0x7e01], # Quiet NaN "1" + [0x7e02], # Quiet NaN "2" + [0x7d00], # Signaling NaN + [0x7c00], # Inf + [0xfc00], # -Inf + [0x0000], # 0 + [0x8000], # -0 + [0xc248], # -3.14159 + [0x4248], # 3.14159 + [0x0001], # Subnormal + [0x03ff], # Subnormal +] + sew32 = [ [0x7fc00000], # Quiet NaN [0x7fc00001], # Quiet NaN "1" diff --git a/configs/vfcvt.x.f.v.toml b/configs/vfcvt.x.f.v.toml index 56eecfb..172fd5d 100644 --- a/configs/vfcvt.x.f.v.toml +++ b/configs/vfcvt.x.f.v.toml @@ -2,6 +2,20 @@ name = "vfcvt.x.f.v" format = "vd,vs2,vm" [tests] +sew16 = [ + [0x7e00], # Quiet NaN + [0x7e01], # Quiet NaN "1" + [0x7e02], # Quiet NaN "2" + [0x7d00], # Signaling NaN + [0x7c00], # Inf + [0xfc00], # -Inf + [0x0000], # 0 + [0x8000], # -0 + [0xc248], # -3.14159 + [0x4248], # 3.14159 + [0x0001], # Subnormal + [0x03ff], # Subnormal +] sew32 = [ [0x7fc00000], # Quiet NaN [0x7fc00001], # Quiet NaN "1" diff --git a/configs/vfcvt.xu.f.v.toml b/configs/vfcvt.xu.f.v.toml index 06ab9eb..7534a19 100644 --- a/configs/vfcvt.xu.f.v.toml +++ b/configs/vfcvt.xu.f.v.toml @@ -2,6 +2,21 @@ name = "vfcvt.xu.f.v" format = "vd,vs2,vm" [tests] +sew16 = [ + [0x7e00], # Quiet NaN + [0x7e01], # Quiet NaN "1" + [0x7e02], # Quiet NaN "2" + [0x7d00], # Signaling NaN + [0x7c00], # Inf + [0xfc00], # -Inf + [0x0000], # 0 + [0x8000], # -0 + [0xc248], # -3.14159 + [0x4248], # 3.14159 + [0x0001], # Subnormal + [0x03ff], # Subnormal +] + sew32 = [ [0x7fc00000], # Quiet NaN [0x7fc00001], # Quiet NaN "1" diff --git a/configs/vfdiv.vf.toml b/configs/vfdiv.vf.toml index ee30c15..095b117 100644 --- a/configs/vfdiv.vf.toml +++ b/configs/vfdiv.vf.toml @@ -2,6 +2,20 @@ name = "vfdiv.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfdiv.vv.toml b/configs/vfdiv.vv.toml index 4eb13c3..7ceac50 100644 --- a/configs/vfdiv.vv.toml +++ b/configs/vfdiv.vv.toml @@ -2,6 +2,20 @@ name = "vfdiv.vv" format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfmacc.vf.toml b/configs/vfmacc.vf.toml index 7fd4fe9..2da313b 100644 --- a/configs/vfmacc.vf.toml +++ b/configs/vfmacc.vf.toml @@ -2,6 +2,20 @@ name = "vfmacc.vf" format = "vd,fs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfmacc.vv.toml b/configs/vfmacc.vv.toml index 8bd0889..349401b 100644 --- a/configs/vfmacc.vv.toml +++ b/configs/vfmacc.vv.toml @@ -2,6 +2,20 @@ name = "vfmacc.vv" format = "vd,vs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfmadd.vf.toml b/configs/vfmadd.vf.toml index 2b113a1..445ed9a 100644 --- a/configs/vfmadd.vf.toml +++ b/configs/vfmadd.vf.toml @@ -2,6 +2,20 @@ name = "vfmadd.vf" format = "vd,fs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfmadd.vv.toml b/configs/vfmadd.vv.toml index 8e89e5a..d0e6a23 100644 --- a/configs/vfmadd.vv.toml +++ b/configs/vfmadd.vv.toml @@ -2,6 +2,20 @@ name = "vfmadd.vv" format = "vd,vs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfmax.vf.toml b/configs/vfmax.vf.toml index b928255..156fae0 100644 --- a/configs/vfmax.vf.toml +++ b/configs/vfmax.vf.toml @@ -2,6 +2,20 @@ name = "vfmax.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfmax.vv.toml b/configs/vfmax.vv.toml index a671dc8..724bb52 100644 --- a/configs/vfmax.vv.toml +++ b/configs/vfmax.vv.toml @@ -2,6 +2,20 @@ name = "vfmax.vv" format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfmerge.vfm.toml b/configs/vfmerge.vfm.toml index f4d9389..9361890 100644 --- a/configs/vfmerge.vfm.toml +++ b/configs/vfmerge.vfm.toml @@ -2,6 +2,20 @@ name = "vfmerge.vfm" format = "vd,vs2,fs1,v0" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfmin.vf.toml b/configs/vfmin.vf.toml index c8c2600..6d99933 100644 --- a/configs/vfmin.vf.toml +++ b/configs/vfmin.vf.toml @@ -2,6 +2,20 @@ name = "vfmin.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfmin.vv.toml b/configs/vfmin.vv.toml index 11962c6..2c85672 100644 --- a/configs/vfmin.vv.toml +++ b/configs/vfmin.vv.toml @@ -2,6 +2,20 @@ name = "vfmin.vv" format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfmsac.vf.toml b/configs/vfmsac.vf.toml index 8a6fc1f..60263e8 100644 --- a/configs/vfmsac.vf.toml +++ b/configs/vfmsac.vf.toml @@ -2,6 +2,20 @@ name = "vfmsac.vf" format = "vd,fs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfmsac.vv.toml b/configs/vfmsac.vv.toml index 9e65896..bf9d3da 100644 --- a/configs/vfmsac.vv.toml +++ b/configs/vfmsac.vv.toml @@ -2,6 +2,20 @@ name = "vfmsac.vv" format = "vd,vs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfmsub.vf.toml b/configs/vfmsub.vf.toml index 9d5dc87..2ba04d4 100644 --- a/configs/vfmsub.vf.toml +++ b/configs/vfmsub.vf.toml @@ -2,6 +2,20 @@ name = "vfmsub.vf" format = "vd,fs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfmsub.vv.toml b/configs/vfmsub.vv.toml index 24af61a..da0bfd1 100644 --- a/configs/vfmsub.vv.toml +++ b/configs/vfmsub.vv.toml @@ -2,6 +2,20 @@ name = "vfmsub.vv" format = "vd,vs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfmul.vf.toml b/configs/vfmul.vf.toml index 9a4fae8..a462853 100644 --- a/configs/vfmul.vf.toml +++ b/configs/vfmul.vf.toml @@ -2,6 +2,20 @@ name = "vfmul.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfmul.vv.toml b/configs/vfmul.vv.toml index 273e54d..9db351d 100644 --- a/configs/vfmul.vv.toml +++ b/configs/vfmul.vv.toml @@ -2,6 +2,20 @@ name = "vfmul.vv" format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfmv.f.s.toml b/configs/vfmv.f.s.toml index 03d1ae1..2bbbee6 100644 --- a/configs/vfmv.f.s.toml +++ b/configs/vfmv.f.s.toml @@ -2,5 +2,6 @@ name = "vfmv.f.s" format = "fd,vs2" [tests] +fsew16 = [["42.0"]] fsew32 = [["42.0"]] fsew64 = [["42.0"]] diff --git a/configs/vfmv.s.f.toml b/configs/vfmv.s.f.toml index 603ca18..7c2b56b 100644 --- a/configs/vfmv.s.f.toml +++ b/configs/vfmv.s.f.toml @@ -2,5 +2,6 @@ name = "vfmv.s.f" format = "vd,fs1" [tests] +fsew16 = [["42.0"]] fsew32 = [["42.0"]] fsew64 = [["42.0"]] diff --git a/configs/vfmv.v.f.toml b/configs/vfmv.v.f.toml index 83fe9a1..a7cda54 100644 --- a/configs/vfmv.v.f.toml +++ b/configs/vfmv.v.f.toml @@ -2,5 +2,6 @@ name = "vfmv.v.f" format = "vd,fs1" [tests] +fsew16 = [["42.0"]] fsew32 = [["42.0"]] fsew64 = [["42.0"]] diff --git a/configs/vfncvt.f.f.w.toml b/configs/vfncvt.f.f.w.toml index b56a432..6e9a548 100644 --- a/configs/vfncvt.f.f.w.toml +++ b/configs/vfncvt.f.f.w.toml @@ -2,6 +2,11 @@ name = "vfncvt.f.f.w" format = "vd,vs2,vm" [tests] +sew32 = [ + [0xffffffff], + [0xfffffffe], + [0x2], +] sew64 = [ ["0xffffffffffffffff"], ["0xfffffffffffffffe"], diff --git a/configs/vfncvt.f.x.w.toml b/configs/vfncvt.f.x.w.toml index 6679e05..8540539 100644 --- a/configs/vfncvt.f.x.w.toml +++ b/configs/vfncvt.f.x.w.toml @@ -2,6 +2,11 @@ name = "vfncvt.f.x.w" format = "vd,vs2,vm" [tests] +sew32 = [ + [0xffffffff], + [0xfffffffe], + [0x2], +] sew64 = [ ["0xffffffffffffffff"], ["0xfffffffffffffffe"], diff --git a/configs/vfncvt.f.xu.w.toml b/configs/vfncvt.f.xu.w.toml index 7caca35..bfb787c 100644 --- a/configs/vfncvt.f.xu.w.toml +++ b/configs/vfncvt.f.xu.w.toml @@ -2,6 +2,11 @@ name = "vfncvt.f.xu.w" format = "vd,vs2,vm" [tests] +sew32 = [ + [0xffffffff], + [0xfffffffe], + [0x2], +] sew64 = [ ["0xffffffffffffffff"], ["0xfffffffffffffffe"], diff --git a/configs/vfncvt.rod.f.f.w.toml b/configs/vfncvt.rod.f.f.w.toml index 5cd4dd2..2101616 100644 --- a/configs/vfncvt.rod.f.f.w.toml +++ b/configs/vfncvt.rod.f.f.w.toml @@ -2,6 +2,11 @@ name = "vfncvt.rod.f.f.w" format = "vd,vs2,vm" [tests] +sew32 = [ + [0xffffffff], + [0xfffffffe], + [0x2], +] sew64 = [ ["0xffffffffffffffff"], ["0xfffffffffffffffe"], diff --git a/configs/vfncvt.rtz.x.f.w.toml b/configs/vfncvt.rtz.x.f.w.toml index c9886d7..0108473 100644 --- a/configs/vfncvt.rtz.x.f.w.toml +++ b/configs/vfncvt.rtz.x.f.w.toml @@ -2,6 +2,20 @@ name = "vfncvt.rtz.x.f.w" format = "vd,vs2,vm" [tests] +sew32 = [ + [0x7fc00000], # Quiet NaN + [0x7fc00001], # Quiet NaN "1" + [0x7fc00002], # Quiet NaN "2" + [0x7fa00000], # Signaling NaN + [0x7f800000], # Inf + [0xff800000], # -Inf + [0x00000000], # 0 + [0x80000000], # -0 + [0xc0490e56], # -3.14159 + [0x40490fd0], # 3.14159 + [0x00000001], # Subnormal + [0x007fffff], # Subnormal +] sew64 = [ ["0x7ff8000000000000"], # Quiet NaN ["0x7ff8000000000001"], # Quiet NaN "1" diff --git a/configs/vfncvt.rtz.xu.f.w.toml b/configs/vfncvt.rtz.xu.f.w.toml index c7fed42..9a47a8a 100644 --- a/configs/vfncvt.rtz.xu.f.w.toml +++ b/configs/vfncvt.rtz.xu.f.w.toml @@ -2,6 +2,20 @@ name = "vfncvt.rtz.xu.f.w" format = "vd,vs2,vm" [tests] +sew32 = [ + [0x7fc00000], # Quiet NaN + [0x7fc00001], # Quiet NaN "1" + [0x7fc00002], # Quiet NaN "2" + [0x7fa00000], # Signaling NaN + [0x7f800000], # Inf + [0xff800000], # -Inf + [0x00000000], # 0 + [0x80000000], # -0 + [0xc0490e56], # -3.14159 + [0x40490fd0], # 3.14159 + [0x00000001], # Subnormal + [0x007fffff], # Subnormal +] sew64 = [ ["0x7ff8000000000000"], # Quiet NaN ["0x7ff8000000000001"], # Quiet NaN "1" diff --git a/configs/vfncvt.xu.f.w.toml b/configs/vfncvt.xu.f.w.toml index 37b203e..785edbc 100644 --- a/configs/vfncvt.xu.f.w.toml +++ b/configs/vfncvt.xu.f.w.toml @@ -2,6 +2,21 @@ name = "vfncvt.xu.f.w" format = "vd,vs2,vm" [tests] +sew32 = [ + [0x7fc00000], # Quiet NaN + [0x7fc00001], # Quiet NaN "1" + [0x7fc00002], # Quiet NaN "2" + [0x7fa00000], # Signaling NaN + [0x7f800000], # Inf + [0xff800000], # -Inf + [0x00000000], # 0 + [0x80000000], # -0 + [0xc0490e56], # -3.14159 + [0x40490fd0], # 3.14159 + [0x00000001], # Subnormal + [0x007fffff], # Subnormal +] + sew64 = [ ["0x7ff8000000000000"], # Quiet NaN ["0x7ff8000000000001"], # Quiet NaN "1" diff --git a/configs/vfnmacc.vf.toml b/configs/vfnmacc.vf.toml index 0488005..86a072b 100644 --- a/configs/vfnmacc.vf.toml +++ b/configs/vfnmacc.vf.toml @@ -2,6 +2,20 @@ name = "vfnmacc.vf" format = "vd,fs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfnmacc.vv.toml b/configs/vfnmacc.vv.toml index f419ab3..5feed21 100644 --- a/configs/vfnmacc.vv.toml +++ b/configs/vfnmacc.vv.toml @@ -2,6 +2,20 @@ name = "vfnmacc.vv" format = "vd,vs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfnmadd.vf.toml b/configs/vfnmadd.vf.toml index 898b49d..daf1821 100644 --- a/configs/vfnmadd.vf.toml +++ b/configs/vfnmadd.vf.toml @@ -2,6 +2,20 @@ name = "vfnmadd.vf" format = "vd,fs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfnmadd.vv.toml b/configs/vfnmadd.vv.toml index 3a4acaf..c923b2a 100644 --- a/configs/vfnmadd.vv.toml +++ b/configs/vfnmadd.vv.toml @@ -2,6 +2,20 @@ name = "vfnmadd.vv" format = "vd,vs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfnmsac.vf.toml b/configs/vfnmsac.vf.toml index d216f62..f402751 100644 --- a/configs/vfnmsac.vf.toml +++ b/configs/vfnmsac.vf.toml @@ -2,6 +2,20 @@ name = "vfnmsac.vf" format = "vd,fs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfnmsac.vv.toml b/configs/vfnmsac.vv.toml index e1595cd..3cf4f47 100644 --- a/configs/vfnmsac.vv.toml +++ b/configs/vfnmsac.vv.toml @@ -2,6 +2,20 @@ name = "vfnmsac.vv" format = "vd,vs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfnmsub.vf.toml b/configs/vfnmsub.vf.toml index b5e1d93..e02dab3 100644 --- a/configs/vfnmsub.vf.toml +++ b/configs/vfnmsub.vf.toml @@ -2,6 +2,20 @@ name = "vfnmsub.vf" format = "vd,fs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfnmsub.vv.toml b/configs/vfnmsub.vv.toml index be4b1e2..c6b2cfd 100644 --- a/configs/vfnmsub.vv.toml +++ b/configs/vfnmsub.vv.toml @@ -2,6 +2,20 @@ name = "vfnmsub.vv" format = "vd,vs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfrdiv.vf.toml b/configs/vfrdiv.vf.toml index edf629c..0d5a948 100644 --- a/configs/vfrdiv.vf.toml +++ b/configs/vfrdiv.vf.toml @@ -2,6 +2,20 @@ name = "vfrdiv.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfredmax.vs.toml b/configs/vfredmax.vs.toml index e754e47..e3bea7b 100644 --- a/configs/vfredmax.vs.toml +++ b/configs/vfredmax.vs.toml @@ -2,6 +2,20 @@ name = "vfredmax.vs" format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfredmin.vs.toml b/configs/vfredmin.vs.toml index 9f0ccd3..17b487d 100644 --- a/configs/vfredmin.vs.toml +++ b/configs/vfredmin.vs.toml @@ -2,6 +2,20 @@ name = "vfredmin.vs" format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfredosum.vs.toml b/configs/vfredosum.vs.toml index 1ed4551..9345e6b 100644 --- a/configs/vfredosum.vs.toml +++ b/configs/vfredosum.vs.toml @@ -2,6 +2,20 @@ name = "vfredosum.vs" format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfredusum.vs.toml b/configs/vfredusum.vs.toml index be4a157..8529af8 100644 --- a/configs/vfredusum.vs.toml +++ b/configs/vfredusum.vs.toml @@ -4,6 +4,17 @@ format = "vd,vs2,vs1,vm" notestfloat3 = true [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.5", "1.5"], diff --git a/configs/vfrsub.vf.toml b/configs/vfrsub.vf.toml index 4f470e7..748e362 100644 --- a/configs/vfrsub.vf.toml +++ b/configs/vfrsub.vf.toml @@ -2,6 +2,20 @@ name = "vfrsub.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfsgnj.vf.toml b/configs/vfsgnj.vf.toml index 855ae88..628dd76 100644 --- a/configs/vfsgnj.vf.toml +++ b/configs/vfsgnj.vf.toml @@ -2,6 +2,18 @@ name = "vfsgnj.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + [ "1.0", "1.0"], + [ "1.0", "-1.0"], + [ "1.0", "-0.0"], + [ "1.0", "0.0"], + ["-1.0", "-0.0"], + ["-1.0", "0.0"], + ["-0.0", "0.0"], + [ "0.0", "-0.0"], + ["-3.14159265", "0.0001"], + ["-3.14159265", "-0.0001"] +] fsew32 = [ [ "1.0", "1.0"], [ "1.0", "-1.0"], diff --git a/configs/vfsgnj.vv.toml b/configs/vfsgnj.vv.toml index f13fdc7..014e94b 100644 --- a/configs/vfsgnj.vv.toml +++ b/configs/vfsgnj.vv.toml @@ -2,6 +2,18 @@ name = "vfsgnj.vv" format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + [ "1.0", "1.0"], + [ "1.0", "-1.0"], + [ "1.0", "-0.0"], + [ "1.0", "0.0"], + ["-1.0", "-0.0"], + ["-1.0", "0.0"], + ["-0.0", "0.0"], + [ "0.0", "-0.0"], + ["-3.14159265", "0.0001"], + ["-3.14159265", "-0.0001"] +] fsew32 = [ [ "1.0", "1.0"], [ "1.0", "-1.0"], diff --git a/configs/vfsgnjn.vf.toml b/configs/vfsgnjn.vf.toml index 65bfb49..777c699 100644 --- a/configs/vfsgnjn.vf.toml +++ b/configs/vfsgnjn.vf.toml @@ -2,6 +2,18 @@ name = "vfsgnjn.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + [ "1.0", "1.0"], + [ "1.0", "-1.0"], + [ "1.0", "-0.0"], + [ "1.0", "0.0"], + ["-1.0", "-0.0"], + ["-1.0", "0.0"], + ["-0.0", "0.0"], + [ "0.0", "-0.0"], + ["-3.14159265", "0.0001"], + ["-3.14159265", "-0.0001"] +] fsew32 = [ [ "1.0", "1.0"], [ "1.0", "-1.0"], diff --git a/configs/vfsgnjn.vv.toml b/configs/vfsgnjn.vv.toml index 891633c..ddd399f 100644 --- a/configs/vfsgnjn.vv.toml +++ b/configs/vfsgnjn.vv.toml @@ -2,6 +2,18 @@ name = "vfsgnjn.vv" format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + [ "1.0", "1.0"], + [ "1.0", "-1.0"], + [ "1.0", "-0.0"], + [ "1.0", "0.0"], + ["-1.0", "-0.0"], + ["-1.0", "0.0"], + ["-0.0", "0.0"], + [ "0.0", "-0.0"], + ["-3.14159265", "0.0001"], + ["-3.14159265", "-0.0001"] +] fsew32 = [ [ "1.0", "1.0"], [ "1.0", "-1.0"], diff --git a/configs/vfsgnjx.vf.toml b/configs/vfsgnjx.vf.toml index eab3dbe..860069e 100644 --- a/configs/vfsgnjx.vf.toml +++ b/configs/vfsgnjx.vf.toml @@ -2,6 +2,18 @@ name = "vfsgnjx.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + [ "1.0", "1.0"], + [ "1.0", "-1.0"], + [ "1.0", "-0.0"], + [ "1.0", "0.0"], + ["-1.0", "-0.0"], + ["-1.0", "0.0"], + ["-0.0", "0.0"], + [ "0.0", "-0.0"], + ["-3.14159265", "0.0001"], + ["-3.14159265", "-0.0001"] +] fsew32 = [ [ "1.0", "1.0"], [ "1.0", "-1.0"], diff --git a/configs/vfsgnjx.vv.toml b/configs/vfsgnjx.vv.toml index 863578d..b5b6ec1 100644 --- a/configs/vfsgnjx.vv.toml +++ b/configs/vfsgnjx.vv.toml @@ -2,6 +2,18 @@ name = "vfsgnjx.vv" format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + [ "1.0", "1.0"], + [ "1.0", "-1.0"], + [ "1.0", "-0.0"], + [ "1.0", "0.0"], + ["-1.0", "-0.0"], + ["-1.0", "0.0"], + ["-0.0", "0.0"], + [ "0.0", "-0.0"], + ["-3.14159265", "0.0001"], + ["-3.14159265", "-0.0001"] +] fsew32 = [ [ "1.0", "1.0"], [ "1.0", "-1.0"], diff --git a/configs/vfslide1down.vf.toml b/configs/vfslide1down.vf.toml index dff92ad..0f5b8d1 100644 --- a/configs/vfslide1down.vf.toml +++ b/configs/vfslide1down.vf.toml @@ -2,6 +2,20 @@ name = "vfslide1down.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfslide1up.vf.toml b/configs/vfslide1up.vf.toml index 296ba5e..759ef03 100644 --- a/configs/vfslide1up.vf.toml +++ b/configs/vfslide1up.vf.toml @@ -2,6 +2,20 @@ name = "vfslide1up.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfsub.vf.toml b/configs/vfsub.vf.toml index 4c88a20..7029ad9 100644 --- a/configs/vfsub.vf.toml +++ b/configs/vfsub.vf.toml @@ -2,6 +2,20 @@ name = "vfsub.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfsub.vv.toml b/configs/vfsub.vv.toml index f1cec01..0b2fa8c 100644 --- a/configs/vfsub.vv.toml +++ b/configs/vfsub.vv.toml @@ -2,6 +2,20 @@ name = "vfsub.vv" format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfwadd.vf.toml b/configs/vfwadd.vf.toml index 4eaf32d..08efcc5 100644 --- a/configs/vfwadd.vf.toml +++ b/configs/vfwadd.vf.toml @@ -2,6 +2,20 @@ name = "vfwadd.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfwadd.vv.toml b/configs/vfwadd.vv.toml index 6ed0f72..a452167 100644 --- a/configs/vfwadd.vv.toml +++ b/configs/vfwadd.vv.toml @@ -2,6 +2,20 @@ name = "vfwadd.vv" format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfwadd.wf.toml b/configs/vfwadd.wf.toml index e7b7af0..752cbef 100644 --- a/configs/vfwadd.wf.toml +++ b/configs/vfwadd.wf.toml @@ -2,6 +2,20 @@ name = "vfwadd.wf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfwadd.wv.toml b/configs/vfwadd.wv.toml index c5a3987..52b1468 100644 --- a/configs/vfwadd.wv.toml +++ b/configs/vfwadd.wv.toml @@ -2,6 +2,20 @@ name = "vfwadd.wv" format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfwcvt.f.f.v.toml b/configs/vfwcvt.f.f.v.toml index c40f50d..81238b8 100644 --- a/configs/vfwcvt.f.f.v.toml +++ b/configs/vfwcvt.f.f.v.toml @@ -2,6 +2,11 @@ name = "vfwcvt.f.f.v" format = "vd,vs2,vm" [tests] +sew16 = [ + [0xffff], + [0xfffe], + [0x2], +] sew32 = [ [0xffffffff], [0xfffffffe], diff --git a/configs/vfwcvt.f.x.v.toml b/configs/vfwcvt.f.x.v.toml index 69ad5b5..04fae65 100644 --- a/configs/vfwcvt.f.x.v.toml +++ b/configs/vfwcvt.f.x.v.toml @@ -2,6 +2,11 @@ name = "vfwcvt.f.x.v" format = "vd,vs2,vm" [tests] +sew16 = [ + [0xffff], + [0xfffe], + [0x2], +] sew32 = [ [0xffffffff], [0xfffffffe], diff --git a/configs/vfwcvt.f.xu.v.toml b/configs/vfwcvt.f.xu.v.toml index 6148774..8430147 100644 --- a/configs/vfwcvt.f.xu.v.toml +++ b/configs/vfwcvt.f.xu.v.toml @@ -2,6 +2,11 @@ name = "vfwcvt.f.xu.v" format = "vd,vs2,vm" [tests] +sew16 = [ + [0xffff], + [0xfffe], + [0x2], +] sew32 = [ [0xffffffff], [0xfffffffe], diff --git a/configs/vfwcvt.rtz.x.f.v.toml b/configs/vfwcvt.rtz.x.f.v.toml index 286eb7f..66fc622 100644 --- a/configs/vfwcvt.rtz.x.f.v.toml +++ b/configs/vfwcvt.rtz.x.f.v.toml @@ -2,6 +2,21 @@ name = "vfwcvt.rtz.x.f.v" format = "vd,vs2,vm" [tests] +sew16 = [ + [0x7e00], # Quiet NaN + [0x7e01], # Quiet NaN "1" + [0x7e02], # Quiet NaN "2" + [0x7d00], # Signaling NaN + [0x7c00], # Inf + [0xfc00], # -Inf + [0x0000], # 0 + [0x8000], # -0 + [0xc248], # -3.14159 + [0x4248], # 3.14159 + [0x0001], # Subnormal + [0x03ff], # Subnormal +] + sew32 = [ [0x7fc00000], # Quiet NaN [0x7fc00001], # Quiet NaN "1" diff --git a/configs/vfwcvt.rtz.xu.f.v.toml b/configs/vfwcvt.rtz.xu.f.v.toml index ec18298..1d09c92 100644 --- a/configs/vfwcvt.rtz.xu.f.v.toml +++ b/configs/vfwcvt.rtz.xu.f.v.toml @@ -2,6 +2,21 @@ name = "vfwcvt.rtz.xu.f.v" format = "vd,vs2,vm" [tests] +sew16 = [ + [0x7e00], # Quiet NaN + [0x7e01], # Quiet NaN "1" + [0x7e02], # Quiet NaN "2" + [0x7d00], # Signaling NaN + [0x7c00], # Inf + [0xfc00], # -Inf + [0x0000], # 0 + [0x8000], # -0 + [0xc248], # -3.14159 + [0x4248], # 3.14159 + [0x0001], # Subnormal + [0x03ff], # Subnormal +] + sew32 = [ [0x7fc00000], # Quiet NaN [0x7fc00001], # Quiet NaN "1" diff --git a/configs/vfwcvt.x.f.v.toml b/configs/vfwcvt.x.f.v.toml index 676d4d4..b0c9fc0 100644 --- a/configs/vfwcvt.x.f.v.toml +++ b/configs/vfwcvt.x.f.v.toml @@ -2,6 +2,20 @@ name = "vfwcvt.x.f.v" format = "vd,vs2,vm" [tests] +sew16 = [ + [0x7e00], # Quiet NaN + [0x7e01], # Quiet NaN "1" + [0x7e02], # Quiet NaN "2" + [0x7d00], # Signaling NaN + [0x7c00], # Inf + [0xfc00], # -Inf + [0x0000], # 0 + [0x8000], # -0 + [0xc248], # -3.14159 + [0x4248], # 3.14159 + [0x0001], # Subnormal + [0x03ff], # Subnormal +] sew32 = [ [0x7fc00000], # Quiet NaN [0x7fc00001], # Quiet NaN "1" diff --git a/configs/vfwcvt.xu.f.v.toml b/configs/vfwcvt.xu.f.v.toml index 3272787..f152f2c 100644 --- a/configs/vfwcvt.xu.f.v.toml +++ b/configs/vfwcvt.xu.f.v.toml @@ -2,6 +2,20 @@ name = "vfwcvt.xu.f.v" format = "vd,vs2,vm" [tests] +sew16 = [ + [0x7e00], # Quiet NaN + [0x7e01], # Quiet NaN "1" + [0x7e02], # Quiet NaN "2" + [0x7d00], # Signaling NaN + [0x7c00], # Inf + [0xfc00], # -Inf + [0x0000], # 0 + [0x8000], # -0 + [0xc248], # -3.14159 + [0x4248], # 3.14159 + [0x0001], # Subnormal + [0x03ff], # Subnormal +] sew32 = [ [0x7fc00000], # Quiet NaN [0x7fc00001], # Quiet NaN "1" diff --git a/configs/vfwmacc.vf.toml b/configs/vfwmacc.vf.toml index 2bdf788..4f65266 100644 --- a/configs/vfwmacc.vf.toml +++ b/configs/vfwmacc.vf.toml @@ -2,6 +2,20 @@ name = "vfwmacc.vf" format = "vd,fs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfwmacc.vv.toml b/configs/vfwmacc.vv.toml index 2dea713..cbf959e 100644 --- a/configs/vfwmacc.vv.toml +++ b/configs/vfwmacc.vv.toml @@ -2,6 +2,20 @@ name = "vfwmacc.vv" format = "vd,vs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfwmsac.vf.toml b/configs/vfwmsac.vf.toml index 594fcdf..553837f 100644 --- a/configs/vfwmsac.vf.toml +++ b/configs/vfwmsac.vf.toml @@ -2,6 +2,20 @@ name = "vfwmsac.vf" format = "vd,fs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfwmsac.vv.toml b/configs/vfwmsac.vv.toml index b836b9c..463b32d 100644 --- a/configs/vfwmsac.vv.toml +++ b/configs/vfwmsac.vv.toml @@ -2,6 +2,20 @@ name = "vfwmsac.vv" format = "vd,vs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfwmul.vf.toml b/configs/vfwmul.vf.toml index 05766d6..13ef246 100644 --- a/configs/vfwmul.vf.toml +++ b/configs/vfwmul.vf.toml @@ -2,6 +2,20 @@ name = "vfwmul.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfwmul.vv.toml b/configs/vfwmul.vv.toml index 47b28a1..1a49629 100644 --- a/configs/vfwmul.vv.toml +++ b/configs/vfwmul.vv.toml @@ -2,6 +2,20 @@ name = "vfwmul.vv" format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfwnmacc.vf.toml b/configs/vfwnmacc.vf.toml index 5268b4e..1958456 100644 --- a/configs/vfwnmacc.vf.toml +++ b/configs/vfwnmacc.vf.toml @@ -2,6 +2,20 @@ name = "vfwnmacc.vf" format = "vd,fs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfwnmacc.vv.toml b/configs/vfwnmacc.vv.toml index a6d8a35..c96dd97 100644 --- a/configs/vfwnmacc.vv.toml +++ b/configs/vfwnmacc.vv.toml @@ -2,6 +2,20 @@ name = "vfwnmacc.vv" format = "vd,vs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfwnmsac.vf.toml b/configs/vfwnmsac.vf.toml index 72fcbba..0f403d4 100644 --- a/configs/vfwnmsac.vf.toml +++ b/configs/vfwnmsac.vf.toml @@ -2,6 +2,20 @@ name = "vfwnmsac.vf" format = "vd,fs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfwnmsac.vv.toml b/configs/vfwnmsac.vv.toml index 8ec248b..c8f1141 100644 --- a/configs/vfwnmsac.vv.toml +++ b/configs/vfwnmsac.vv.toml @@ -2,6 +2,20 @@ name = "vfwnmsac.vv" format = "vd,vs1,vs2,vm" [tests] +fsew16 = [ + ["0.0", "2.5", "1.0"], + ["-1.0", "-1235.1", "1.1"], + ["0.002", "3.14159265", "0.00000001"], + ["0.0", "1.1", "-1235.1"], + ["-1.0", "-1.0", "-2.0"], + ["0.002", "nan", "-nan"], + ["0.0", "inf", "-inf"], + ["-1.0", "quiet_nan", "signaling_nan"], + ["0.002", "smallest_nonzero_float", "largest_subnormal_float"], + ["0.0", "smallest_normal_float", "max_float"], + ["-1.0", "-smallest_nonzero_float", "-largest_subnormal_float"], + ["0.002", "-smallest_normal_float", "-max_float"] +] fsew32 = [ ["0.0", "2.5", "1.0"], ["-1.0", "-1235.1", "1.1"], diff --git a/configs/vfwredosum.vs.toml b/configs/vfwredosum.vs.toml index 751bdeb..db1f699 100644 --- a/configs/vfwredosum.vs.toml +++ b/configs/vfwredosum.vs.toml @@ -2,6 +2,20 @@ name = "vfwredosum.vs" format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfwredusum.vs.toml b/configs/vfwredusum.vs.toml index 6f3ba67..d31bf0a 100644 --- a/configs/vfwredusum.vs.toml +++ b/configs/vfwredusum.vs.toml @@ -4,6 +4,17 @@ format = "vd,vs2,vs1,vm" notestfloat3 = true [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.5", "1.5"], + ["1.5", "-1235.5"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.5", "1.5"], diff --git a/configs/vfwsub.vf.toml b/configs/vfwsub.vf.toml index 852dea3..2a5cdd8 100644 --- a/configs/vfwsub.vf.toml +++ b/configs/vfwsub.vf.toml @@ -2,6 +2,20 @@ name = "vfwsub.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfwsub.vv.toml b/configs/vfwsub.vv.toml index 20c984d..b89b288 100644 --- a/configs/vfwsub.vv.toml +++ b/configs/vfwsub.vv.toml @@ -2,6 +2,20 @@ name = "vfwsub.vv" format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfwsub.wf.toml b/configs/vfwsub.wf.toml index e5f464f..68ee6df 100644 --- a/configs/vfwsub.wf.toml +++ b/configs/vfwsub.wf.toml @@ -2,6 +2,20 @@ name = "vfwsub.wf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vfwsub.wv.toml b/configs/vfwsub.wv.toml index 0773a71..8d0c4fe 100644 --- a/configs/vfwsub.wv.toml +++ b/configs/vfwsub.wv.toml @@ -2,6 +2,20 @@ name = "vfwsub.wv" format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vmfeq.vf.toml b/configs/vmfeq.vf.toml index 2cab98d..026556d 100644 --- a/configs/vmfeq.vf.toml +++ b/configs/vmfeq.vf.toml @@ -2,6 +2,20 @@ name = "vmfeq.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vmfeq.vv.toml b/configs/vmfeq.vv.toml index e1c48ff..2824b16 100644 --- a/configs/vmfeq.vv.toml +++ b/configs/vmfeq.vv.toml @@ -2,6 +2,20 @@ name = "vmfeq.vv" format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vmfge.vf.toml b/configs/vmfge.vf.toml index 9989087..5616c2b 100644 --- a/configs/vmfge.vf.toml +++ b/configs/vmfge.vf.toml @@ -2,6 +2,20 @@ name = "vmfge.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vmfgt.vf.toml b/configs/vmfgt.vf.toml index 030dc2c..d5a2fb0 100644 --- a/configs/vmfgt.vf.toml +++ b/configs/vmfgt.vf.toml @@ -2,6 +2,20 @@ name = "vmfgt.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vmfle.vf.toml b/configs/vmfle.vf.toml index 6f24bd8..75a1532 100644 --- a/configs/vmfle.vf.toml +++ b/configs/vmfle.vf.toml @@ -2,6 +2,20 @@ name = "vmfle.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vmfle.vv.toml b/configs/vmfle.vv.toml index 25f08fe..9f5e4ba 100644 --- a/configs/vmfle.vv.toml +++ b/configs/vmfle.vv.toml @@ -2,6 +2,20 @@ name = "vmfle.vv" format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vmflt.vf.toml b/configs/vmflt.vf.toml index 403e84e..3189830 100644 --- a/configs/vmflt.vf.toml +++ b/configs/vmflt.vf.toml @@ -2,6 +2,20 @@ name = "vmflt.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vmflt.vv.toml b/configs/vmflt.vv.toml index 176219d..8507e7f 100644 --- a/configs/vmflt.vv.toml +++ b/configs/vmflt.vv.toml @@ -2,6 +2,20 @@ name = "vmflt.vv" format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vmfne.vf.toml b/configs/vmfne.vf.toml index 9b1b1ae..c5d64d4 100644 --- a/configs/vmfne.vf.toml +++ b/configs/vmfne.vf.toml @@ -2,6 +2,20 @@ name = "vmfne.vf" format = "vd,vs2,fs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/configs/vmfne.vv.toml b/configs/vmfne.vv.toml index 7e68e9f..ebd49fb 100644 --- a/configs/vmfne.vv.toml +++ b/configs/vmfne.vv.toml @@ -2,6 +2,20 @@ name = "vmfne.vv" format = "vd,vs2,vs1,vm" [tests] +fsew16 = [ + ["2.5", "1.0"], + ["-1235.1", "1.1"], + ["3.14159265", "0.00000001"], + ["1.1", "-1235.1"], + ["-1.0", "-2.0"], + ["nan", "-nan"], + ["inf", "-inf"], + ["quiet_nan", "signaling_nan"], + ["smallest_nonzero_float", "largest_subnormal_float"], + ["smallest_normal_float", "max_float"], + ["-smallest_nonzero_float", "-largest_subnormal_float"], + ["-smallest_normal_float", "-max_float"] +] fsew32 = [ ["2.5", "1.0"], ["-1235.1", "1.1"], diff --git a/generator/insn.go b/generator/insn.go index dccaf6d..bbf2d5c 100644 --- a/generator/insn.go +++ b/generator/insn.go @@ -396,7 +396,17 @@ func (i *Insn) testCases(float bool, sew SEW) [][]any { res = append(res, l) } case 16: - for _, c := range i.Tests.SEW16 { + if float { + for _, c := range i.Tests.FSEW16 { + l := make([]any, len(c)) + for b, op := range c { + l[b] = op + } + res = append(res, l) + } + break + } + for _, c := range i.Tests.SEW16 { l := make([]any, len(c)) for b, op := range c { l[b] = op diff --git a/generator/insn_g.go b/generator/insn_g.go index 117ae5e..c6f2b2f 100644 --- a/generator/insn_g.go +++ b/generator/insn_g.go @@ -66,9 +66,13 @@ func (i *Insn) gWriteTestData(float bool, testfloat bool, cont bool, lmul LMUL, } if float && testfloat && !cont { + testfloat3.InitF16(numops) testfloat3.InitF32(numops) testfloat3.InitF64(numops) } + nextf16 := func() uint16 { + return testfloat3.GenF16(numops)[idx] + } nextf32 := func() float32 { return testfloat3.GenF32(numops)[idx] } @@ -86,8 +90,12 @@ func (i *Insn) gWriteTestData(float bool, testfloat bool, cont bool, lmul LMUL, b := a % len(cases) _ = binary.Write(buf, binary.LittleEndian, convNum[uint8](cases[b][idx])) case 16: - b := a % len(cases) - _ = binary.Write(buf, binary.LittleEndian, convNum[uint16](cases[b][idx])) + if (float && testfloat && a >= len(cases)) || cont { + _ = binary.Write(buf, binary.LittleEndian, nextf16()) + } else { + b := a % len(cases) + _ = binary.Write(buf, binary.LittleEndian, convNum[uint16](cases[b][idx])) + } case 32: // Manual test cases exhausted, use testfloat3 to generate new ones. if (float && testfloat && a >= len(cases)) || cont { diff --git a/generator/insn_util.go b/generator/insn_util.go index da9d91d..628a030 100644 --- a/generator/insn_util.go +++ b/generator/insn_util.go @@ -29,7 +29,7 @@ type VXSAT bool type SEW int var allSEWs = []SEW{8, 16, 32, 64} -var floatSEWs = []SEW{32, 64} +var floatSEWs = []SEW{16, 32, 64} var validSEWs = map[SEW]struct{}{ allSEWs[0]: {}, allSEWs[1]: {}, diff --git a/generator/tests.go b/generator/tests.go index efec604..56f75a0 100644 --- a/generator/tests.go +++ b/generator/tests.go @@ -5,6 +5,8 @@ import ( "strconv" "strings" "unsafe" + + f16 "github.com/x448/float16" ) type num interface { @@ -20,6 +22,42 @@ func convNum[T num](n any) T { return res } +func parseCustomFloat16(n string) uint16 { + switch n { + case "nan": + return 0x7e01 + case "-nan": + return 0xfe01 + case "inf": + return 0x7c00 + case "-inf": + return 0xfc00 + case "quiet_nan": + return 0x7e00 + case "signaling_nan": + return 0x7d00 + case "smallest_nonzero_float": + return 0x0001 + case "largest_subnormal_float": + return 0x03ff + case "smallest_normal_float": + return 0x0400 + case "max_float": + return 0x7bff + case "-smallest_nonzero_float": + return 0x8001 + case "-largest_subnormal_float": + return 0x83ff + case "-smallest_normal_float": + return 0x8400 + case "-max_float": + return 0xfbff + default: + v, _ := strconv.ParseFloat(n, 32) + return f16.Fromfloat32(float32(v)).Bits() + } +} + func parseCustomFloat32(n string) float32 { var val uint32 = 0x800000 var smallestNormalFloat32 = *(*float32)(unsafe.Pointer(&val)) @@ -120,6 +158,9 @@ type tests struct { SEW64_ []testCase[string] `toml:"sew64"` SEW64 []testCase[uint64] `toml:"-"` + FSEW16_ []testCase[string] `toml:"fsew16"` + FSEW16 []testCase[uint16] `toml:"-"` + FSEW32_ []testCase[string] `toml:"fsew32"` FSEW32 []testCase[float32] `toml:"-"` @@ -140,6 +181,16 @@ func (t *tests) initialize() error { } } + for i, ss := range t.FSEW16_ { + t.FSEW16 = append(t.FSEW16, make([]uint16, len(ss))) + for j, s := range ss { + t.FSEW16[i][j] = parseCustomFloat16(s) + if err != nil { + return err + } + } + } + for i, ss := range t.FSEW32_ { t.FSEW32 = append(t.FSEW32, make([]float32, len(ss))) for j, s := range ss { diff --git a/go.mod b/go.mod index eab1e99..431ba9b 100644 --- a/go.mod +++ b/go.mod @@ -3,3 +3,4 @@ module github.com/ksco/riscv-vector-tests go 1.19 require github.com/pelletier/go-toml/v2 v2.0.6 +require github.com/x448/float16 v0.8.4 \ No newline at end of file diff --git a/go.sum b/go.sum index 092fabf..c6b133b 100644 --- a/go.sum +++ b/go.sum @@ -12,6 +12,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/main.go b/main.go index 92ed088..6c9cef6 100644 --- a/main.go +++ b/main.go @@ -98,8 +98,11 @@ func main() { if (!strings.HasPrefix(file.Name(), "vf") && !strings.HasPrefix(file.Name(), "vmf")) || strings.HasPrefix(file.Name(), "vfirst") { option.Repeat = 1 } + insn, err := generator.ReadInsnFromToml(contents, option) + fatalIf(err) + if insn.Name != strings.Replace(file.Name(), ".toml", "", -1) { fatalIf(errors.New("filename and instruction name unmatched")) } diff --git a/testfloat3/genCases.h b/testfloat3/genCases.h index d199fcc..3a8dc57 100644 --- a/testfloat3/genCases.h +++ b/testfloat3/genCases.h @@ -37,6 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +typedef uint16_t float16_t; typedef float float32_t; typedef double float64_t; @@ -47,6 +48,14 @@ void genCases_setLevel(int); extern uint_fast64_t genCases_total; extern bool genCases_done; +void genCases_f16_a_init(void); +void genCases_f16_a_next(void); +void genCases_f16_ab_init(void); +void genCases_f16_ab_next(void); +void genCases_f16_abc_init(void); +void genCases_f16_abc_next(void); +extern float16_t genCases_f16_a, genCases_f16_b, genCases_f16_c; + void genCases_f32_a_init(void); void genCases_f32_a_next(void); void genCases_f32_ab_init(void); diff --git a/testfloat3/genCases_f16.c b/testfloat3/genCases_f16.c new file mode 100644 index 0000000..aae2374 --- /dev/null +++ b/testfloat3/genCases_f16.c @@ -0,0 +1,583 @@ + +/*============================================================================ + +This C source file is part of TestFloat, Release 3e, a package of programs for +testing the correctness of floating-point arithmetic complying with the IEEE +Standard for Floating-Point, by John R. Hauser. + +Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of +California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=============================================================================*/ + +#include +#include +#include +#include "random.h" +#include "genCases.h" + +struct sequence { + int expNum, term1Num, term2Num; + bool done; +}; + +union ui16_f16 { uint16_t ui; float16_t f; }; + +enum { + f16NumQIn = 22, + f16NumQOut = 34, + f16NumP1 = 4, + f16NumP2 = 36 +}; +static const uint16_t f16QIn[f16NumQIn] = { + 0x0000, /* positive, subnormal */ + 0x0400, /* positive, -14 */ + 0x1000, /* positive, -11 */ + 0x3400, /* positive, -2 */ + 0x3800, /* positive, -1 */ + 0x3C00, /* positive, 0 */ + 0x4000, /* positive, 1 */ + 0x4400, /* positive, 2 */ + 0x6800, /* positive, 11 */ + 0x7800, /* positive, 15 */ + 0x7C00, /* positive, infinity or NaN */ + 0x8000, /* negative, subnormal */ + 0x8400, /* negative, -14 */ + 0x9000, /* negative, -11 */ + 0xB400, /* negative, -2 */ + 0xB800, /* negative, -1 */ + 0xBC00, /* negative, 0 */ + 0xC000, /* negative, 1 */ + 0xC400, /* negative, 2 */ + 0xE800, /* negative, 11 */ + 0xF800, /* negative, 15 */ + 0xFC00 /* negative, infinity or NaN */ +}; +static const uint16_t f16QOut[f16NumQOut] = { + 0x0000, /* positive, subnormal */ + 0x0400, /* positive, -14 */ + 0x0800, /* positive, -13 */ + 0x1000, /* positive, -11 */ + 0x2C00, /* positive, -4 */ + 0x3000, /* positive, -3 */ + 0x3400, /* positive, -2 */ + 0x3800, /* positive, -1 */ + 0x3C00, /* positive, 0 */ + 0x4000, /* positive, 1 */ + 0x4400, /* positive, 2 */ + 0x4800, /* positive, 3 */ + 0x4C00, /* positive, 4 */ + 0x6800, /* positive, 11 */ + 0x7400, /* positive, 14 */ + 0x7800, /* positive, 15 */ + 0x7C00, /* positive, infinity or NaN */ + 0x8000, /* negative, subnormal */ + 0x8400, /* negative, -14 */ + 0x8800, /* negative, -13 */ + 0x9000, /* negative, -11 */ + 0xAC00, /* negative, -4 */ + 0xB000, /* negative, -3 */ + 0xB400, /* negative, -2 */ + 0xB800, /* negative, -1 */ + 0xBC00, /* negative, 0 */ + 0xC000, /* negative, 1 */ + 0xC400, /* negative, 2 */ + 0xC800, /* negative, 3 */ + 0xCC00, /* negative, 4 */ + 0xE800, /* negative, 11 */ + 0xF400, /* negative, 14 */ + 0xF800, /* negative, 15 */ + 0xFC00 /* negative, infinity or NaN */ +}; +static const uint16_t f16P1[f16NumP1] = { + 0x0000, + 0x0001, + 0x03FF, + 0x03FE +}; +static const uint16_t f16P2[f16NumP2] = { + 0x0000, + 0x0001, + 0x0002, + 0x0004, + 0x0008, + 0x0010, + 0x0020, + 0x0040, + 0x0080, + 0x0100, + 0x0200, + 0x0300, + 0x0380, + 0x03C0, + 0x03E0, + 0x03F0, + 0x03F8, + 0x03FC, + 0x03FE, + 0x03FF, + 0x03FD, + 0x03FB, + 0x03F7, + 0x03EF, + 0x03DF, + 0x03BF, + 0x037F, + 0x02FF, + 0x01FF, + 0x00FF, + 0x007F, + 0x003F, + 0x001F, + 0x000F, + 0x0007, + 0x0003 +}; + +static const uint_fast64_t f16NumQInP1 = f16NumQIn * f16NumP1; +static const uint_fast64_t f16NumQOutP1 = f16NumQOut * f16NumP1; + +static float16_t f16NextQInP1( struct sequence *sequencePtr ) +{ + int expNum, sigNum; + union ui16_f16 uZ; + + expNum = sequencePtr->expNum; + sigNum = sequencePtr->term1Num; + uZ.ui = f16QIn[expNum] | f16P1[sigNum]; + ++sigNum; + if ( f16NumP1 <= sigNum ) { + sigNum = 0; + ++expNum; + if ( f16NumQIn <= expNum ) { + expNum = 0; + sequencePtr->done = true; + } + sequencePtr->expNum = expNum; + } + sequencePtr->term1Num = sigNum; + return uZ.f; + +} + +static float16_t f16NextQOutP1( struct sequence *sequencePtr ) +{ + int expNum, sigNum; + union ui16_f16 uZ; + + expNum = sequencePtr->expNum; + sigNum = sequencePtr->term1Num; + uZ.ui = f16QOut[expNum] | f16P1[sigNum]; + ++sigNum; + if ( f16NumP1 <= sigNum ) { + sigNum = 0; + ++expNum; + if ( f16NumQOut <= expNum ) { + expNum = 0; + sequencePtr->done = true; + } + sequencePtr->expNum = expNum; + } + sequencePtr->term1Num = sigNum; + return uZ.f; + +} + +static const uint_fast64_t f16NumQInP2 = f16NumQIn * f16NumP2; +static const uint_fast64_t f16NumQOutP2 = f16NumQOut * f16NumP2; + +static float16_t f16NextQInP2( struct sequence *sequencePtr ) +{ + int expNum, sigNum; + union ui16_f16 uZ; + + expNum = sequencePtr->expNum; + sigNum = sequencePtr->term1Num; + uZ.ui = f16QIn[expNum] | f16P2[sigNum]; + ++sigNum; + if ( f16NumP2 <= sigNum ) { + sigNum = 0; + ++expNum; + if ( f16NumQIn <= expNum ) { + expNum = 0; + sequencePtr->done = true; + } + sequencePtr->expNum = expNum; + } + sequencePtr->term1Num = sigNum; + return uZ.f; + +} + +static float16_t f16NextQOutP2( struct sequence *sequencePtr ) +{ + int expNum, sigNum; + union ui16_f16 uZ; + + expNum = sequencePtr->expNum; + sigNum = sequencePtr->term1Num; + uZ.ui = f16QOut[expNum] | f16P2[sigNum]; + ++sigNum; + if ( f16NumP2 <= sigNum ) { + sigNum = 0; + ++expNum; + if ( f16NumQOut <= expNum ) { + expNum = 0; + sequencePtr->done = true; + } + sequencePtr->expNum = expNum; + } + sequencePtr->term1Num = sigNum; + return uZ.f; + +} + +static float16_t f16RandomQOutP3( void ) +{ + union ui16_f16 uZ; + + uZ.ui = + f16QOut[randomN_ui8( f16NumQOut )] + | ((f16P2[randomN_ui8( f16NumP2 )] + f16P2[randomN_ui8( f16NumP2 )]) + & 0x03FF); + return uZ.f; + +} + +static float16_t f16RandomQOutPInf( void ) +{ + union ui16_f16 uZ; + + uZ.ui = f16QOut[randomN_ui8( f16NumQOut )] | (random_ui16() & 0x03FF); + return uZ.f; + +} + +enum { f16NumQInfWeightMasks = 4 }; +static const uint16_t f16QInfWeightMasks[f16NumQInfWeightMasks] = + { 0xFC00, 0xFC00, 0xBC00, 0x9C00 }; +static const uint16_t f16QInfWeightOffsets[f16NumQInfWeightMasks] = + { 0x0000, 0x0000, 0x2000, 0x3000 }; + +static float16_t f16RandomQInfP3( void ) +{ + int weightMaskNum; + union ui16_f16 uZ; + + weightMaskNum = randomN_ui8( f16NumQInfWeightMasks ); + uZ.ui = + ((random_ui16() & f16QInfWeightMasks[weightMaskNum]) + + f16QInfWeightOffsets[weightMaskNum]) + | ((f16P2[randomN_ui8( f16NumP2 )] + f16P2[randomN_ui8( f16NumP2 )]) + & 0x03FF); + return uZ.f; + +} + +static float16_t f16RandomQInfPInf( void ) +{ + int weightMaskNum; + union ui16_f16 uZ; + + weightMaskNum = randomN_ui8( f16NumQInfWeightMasks ); + uZ.ui = + (random_ui16() & (f16QInfWeightMasks[weightMaskNum] | 0x03FF)) + + f16QInfWeightOffsets[weightMaskNum]; + return uZ.f; + +} + +static float16_t f16Random( void ) +{ + + switch ( random_ui8() & 7 ) { + case 0: + case 1: + case 2: + return f16RandomQOutP3(); + case 3: + return f16RandomQOutPInf(); + case 4: + case 5: + case 6: + return f16RandomQInfP3(); + case 7: + return f16RandomQInfPInf(); + default: + abort(); + } + +} + +static struct sequence sequenceA, sequenceB, sequenceC; +static float16_t currentA, currentB, currentC; +static int subcase; + +float16_t genCases_f16_a, genCases_f16_b, genCases_f16_c; + +void genCases_f16_a_init( void ) +{ + + sequenceA.expNum = 0; + sequenceA.term1Num = 0; + sequenceA.term2Num = 0; + sequenceA.done = false; + subcase = 0; + genCases_total = + (genCases_level == 1) ? 3 * f16NumQOutP1 : 2 * f16NumQOutP2; + genCases_done = false; + +} + +void genCases_f16_a_next( void ) +{ + + if ( genCases_level == 1 ) { + switch ( subcase ) { + case 0: + case 1: + genCases_f16_a = f16Random(); + break; + case 2: + genCases_f16_a = f16NextQOutP1( &sequenceA ); + genCases_done = sequenceA.done; + subcase = -1; + break; + } + } else { + switch ( subcase ) { + case 0: + genCases_f16_a = f16Random(); + break; + case 1: + genCases_f16_a = f16NextQOutP2( &sequenceA ); + genCases_done = sequenceA.done; + subcase = -1; + break; + } + } + ++subcase; + +} + +void genCases_f16_ab_init( void ) +{ + + sequenceA.expNum = 0; + sequenceA.term1Num = 0; + sequenceA.term2Num = 0; + sequenceA.done = false; + sequenceB.expNum = 0; + sequenceB.term1Num = 0; + sequenceB.term2Num = 0; + sequenceB.done = false; + subcase = 0; + if ( genCases_level == 1 ) { + genCases_total = 6 * f16NumQInP1 * f16NumQInP1; + currentA = f16NextQInP1( &sequenceA ); + } else { + genCases_total = 2 * f16NumQInP2 * f16NumQInP2; + currentA = f16NextQInP2( &sequenceA ); + } + genCases_done = false; + +} + +void genCases_f16_ab_next( void ) +{ + + if ( genCases_level == 1 ) { + switch ( subcase ) { + case 0: + if ( sequenceB.done ) { + sequenceB.done = false; + currentA = f16NextQInP1( &sequenceA ); + } + currentB = f16NextQInP1( &sequenceB ); + case 2: + case 4: + genCases_f16_a = f16Random(); + genCases_f16_b = f16Random(); + break; + case 1: + genCases_f16_a = currentA; + genCases_f16_b = f16Random(); + break; + case 3: + genCases_f16_a = f16Random(); + genCases_f16_b = currentB; + break; + case 5: + genCases_f16_a = currentA; + genCases_f16_b = currentB; + genCases_done = sequenceA.done & sequenceB.done; + subcase = -1; + break; + } + } else { + switch ( subcase ) { + case 0: + genCases_f16_a = f16Random(); + genCases_f16_b = f16Random(); + break; + case 1: + if ( sequenceB.done ) { + sequenceB.done = false; + currentA = f16NextQInP2( &sequenceA ); + } + genCases_f16_a = currentA; + genCases_f16_b = f16NextQInP2( &sequenceB ); + genCases_done = sequenceA.done & sequenceB.done; + subcase = -1; + break; + } + } + ++subcase; + +} + +void genCases_f16_abc_init( void ) +{ + + sequenceA.expNum = 0; + sequenceA.term1Num = 0; + sequenceA.term2Num = 0; + sequenceA.done = false; + sequenceB.expNum = 0; + sequenceB.term1Num = 0; + sequenceB.term2Num = 0; + sequenceB.done = false; + sequenceC.expNum = 0; + sequenceC.term1Num = 0; + sequenceC.term2Num = 0; + sequenceC.done = false; + subcase = 0; + if ( genCases_level == 1 ) { + genCases_total = 9 * f16NumQInP1 * f16NumQInP1 * f16NumQInP1; + currentA = f16NextQInP1( &sequenceA ); + currentB = f16NextQInP1( &sequenceB ); + } else { + genCases_total = 2 * f16NumQInP2 * f16NumQInP2 * f16NumQInP2; + currentA = f16NextQInP2( &sequenceA ); + currentB = f16NextQInP2( &sequenceB ); + } + genCases_done = false; + +} + +void genCases_f16_abc_next( void ) +{ + + if ( genCases_level == 1 ) { + switch ( subcase ) { + case 0: + if ( sequenceC.done ) { + sequenceC.done = false; + if ( sequenceB.done ) { + sequenceB.done = false; + currentA = f16NextQInP1( &sequenceA ); + } + currentB = f16NextQInP1( &sequenceB ); + } + currentC = f16NextQInP1( &sequenceC ); + genCases_f16_a = f16Random(); + genCases_f16_b = f16Random(); + genCases_f16_c = currentC; + break; + case 1: + genCases_f16_a = currentA; + genCases_f16_b = currentB; + genCases_f16_c = f16Random(); + break; + case 2: + genCases_f16_a = f16Random(); + genCases_f16_b = f16Random(); + genCases_f16_c = f16Random(); + break; + case 3: + genCases_f16_a = f16Random(); + genCases_f16_b = currentB; + genCases_f16_c = currentC; + break; + case 4: + genCases_f16_a = currentA; + genCases_f16_b = f16Random(); + genCases_f16_c = f16Random(); + break; + case 5: + genCases_f16_a = f16Random(); + genCases_f16_b = currentB; + genCases_f16_c = f16Random(); + break; + case 6: + genCases_f16_a = currentA; + genCases_f16_b = f16Random(); + genCases_f16_c = currentC; + break; + case 7: + genCases_f16_a = f16Random(); + genCases_f16_b = f16Random(); + genCases_f16_c = f16Random(); + break; + case 8: + genCases_f16_a = currentA; + genCases_f16_b = currentB; + genCases_f16_c = currentC; + genCases_done = sequenceA.done & sequenceB.done & sequenceC.done; + subcase = -1; + break; + } + } else { + switch ( subcase ) { + case 0: + genCases_f16_a = f16Random(); + genCases_f16_b = f16Random(); + genCases_f16_c = f16Random(); + break; + case 1: + if ( sequenceC.done ) { + sequenceC.done = false; + if ( sequenceB.done ) { + sequenceB.done = false; + currentA = f16NextQInP2( &sequenceA ); + } + currentB = f16NextQInP2( &sequenceB ); + } + genCases_f16_a = currentA; + genCases_f16_b = currentB; + genCases_f16_c = f16NextQInP2( &sequenceC ); + genCases_done = sequenceA.done & sequenceB.done & sequenceC.done; + subcase = -1; + break; + } + } + ++subcase; + +} + + diff --git a/testfloat3/testfloat3.c b/testfloat3/testfloat3.c index 0758f28..82f5a57 100644 --- a/testfloat3/testfloat3.c +++ b/testfloat3/testfloat3.c @@ -1,5 +1,26 @@ #include "testfloat3.h" +void init_a_f16(void) { genCases_f16_a_init(); } +void gen_a_f16(float16_t *a) { + genCases_f16_a_next(); + *a = genCases_f16_a; +} + +void init_ab_f16(void) { genCases_f16_ab_init(); } +void gen_ab_f16(float16_t *a, float16_t *b) { + genCases_f16_ab_next(); + *a = genCases_f16_a; + *b = genCases_f16_b; +} + +void init_abc_f16(void) { genCases_f16_abc_init(); } +void gen_abc_f16(float16_t *a, float16_t *b, float16_t *c) { + genCases_f16_abc_next(); + *a = genCases_f16_a; + *b = genCases_f16_b; + *c = genCases_f16_c; +} + void init_a_f32(void) { genCases_f32_a_init(); } void gen_a_f32(float32_t *a) { genCases_f32_a_next(); diff --git a/testfloat3/testfloat3.go b/testfloat3/testfloat3.go index 535dd76..019d3e9 100644 --- a/testfloat3/testfloat3.go +++ b/testfloat3/testfloat3.go @@ -10,6 +10,35 @@ func SetLevel(level int) { C.genCases_setLevel(C.int(level)); } +func InitF16(numops int) { + C.srand(2024); + switch numops { + case 1: + C.init_a_f16() + case 2: + C.init_ab_f16() + case 3: + C.init_abc_f16() + } +} + +func GenF16(numops int) []uint16 { + var a, b, c uint16 = 0, 0, 0 + switch numops { + case 1: + C.gen_a_f16((*C.uint16_t)(&a)) + return []uint16{a} + case 2: + C.gen_ab_f16((*C.uint16_t)(&a), (*C.uint16_t)(&b)) + return []uint16{a, b} + case 3: + C.gen_abc_f16((*C.uint16_t)(&a), (*C.uint16_t)(&b), (*C.uint16_t)(&c)) + return []uint16{a, b, c} + } + + return []uint16{} +} + func InitF32(numops int) { C.srand(2024); switch numops { diff --git a/testfloat3/testfloat3.h b/testfloat3/testfloat3.h index 5cddc20..98e0316 100644 --- a/testfloat3/testfloat3.h +++ b/testfloat3/testfloat3.h @@ -2,6 +2,15 @@ #include "genCases.h" +void init_a_f16(void); +void gen_a_f16(float16_t *); + +void init_ab_f16(void); +void gen_ab_f16(float16_t *, float16_t *); + +void init_abc_f16(void); +void gen_abc_f16(float16_t *, float16_t *, float16_t *); + void init_a_f32(void); void gen_a_f32(float32_t *);