mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
@ -690,7 +690,8 @@ void ARM64XEmitter::SetJumpTarget(FixupBranch const& branch)
|
||||
case FixupBranch::Type::CBZ:
|
||||
{
|
||||
ASSERT_MSG(DYNA_REC, IsInRangeImm19(distance),
|
||||
"Branch type {}: Received too large distance: {}", branch.type, distance);
|
||||
"Branch type {}: Received too large distance: {}", static_cast<int>(branch.type),
|
||||
distance);
|
||||
const bool b64Bit = Is64Bit(branch.reg);
|
||||
inst = (b64Bit << 31) | (0x1A << 25) | (Not << 24) | (MaskImm19(distance) << 5) |
|
||||
DecodeReg(branch.reg);
|
||||
@ -698,7 +699,8 @@ void ARM64XEmitter::SetJumpTarget(FixupBranch const& branch)
|
||||
break;
|
||||
case FixupBranch::Type::BConditional:
|
||||
ASSERT_MSG(DYNA_REC, IsInRangeImm19(distance),
|
||||
"Branch type {}: Received too large distance: {}", branch.type, distance);
|
||||
"Branch type {}: Received too large distance: {}", static_cast<int>(branch.type),
|
||||
distance);
|
||||
inst = (0x2A << 25) | (MaskImm19(distance) << 5) | branch.cond;
|
||||
break;
|
||||
case FixupBranch::Type::TBNZ:
|
||||
@ -707,19 +709,22 @@ void ARM64XEmitter::SetJumpTarget(FixupBranch const& branch)
|
||||
case FixupBranch::Type::TBZ:
|
||||
{
|
||||
ASSERT_MSG(DYNA_REC, IsInRangeImm14(distance),
|
||||
"Branch type {}: Received too large distance: {}", branch.type, distance);
|
||||
"Branch type {}: Received too large distance: {}", static_cast<int>(branch.type),
|
||||
distance);
|
||||
inst = ((branch.bit & 0x20) << 26) | (0x1B << 25) | (Not << 24) | ((branch.bit & 0x1F) << 19) |
|
||||
(MaskImm14(distance) << 5) | DecodeReg(branch.reg);
|
||||
}
|
||||
break;
|
||||
case FixupBranch::Type::B:
|
||||
ASSERT_MSG(DYNA_REC, IsInRangeImm26(distance),
|
||||
"Branch type {}: Received too large distance: {}", branch.type, distance);
|
||||
"Branch type {}: Received too large distance: {}", static_cast<int>(branch.type),
|
||||
distance);
|
||||
inst = (0x5 << 26) | MaskImm26(distance);
|
||||
break;
|
||||
case FixupBranch::Type::BL:
|
||||
ASSERT_MSG(DYNA_REC, IsInRangeImm26(distance),
|
||||
"Branch type {}: Received too large distance: {}", branch.type, distance);
|
||||
"Branch type {}: Received too large distance: {}", static_cast<int>(branch.type),
|
||||
distance);
|
||||
inst = (0x25 << 26) | MaskImm26(distance);
|
||||
break;
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ struct fmt::formatter<BitField<position, bits, T, S>>
|
||||
fmt::formatter<T> m_formatter;
|
||||
constexpr auto parse(format_parse_context& ctx) { return m_formatter.parse(ctx); }
|
||||
template <typename FormatContext>
|
||||
auto format(const BitField<position, bits, T, S>& bitfield, FormatContext& ctx)
|
||||
auto format(const BitField<position, bits, T, S>& bitfield, FormatContext& ctx) const
|
||||
{
|
||||
return m_formatter.format(bitfield.Value(), ctx);
|
||||
}
|
||||
@ -479,7 +479,7 @@ struct fmt::formatter<BitFieldArrayRef<position, bits, size, T, S>>
|
||||
fmt::formatter<T> m_formatter;
|
||||
constexpr auto parse(format_parse_context& ctx) { return m_formatter.parse(ctx); }
|
||||
template <typename FormatContext>
|
||||
auto format(const BitFieldArrayRef<position, bits, size, T, S>& ref, FormatContext& ctx)
|
||||
auto format(const BitFieldArrayRef<position, bits, size, T, S>& ref, FormatContext& ctx) const
|
||||
{
|
||||
return m_formatter.format(ref.Value(), ctx);
|
||||
}
|
||||
@ -491,7 +491,8 @@ struct fmt::formatter<BitFieldArrayConstRef<position, bits, size, T, S>>
|
||||
fmt::formatter<T> m_formatter;
|
||||
constexpr auto parse(format_parse_context& ctx) { return m_formatter.parse(ctx); }
|
||||
template <typename FormatContext>
|
||||
auto format(const BitFieldArrayConstRef<position, bits, size, T, S>& ref, FormatContext& ctx)
|
||||
auto format(const BitFieldArrayConstRef<position, bits, size, T, S>& ref,
|
||||
FormatContext& ctx) const
|
||||
{
|
||||
return m_formatter.format(ref.Value(), ctx);
|
||||
}
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include <winternl.h>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <fmt/xchar.h>
|
||||
|
||||
#include "Common/CommonFuncs.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
|
@ -23,7 +23,7 @@
|
||||
* template <>
|
||||
* struct fmt::formatter<Foo> : EnumFormatter<Foo::C>
|
||||
* {
|
||||
* formatter() : EnumFormatter({"A", "B", "C"}) {}
|
||||
* constexpr formatter() : EnumFormatter({"A", "B", "C"}) {}
|
||||
* };
|
||||
*
|
||||
* enum class Bar
|
||||
@ -39,7 +39,7 @@
|
||||
* // using std::array here fails due to nullptr not being const char*, at least in MSVC
|
||||
* // (but only when a field is used; directly in the constructor is OK)
|
||||
* static constexpr array_type names = {"D", "E", nullptr, "F"};
|
||||
* formatter() : EnumFormatter(names) {}
|
||||
* constexpr formatter() : EnumFormatter(names) {}
|
||||
* };
|
||||
*/
|
||||
template <auto last_member, typename = decltype(last_member)>
|
||||
@ -62,7 +62,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename FormatContext>
|
||||
auto format(const T& e, FormatContext& ctx)
|
||||
auto format(const T& e, FormatContext& ctx) const
|
||||
{
|
||||
const auto value_s = static_cast<std::underlying_type_t<T>>(e); // Possibly signed
|
||||
const auto value_u = static_cast<std::make_unsigned_t<T>>(value_s); // Always unsigned
|
||||
|
@ -25,7 +25,7 @@ struct fmt::formatter<Common::HRWrap>
|
||||
{
|
||||
constexpr auto parse(fmt::format_parse_context& ctx) { return ctx.begin(); }
|
||||
template <typename FormatContext>
|
||||
auto format(const Common::HRWrap& hr, FormatContext& ctx)
|
||||
auto format(const Common::HRWrap& hr, FormatContext& ctx) const
|
||||
{
|
||||
return fmt::format_to(ctx.out(), "{} ({:#010x})", Common::GetHResultMessage(hr.m_hr),
|
||||
static_cast<u32>(hr.m_hr));
|
||||
|
@ -228,7 +228,8 @@ HttpRequest::Response HttpRequest::Impl::Fetch(const std::string& url, Method me
|
||||
else
|
||||
{
|
||||
ERROR_LOG_FMT(COMMON, "Failed to {} {}: server replied with code {} and body\n\x1b[0m{:.{}}",
|
||||
type, url, response_code, buffer.data(), static_cast<int>(buffer.size()));
|
||||
type, url, response_code, reinterpret_cast<char*>(buffer.data()),
|
||||
static_cast<int>(buffer.size()));
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ bool SavePNG(const std::string& path, const u8* input, ImageByteFormat format, u
|
||||
byte_per_pixel = 4;
|
||||
break;
|
||||
default:
|
||||
ASSERT_MSG(FRAMEDUMP, false, "Invalid format {}", format);
|
||||
ASSERT_MSG(FRAMEDUMP, false, "Invalid format {}", static_cast<int>(format));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ void SetAbortOnPanicAlert(bool should_abort);
|
||||
template <typename... Args>
|
||||
std::string FmtFormatT(const char* string, Args&&... args)
|
||||
{
|
||||
return fmt::format(Common::GetStringT(string), std::forward<Args>(args)...);
|
||||
return fmt::format(fmt::runtime(Common::GetStringT(string)), std::forward<Args>(args)...);
|
||||
}
|
||||
} // namespace Common
|
||||
|
||||
|
@ -194,7 +194,7 @@ void TraversalClient::HandleServerPacket(TraversalPacket* packet)
|
||||
break;
|
||||
}
|
||||
default:
|
||||
WARN_LOG_FMT(NETPLAY, "Received unknown packet with type {}", packet->type);
|
||||
WARN_LOG_FMT(NETPLAY, "Received unknown packet with type {}", static_cast<int>(packet->type));
|
||||
break;
|
||||
}
|
||||
if (packet->type != TraversalPacketType::Ack)
|
||||
|
Reference in New Issue
Block a user