diff options
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell')
4 files changed, 7 insertions, 3 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/control_flow.cpp b/src/shader_recompiler/frontend/maxwell/control_flow.cpp index 6939692cd..dce414cb4 100644 --- a/src/shader_recompiler/frontend/maxwell/control_flow.cpp +++ b/src/shader_recompiler/frontend/maxwell/control_flow.cpp | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | #include <fmt/format.h> | 10 | #include <fmt/format.h> |
| 11 | 11 | ||
| 12 | #include "common/polyfill_ranges.h" | ||
| 12 | #include "shader_recompiler/exception.h" | 13 | #include "shader_recompiler/exception.h" |
| 13 | #include "shader_recompiler/frontend/maxwell/control_flow.h" | 14 | #include "shader_recompiler/frontend/maxwell/control_flow.h" |
| 14 | #include "shader_recompiler/frontend/maxwell/decode.h" | 15 | #include "shader_recompiler/frontend/maxwell/decode.h" |
diff --git a/src/shader_recompiler/frontend/maxwell/decode.cpp b/src/shader_recompiler/frontend/maxwell/decode.cpp index 455c91470..774f65bc5 100644 --- a/src/shader_recompiler/frontend/maxwell/decode.cpp +++ b/src/shader_recompiler/frontend/maxwell/decode.cpp | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | #include <memory> | 7 | #include <memory> |
| 8 | 8 | ||
| 9 | #include "common/common_types.h" | 9 | #include "common/common_types.h" |
| 10 | #include "common/polyfill_ranges.h" | ||
| 10 | #include "shader_recompiler/exception.h" | 11 | #include "shader_recompiler/exception.h" |
| 11 | #include "shader_recompiler/frontend/maxwell/decode.h" | 12 | #include "shader_recompiler/frontend/maxwell/decode.h" |
| 12 | #include "shader_recompiler/frontend/maxwell/opcodes.h" | 13 | #include "shader_recompiler/frontend/maxwell/opcodes.h" |
diff --git a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp index ce42475d4..80c90fe6a 100644 --- a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp +++ b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | #include <boost/intrusive/list.hpp> | 13 | #include <boost/intrusive/list.hpp> |
| 14 | 14 | ||
| 15 | #include "common/polyfill_ranges.h" | ||
| 15 | #include "shader_recompiler/environment.h" | 16 | #include "shader_recompiler/environment.h" |
| 16 | #include "shader_recompiler/frontend/ir/basic_block.h" | 17 | #include "shader_recompiler/frontend/ir/basic_block.h" |
| 17 | #include "shader_recompiler/frontend/ir/ir_emitter.h" | 18 | #include "shader_recompiler/frontend/ir/ir_emitter.h" |
diff --git a/src/shader_recompiler/frontend/maxwell/translate/impl/floating_point_conversion_integer.cpp b/src/shader_recompiler/frontend/maxwell/translate/impl/floating_point_conversion_integer.cpp index 4942878b9..85c18d942 100644 --- a/src/shader_recompiler/frontend/maxwell/translate/impl/floating_point_conversion_integer.cpp +++ b/src/shader_recompiler/frontend/maxwell/translate/impl/floating_point_conversion_integer.cpp | |||
| @@ -176,12 +176,13 @@ void TranslateF2I(TranslatorVisitor& v, u64 insn, const IR::F16F32F64& src_a) { | |||
| 176 | (f2i.src_format == SrcFormat::F64) != (f2i.dest_format == DestFormat::I64); | 176 | (f2i.src_format == SrcFormat::F64) != (f2i.dest_format == DestFormat::I64); |
| 177 | if (special_nan_cases) { | 177 | if (special_nan_cases) { |
| 178 | if (f2i.dest_format == DestFormat::I32) { | 178 | if (f2i.dest_format == DestFormat::I32) { |
| 179 | constexpr u32 nan_value = 0x8000'0000U; | ||
| 179 | handled_special_case = true; | 180 | handled_special_case = true; |
| 180 | result = IR::U32{v.ir.Select(v.ir.FPIsNan(op_a), v.ir.Imm32(0x8000'0000U), result)}; | 181 | result = IR::U32{v.ir.Select(v.ir.FPIsNan(op_a), v.ir.Imm32(nan_value), result)}; |
| 181 | } else if (f2i.dest_format == DestFormat::I64) { | 182 | } else if (f2i.dest_format == DestFormat::I64) { |
| 183 | constexpr u64 nan_value = 0x8000'0000'0000'0000ULL; | ||
| 182 | handled_special_case = true; | 184 | handled_special_case = true; |
| 183 | result = IR::U64{ | 185 | result = IR::U64{v.ir.Select(v.ir.FPIsNan(op_a), v.ir.Imm64(nan_value), result)}; |
| 184 | v.ir.Select(v.ir.FPIsNan(op_a), v.ir.Imm64(0x8000'0000'0000'0000UL), result)}; | ||
| 185 | } | 186 | } |
| 186 | } | 187 | } |
| 187 | if (!handled_special_case && is_signed) { | 188 | if (!handled_special_case && is_signed) { |