-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ppc64le: patch to avoid missing issignaling
- Loading branch information
Showing
3 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
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
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
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,24 @@ | ||
diff --git a/deps/v8/src/execution/ppc/simulator-ppc.cc b/deps/v8/src/execution/ppc/simulator-ppc.cc | ||
index 97e47bc0..3ac0cff8 100644 | ||
--- a/deps/v8/src/execution/ppc/simulator-ppc.cc | ||
+++ b/deps/v8/src/execution/ppc/simulator-ppc.cc | ||
@@ -4751,7 +4751,8 @@ void Simulator::ExecuteGeneric(Instruction* instr) { | ||
bit_cast<float, uint32_t>(static_cast<uint32_t>(double_bits >> 32)); | ||
double_bits = bit_cast<uint64_t, double>(static_cast<double>(f)); | ||
// Preserve snan. | ||
- if (issignaling(f)) { | ||
+ float snan = std::numeric_limits<float>::signaling_NaN(); | ||
+ if (std::memcmp(&snan, &f, sizeof(float)) == 0) { | ||
double_bits &= 0xFFF7FFFFFFFFFFFFU; // Clear bit 51. | ||
} | ||
set_d_register(t, double_bits); | ||
@@ -4764,7 +4765,8 @@ void Simulator::ExecuteGeneric(Instruction* instr) { | ||
uint64_t float_bits = static_cast<uint64_t>( | ||
bit_cast<uint32_t, float>(static_cast<float>(b_val))); | ||
// Preserve snan. | ||
- if (issignaling(b_val)) { | ||
+ double snan = std::numeric_limits<double>::signaling_NaN(); | ||
+ if (std::memcmp(&snan, &b_val, sizeof(double)) == 0) { | ||
float_bits &= 0xFFBFFFFFU; // Clear bit 22. | ||
} | ||
// fp result is placed in both 32bit halfs of the dst. |