-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libspike] add "disable NaN normalization" patch
- Loading branch information
Showing
3 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
nix/patches/spike/0001-enforce-lanewise-order-for-unordered-reduce.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From 0ad6da899c20df0ce6120bc4ebd32edf01bdcd36 Mon Sep 17 00:00:00 2001 | ||
From: SharzyL <[email protected]> | ||
Date: Sun, 25 Feb 2024 01:28:18 +0800 | ||
Subject: [PATCH] enforce lanewise order for unordered reduce | ||
Subject: [PATCH 1/2] enforce lanewise order for unordered reduce | ||
|
||
--- | ||
riscv/insns/vfredusum_vs.h | 2 +- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
From 09a503dc94382798a1ee2f23b4b6894a12bc8207 Mon Sep 17 00:00:00 2001 | ||
From: SharzyL <[email protected]> | ||
Date: Mon, 26 Aug 2024 20:08:47 +0800 | ||
Subject: [PATCH 2/2] disable NaN normalization | ||
|
||
--- | ||
riscv/v_ext_macros.h | 6 +++--- | ||
1 file changed, 3 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/riscv/v_ext_macros.h b/riscv/v_ext_macros.h | ||
index e5ea1045..202fde9c 100644 | ||
--- a/riscv/v_ext_macros.h | ||
+++ b/riscv/v_ext_macros.h | ||
@@ -1518,7 +1518,7 @@ reg_t index[P.VU.vlmax]; \ | ||
softfloat_exceptionFlags |= softfloat_flag_invalid; \ | ||
set_fp_exceptions; \ | ||
} \ | ||
- P.VU.elt<uint16_t>(rd_num, 0, true) = defaultNaNF16UI; \ | ||
+ P.VU.elt<uint16_t>(rd_num, 0, true) = vd_0.v; \ | ||
} else { \ | ||
P.VU.elt<uint16_t>(rd_num, 0, true) = vd_0.v; \ | ||
} \ | ||
@@ -1531,7 +1531,7 @@ reg_t index[P.VU.vlmax]; \ | ||
softfloat_exceptionFlags |= softfloat_flag_invalid; \ | ||
set_fp_exceptions; \ | ||
} \ | ||
- P.VU.elt<uint32_t>(rd_num, 0, true) = defaultNaNF32UI; \ | ||
+ P.VU.elt<uint32_t>(rd_num, 0, true) = vd_0.v; \ | ||
} else { \ | ||
P.VU.elt<uint32_t>(rd_num, 0, true) = vd_0.v; \ | ||
} \ | ||
@@ -1544,7 +1544,7 @@ reg_t index[P.VU.vlmax]; \ | ||
softfloat_exceptionFlags |= softfloat_flag_invalid; \ | ||
set_fp_exceptions; \ | ||
} \ | ||
- P.VU.elt<uint64_t>(rd_num, 0, true) = defaultNaNF64UI; \ | ||
+ P.VU.elt<uint64_t>(rd_num, 0, true) = vd_0.v; \ | ||
} else { \ | ||
P.VU.elt<uint64_t>(rd_num, 0, true) = vd_0.v; \ | ||
} \ | ||
-- | ||
2.43.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters