Merge pull request #9289 from liamwhite/fruit-company

general: fix compile for Apple Clang
This commit is contained in:
liamwhite 2022-12-03 12:09:21 -05:00 committed by GitHub
commit 22aff09b33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
79 changed files with 952 additions and 37 deletions

View file

@ -8,6 +8,7 @@
#include <fmt/format.h>
#include "common/polyfill_ranges.h"
#include "shader_recompiler/frontend/ir/type.h"
namespace Shader::IR {

View file

@ -9,6 +9,7 @@
#include <fmt/format.h>
#include "common/polyfill_ranges.h"
#include "shader_recompiler/exception.h"
#include "shader_recompiler/frontend/maxwell/control_flow.h"
#include "shader_recompiler/frontend/maxwell/decode.h"

View file

@ -7,6 +7,7 @@
#include <memory>
#include "common/common_types.h"
#include "common/polyfill_ranges.h"
#include "shader_recompiler/exception.h"
#include "shader_recompiler/frontend/maxwell/decode.h"
#include "shader_recompiler/frontend/maxwell/opcodes.h"

View file

@ -12,6 +12,7 @@
#include <boost/intrusive/list.hpp>
#include "common/polyfill_ranges.h"
#include "shader_recompiler/environment.h"
#include "shader_recompiler/frontend/ir/basic_block.h"
#include "shader_recompiler/frontend/ir/ir_emitter.h"

View file

@ -176,12 +176,13 @@ void TranslateF2I(TranslatorVisitor& v, u64 insn, const IR::F16F32F64& src_a) {
(f2i.src_format == SrcFormat::F64) != (f2i.dest_format == DestFormat::I64);
if (special_nan_cases) {
if (f2i.dest_format == DestFormat::I32) {
constexpr u32 nan_value = 0x8000'0000U;
handled_special_case = true;
result = IR::U32{v.ir.Select(v.ir.FPIsNan(op_a), v.ir.Imm32(0x8000'0000U), result)};
result = IR::U32{v.ir.Select(v.ir.FPIsNan(op_a), v.ir.Imm32(nan_value), result)};
} else if (f2i.dest_format == DestFormat::I64) {
constexpr u64 nan_value = 0x8000'0000'0000'0000ULL;
handled_special_case = true;
result = IR::U64{
v.ir.Select(v.ir.FPIsNan(op_a), v.ir.Imm64(0x8000'0000'0000'0000UL), result)};
result = IR::U64{v.ir.Select(v.ir.FPIsNan(op_a), v.ir.Imm64(nan_value), result)};
}
}
if (!handled_special_case && is_signed) {