mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-11 08:54:33 +00:00
Misc: Fix building with GCC
Not that anyone should be doing it.
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
// SPDX-FileCopyrightText: 2019-2025 Connor McLaughlin <stenzek@gmail.com>
|
||||
// SPDX-License-Identifier: CC-BY-NC-ND-4.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "log.h"
|
||||
#include "small_string.h"
|
||||
#include "string_util.h"
|
||||
#include "types.h"
|
||||
|
||||
#include "common/small_string.h"
|
||||
|
||||
#include "ryml.hpp"
|
||||
#include <fmt/format.h>
|
||||
#include <ryml.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <stenzek@gmail.com>
|
||||
// SPDX-FileCopyrightText: 2019-2025 Connor McLaughlin <stenzek@gmail.com>
|
||||
// SPDX-License-Identifier: CC-BY-NC-ND-4.0
|
||||
|
||||
#pragma once
|
||||
@@ -12,7 +12,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "zip.h"
|
||||
#include <fmt/format.h>
|
||||
#include <zip.h>
|
||||
|
||||
namespace ZipHelpers {
|
||||
|
||||
|
||||
@@ -521,7 +521,7 @@ ALWAYS_INLINE_RELEASE bool CPU::IsCop0ExecutionBreakpointUnmasked()
|
||||
const u32 bpc = g_state.cop0_regs.BPC;
|
||||
const u32 bpcm = g_state.cop0_regs.BPCM;
|
||||
const u32 masked_bpc = bpc & bpcm;
|
||||
for (const auto [range_start, range_end] : code_address_ranges)
|
||||
for (const auto& [range_start, range_end] : code_address_ranges)
|
||||
{
|
||||
if (masked_bpc >= (range_start & bpcm) && masked_bpc <= (range_end & bpcm))
|
||||
return true;
|
||||
@@ -816,7 +816,7 @@ const std::array<CPU::DebuggerRegisterListEntry, CPU::NUM_DEBUGGER_REGISTER_LIST
|
||||
{"ZSF4", &CPU::g_state.gte_regs.r32[62]},
|
||||
{"FLAG", &CPU::g_state.gte_regs.r32[63]}}};
|
||||
|
||||
ALWAYS_INLINE static constexpr bool AddOverflow(u32 old_value, u32 add_value, u32* new_value)
|
||||
ALWAYS_INLINE static bool AddOverflow(u32 old_value, u32 add_value, u32* new_value)
|
||||
{
|
||||
#if defined(__clang__) || defined(__GNUC__)
|
||||
return __builtin_add_overflow(static_cast<s32>(old_value), static_cast<s32>(add_value),
|
||||
@@ -827,7 +827,7 @@ ALWAYS_INLINE static constexpr bool AddOverflow(u32 old_value, u32 add_value, u3
|
||||
#endif
|
||||
}
|
||||
|
||||
ALWAYS_INLINE static constexpr bool SubOverflow(u32 old_value, u32 sub_value, u32* new_value)
|
||||
ALWAYS_INLINE static bool SubOverflow(u32 old_value, u32 sub_value, u32* new_value)
|
||||
{
|
||||
#if defined(__clang__) || defined(__GNUC__)
|
||||
return __builtin_sub_overflow(static_cast<s32>(old_value), static_cast<s32>(sub_value),
|
||||
|
||||
Reference in New Issue
Block a user