Enable -Wunused-parameter

This commit is contained in:
Nekotekina 2021-03-05 22:05:37 +03:00
parent 7205a93751
commit 87af905018
102 changed files with 1571 additions and 1463 deletions

View file

@ -217,7 +217,7 @@ struct cf_t<void>
} }
template<typename T> template<typename T>
static constexpr auto extract(const T& data) -> decltype(+T()) static constexpr auto extract(const T&) -> decltype(+T())
{ {
return 0; return 0;
} }
@ -237,7 +237,7 @@ struct ff_t : bf_base<T, N>
using vtype = typename ff_t::vtype; using vtype = typename ff_t::vtype;
// Return constant value // Return constant value
static constexpr vtype extract(const type& data) static constexpr vtype extract(const type&)
{ {
static_assert((V & ff_t::vmask) == V, "ff_t<> error: V out of bounds"); static_assert((V & ff_t::vmask) == V, "ff_t<> error: V out of bounds");
return V; return V;

View file

@ -1328,7 +1328,7 @@ fs::file::file(const void* ptr, usz size)
{ {
} }
bool trunc(u64 length) override bool trunc(u64) override
{ {
return false; return false;
} }
@ -1349,7 +1349,7 @@ fs::file::file(const void* ptr, usz size)
return 0; return 0;
} }
u64 write(const void* buffer, u64 count) override u64 write(const void*, u64) override
{ {
return 0; return 0;
} }
@ -1854,7 +1854,7 @@ fs::file fs::make_gather(std::vector<fs::file> files)
return result; return result;
} }
bool trunc(u64 length) override bool trunc(u64) override
{ {
return false; return false;
} }
@ -1897,7 +1897,7 @@ fs::file fs::make_gather(std::vector<fs::file> files)
return 0; return 0;
} }
u64 write(const void* buffer, u64 size) override u64 write(const void*, u64) override
{ {
return 0; return 0;
} }

View file

@ -143,7 +143,7 @@ asmjit::Error jit_runtime::_add(void** dst, asmjit::CodeHolder* code) noexcept
return asmjit::kErrorOk; return asmjit::kErrorOk;
} }
asmjit::Error jit_runtime::_release(void* ptr) noexcept asmjit::Error jit_runtime::_release(void*) noexcept
{ {
return asmjit::kErrorOk; return asmjit::kErrorOk;
} }
@ -249,7 +249,7 @@ asmjit::Runtime& asmjit::get_global_runtime()
return asmjit::kErrorOk; return asmjit::kErrorOk;
} }
asmjit::Error _release(void* ptr) noexcept override asmjit::Error _release(void*) noexcept override
{ {
return asmjit::kErrorOk; return asmjit::kErrorOk;
} }
@ -281,6 +281,7 @@ asmjit::Runtime& asmjit::get_global_runtime()
#pragma GCC diagnostic ignored "-Wall" #pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wextra" #pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wold-style-cast" #pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif #endif
#include "llvm/Support/TargetSelect.h" #include "llvm/Support/TargetSelect.h"
#include "llvm/Support/FormattedStream.h" #include "llvm/Support/FormattedStream.h"
@ -294,12 +295,6 @@ asmjit::Runtime& asmjit::get_global_runtime()
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif
#ifdef _WIN32
#include <Windows.h>
#else
#include <sys/mman.h>
#endif
const bool jit_initialize = []() -> bool const bool jit_initialize = []() -> bool
{ {
llvm::InitializeNativeTarget(); llvm::InitializeNativeTarget();
@ -439,12 +434,12 @@ struct MemoryManager1 : llvm::RTDyldMemoryManager
return this->ptr + olda; return this->ptr + olda;
} }
u8* allocateCodeSection(uptr size, uint align, uint sec_id, llvm::StringRef sec_name) override u8* allocateCodeSection(uptr size, uint align, uint /*sec_id*/, llvm::StringRef /*sec_name*/) override
{ {
return allocate(code_ptr, size, align, utils::protection::wx); return allocate(code_ptr, size, align, utils::protection::wx);
} }
u8* allocateDataSection(uptr size, uint align, uint sec_id, llvm::StringRef sec_name, bool is_ro) override u8* allocateDataSection(uptr size, uint align, uint /*sec_id*/, llvm::StringRef /*sec_name*/, bool /*is_ro*/) override
{ {
return allocate(data_ptr, size, align, utils::protection::rw); return allocate(data_ptr, size, align, utils::protection::rw);
} }
@ -454,7 +449,7 @@ struct MemoryManager1 : llvm::RTDyldMemoryManager
return false; return false;
} }
void registerEHFrames(u8* addr, u64 load_addr, usz size) override void registerEHFrames(u8*, u64, usz) override
{ {
} }
@ -489,12 +484,12 @@ struct MemoryManager2 : llvm::RTDyldMemoryManager
return {addr, llvm::JITSymbolFlags::Exported}; return {addr, llvm::JITSymbolFlags::Exported};
} }
u8* allocateCodeSection(uptr size, uint align, uint sec_id, llvm::StringRef sec_name) override u8* allocateCodeSection(uptr size, uint align, uint /*sec_id*/, llvm::StringRef /*sec_name*/) override
{ {
return jit_runtime::alloc(size, align, true); return jit_runtime::alloc(size, align, true);
} }
u8* allocateDataSection(uptr size, uint align, uint sec_id, llvm::StringRef sec_name, bool is_ro) override u8* allocateDataSection(uptr size, uint align, uint /*sec_id*/, llvm::StringRef /*sec_name*/, bool /*is_ro*/) override
{ {
return jit_runtime::alloc(size, align, false); return jit_runtime::alloc(size, align, false);
} }
@ -504,7 +499,7 @@ struct MemoryManager2 : llvm::RTDyldMemoryManager
return false; return false;
} }
void registerEHFrames(u8* addr, u64 load_addr, usz size) override void registerEHFrames(u8*, u64, usz) override
{ {
} }

View file

@ -13,6 +13,7 @@
#pragma GCC diagnostic ignored "-Wall" #pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wextra" #pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wold-style-cast" #pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#include <asmjit/asmjit.h> #include <asmjit/asmjit.h>
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif
@ -178,6 +179,7 @@ inline FT build_function_asm(F&& builder)
#pragma GCC diagnostic ignored "-Wextra" #pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wold-style-cast" #pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wsuggest-override" #pragma GCC diagnostic ignored "-Wsuggest-override"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#ifdef __clang__ #ifdef __clang__
#pragma clang diagnostic ignored "-Winconsistent-missing-override" #pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif #endif

View file

@ -1752,7 +1752,7 @@ const bool s_exception_handler_set = []() -> bool
#else #else
static void signal_handler(int sig, siginfo_t* info, void* uct) noexcept static void signal_handler(int /*sig*/, siginfo_t* info, void* uct) noexcept
{ {
x64_context* context = static_cast<ucontext_t*>(uct); x64_context* context = static_cast<ucontext_t*>(uct);

View file

@ -308,7 +308,7 @@ public:
} }
template <atomic_wait::op Flags = atomic_wait::op::eq> template <atomic_wait::op Flags = atomic_wait::op::eq>
void wait(std::nullptr_t null = nullptr) noexcept void wait(std::nullptr_t /*null*/ = nullptr) noexcept
{ {
if (m_head == nullptr) if (m_head == nullptr)
{ {

File diff suppressed because it is too large Load diff

View file

@ -1,130 +1,134 @@
#pragma once #pragma once
#include <array> #include <array>
#include "utils.h" #include "utils.h"
#include "Utilities/File.h" #include "Utilities/File.h"
constexpr u32 SDAT_FLAG = 0x01000000; constexpr u32 SDAT_FLAG = 0x01000000;
constexpr u32 EDAT_COMPRESSED_FLAG = 0x00000001; constexpr u32 EDAT_COMPRESSED_FLAG = 0x00000001;
constexpr u32 EDAT_FLAG_0x02 = 0x00000002; constexpr u32 EDAT_FLAG_0x02 = 0x00000002;
constexpr u32 EDAT_ENCRYPTED_KEY_FLAG = 0x00000008; constexpr u32 EDAT_ENCRYPTED_KEY_FLAG = 0x00000008;
constexpr u32 EDAT_FLAG_0x10 = 0x00000010; constexpr u32 EDAT_FLAG_0x10 = 0x00000010;
constexpr u32 EDAT_FLAG_0x20 = 0x00000020; constexpr u32 EDAT_FLAG_0x20 = 0x00000020;
constexpr u32 EDAT_DEBUG_DATA_FLAG = 0x80000000; constexpr u32 EDAT_DEBUG_DATA_FLAG = 0x80000000;
struct loaded_npdrm_keys struct loaded_npdrm_keys
{ {
atomic_t<u128> devKlic{}; atomic_t<u128> devKlic{};
atomic_t<u128> rifKey{}; atomic_t<u128> rifKey{};
atomic_t<u32> npdrm_fds{0}; atomic_t<u32> npdrm_fds{0};
}; };
struct NPD_HEADER struct NPD_HEADER
{ {
u32 magic; u32 magic;
s32 version; s32 version;
s32 license; s32 license;
s32 type; s32 type;
u8 content_id[0x30]; u8 content_id[0x30];
u8 digest[0x10]; u8 digest[0x10];
u8 title_hash[0x10]; u8 title_hash[0x10];
u8 dev_hash[0x10]; u8 dev_hash[0x10];
u64 unk1; u64 unk1;
u64 unk2; u64 unk2;
}; };
struct EDAT_HEADER struct EDAT_HEADER
{ {
s32 flags; s32 flags;
s32 block_size; s32 block_size;
u64 file_size; u64 file_size;
}; };
// Decrypts full file, or null/empty file // Decrypts full file, or null/empty file
extern fs::file DecryptEDAT(const fs::file& input, const std::string& input_file_name, int mode, const std::string& rap_file_name, u8 *custom_klic, bool verbose); extern fs::file DecryptEDAT(const fs::file& input, const std::string& input_file_name, int mode, const std::string& rap_file_name, u8 *custom_klic, bool verbose);
extern bool VerifyEDATHeaderWithKLicense(const fs::file& input, const std::string& input_file_name, const u8* custom_klic, std::string* contentID); extern bool VerifyEDATHeaderWithKLicense(const fs::file& input, const std::string& input_file_name, const u8* custom_klic, std::string* contentID);
u128 GetEdatRifKeyFromRapFile(const fs::file& rap_file); u128 GetEdatRifKeyFromRapFile(const fs::file& rap_file);
struct EDATADecrypter final : fs::file_base struct EDATADecrypter final : fs::file_base
{ {
// file stream // file stream
const fs::file edata_file; const fs::file edata_file;
u64 file_size{0}; u64 file_size{0};
u32 total_blocks{0}; u32 total_blocks{0};
u64 pos{0}; u64 pos{0};
NPD_HEADER npdHeader; NPD_HEADER npdHeader;
EDAT_HEADER edatHeader; EDAT_HEADER edatHeader;
// Internal data buffers. // Internal data buffers.
std::unique_ptr<u8[]> data_buf; std::unique_ptr<u8[]> data_buf;
u64 data_buf_size{0}; u64 data_buf_size{0};
u128 dec_key{}; u128 dec_key{};
// edat usage // edat usage
u128 rif_key{}; u128 rif_key{};
u128 dev_key{}; u128 dev_key{};
public: public:
// SdataByFd usage // SdataByFd usage
EDATADecrypter(fs::file&& input) EDATADecrypter(fs::file&& input)
: edata_file(std::move(input)) {} : edata_file(std::move(input)) {}
// Edat usage // Edat usage
EDATADecrypter(fs::file&& input, const u128& dev_key, const u128& rif_key) EDATADecrypter(fs::file&& input, const u128& dev_key, const u128& rif_key)
: edata_file(std::move(input)) : edata_file(std::move(input))
, rif_key(rif_key) , rif_key(rif_key)
, dev_key(dev_key) {} , dev_key(dev_key) {}
~EDATADecrypter() override {} ~EDATADecrypter() override {}
// false if invalid // false if invalid
bool ReadHeader(); bool ReadHeader();
u64 ReadData(u64 pos, u8* data, u64 size); u64 ReadData(u64 pos, u8* data, u64 size);
fs::stat_t stat() override fs::stat_t stat() override
{ {
fs::stat_t stats; fs::stat_t stats;
stats.is_directory = false; stats.is_directory = false;
stats.is_writable = false; stats.is_writable = false;
stats.size = file_size; stats.size = file_size;
stats.atime = -1; stats.atime = -1;
stats.ctime = -1; stats.ctime = -1;
stats.mtime = -1; stats.mtime = -1;
return stats; return stats;
} }
bool trunc(u64 length) override
{ bool trunc(u64) override
return true; {
} return false;
u64 read(void* buffer, u64 size) override }
{
u64 bytesRead = ReadData(pos, static_cast<u8*>(buffer), size); u64 read(void* buffer, u64 size) override
pos += bytesRead; {
return bytesRead; u64 bytesRead = ReadData(pos, static_cast<u8*>(buffer), size);
} pos += bytesRead;
u64 write(const void* buffer, u64 size) override return bytesRead;
{ }
return 0;
} u64 write(const void*, u64) override
{
u64 seek(s64 offset, fs::seek_mode whence) override return 0;
{ }
const s64 new_pos =
whence == fs::seek_set ? offset : u64 seek(s64 offset, fs::seek_mode whence) override
whence == fs::seek_cur ? offset + pos : {
whence == fs::seek_end ? offset + size() : -1; const s64 new_pos =
whence == fs::seek_set ? offset :
if (new_pos < 0) whence == fs::seek_cur ? offset + pos :
{ whence == fs::seek_end ? offset + size() : -1;
fs::g_tls_error = fs::error::inval;
return -1; if (new_pos < 0)
} {
fs::g_tls_error = fs::error::inval;
pos = new_pos; return -1;
return pos; }
}
u64 size() override { return file_size; } pos = new_pos;
}; return pos;
}
u64 size() override { return file_size; }
};

View file

@ -116,7 +116,7 @@ bool cmac_hash_compare(unsigned char *key, int key_len, unsigned char *in, int i
return std::memcmp(out.get(), hash, hash_len) == 0; return std::memcmp(out.get(), hash, hash_len) == 0;
} }
void cmac_hash_forge(unsigned char *key, int key_len, unsigned char *in, int in_len, unsigned char *hash) void cmac_hash_forge(unsigned char *key, int /*key_len*/, unsigned char *in, int in_len, unsigned char *hash)
{ {
aes_context ctx; aes_context ctx;
aes_setkey_enc(&ctx, key, 128); aes_setkey_enc(&ctx, key, 128);

View file

@ -79,7 +79,7 @@ protected:
{ {
} }
virtual u32 DisAsmBranchTarget(const s32 imm) { return 0; }; virtual u32 DisAsmBranchTarget(s32 /*imm*/) { return 0; };
// TODO: Add builtin fmt helpper for best performance // TODO: Add builtin fmt helpper for best performance
template <typename T, std::enable_if_t<std::is_integral_v<T>, int> = 0> template <typename T, std::enable_if_t<std::is_integral_v<T>, int> = 0>

View file

@ -485,7 +485,7 @@ void cpu_thread::operator()()
} }
}); });
g_tls_log_control = [](const char* fmt, u64 progress) g_tls_log_control = [](const char*, u64 progress)
{ {
static thread_local bool wait_set = false; static thread_local bool wait_set = false;
@ -1006,7 +1006,7 @@ bool cpu_thread::suspend_work::push(cpu_thread* _this) noexcept
// Copy snapshot for finalization // Copy snapshot for finalization
u128 copy2 = copy; u128 copy2 = copy;
copy = cpu_counter::for_all_cpu(copy, [&](cpu_thread* cpu, u32 index) copy = cpu_counter::for_all_cpu(copy, [&](cpu_thread* cpu, u32 /*index*/)
{ {
if (cpu->state.fetch_add(cpu_flag::pause) & cpu_flag::wait) if (cpu->state.fetch_add(cpu_flag::pause) & cpu_flag::wait)
{ {
@ -1020,7 +1020,7 @@ bool cpu_thread::suspend_work::push(cpu_thread* _this) noexcept
while (copy) while (copy)
{ {
// Check only CPUs which haven't acknowledged their waiting state yet // Check only CPUs which haven't acknowledged their waiting state yet
copy = cpu_counter::for_all_cpu(copy, [&](cpu_thread* cpu, u32 index) copy = cpu_counter::for_all_cpu(copy, [&](cpu_thread* cpu, u32 /*index*/)
{ {
if (cpu->state & cpu_flag::wait) if (cpu->state & cpu_flag::wait)
{ {

View file

@ -208,7 +208,7 @@ public:
} }
template <u8 Prio = 0, typename F> template <u8 Prio = 0, typename F>
static suspend_work suspend_post(cpu_thread* _this, std::initializer_list<void*> hints, F& op) static suspend_work suspend_post(cpu_thread* /*_this*/, std::initializer_list<void*> hints, F& op)
{ {
constexpr u8 prio = Prio > 3 ? 3 : Prio; constexpr u8 prio = Prio > 3 ? 3 : Prio;

View file

@ -9,6 +9,7 @@
#pragma GCC diagnostic ignored "-Wall" #pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wextra" #pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wold-style-cast" #pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif #endif
#include "llvm/IR/LLVMContext.h" #include "llvm/IR/LLVMContext.h"
#include "llvm/IR/IRBuilder.h" #include "llvm/IR/IRBuilder.h"
@ -66,7 +67,7 @@ struct llvm_value_t
return llvm::Type::getVoidTy(context); return llvm::Type::getVoidTy(context);
} }
llvm::Value* eval(llvm::IRBuilder<>* ir) const llvm::Value* eval(llvm::IRBuilder<>*) const
{ {
return value; return value;
} }
@ -421,7 +422,7 @@ struct llvm_match_t
return value && ((value == args.value) && ...); return value && ((value == args.value) && ...);
} }
llvm::Value* eval(llvm::IRBuilder<>* ir) const llvm::Value* eval(llvm::IRBuilder<>*) const
{ {
return value; return value;
} }
@ -444,7 +445,7 @@ struct llvm_placeholder_t
using type = T; using type = T;
llvm::Value* eval(llvm::IRBuilder<>* ir) const llvm::Value* eval(llvm::IRBuilder<>*) const
{ {
return nullptr; return nullptr;
} }

View file

@ -1125,7 +1125,7 @@ error_code cellAudioInit()
return CELL_OK; return CELL_OK;
} }
error_code cellAudioQuit(ppu_thread& ppu) error_code cellAudioQuit()
{ {
cellAudio.warning("cellAudioQuit()"); cellAudio.warning("cellAudioQuit()");

View file

@ -36,6 +36,11 @@ void fmt_class_string<CellCameraError>::format(std::string& out, u64 arg)
}); });
} }
// Temporarily
#ifndef _MSC_VER
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
// ************** // **************
// * Prototypes * // * Prototypes *
// ************** // **************

View file

@ -26,6 +26,11 @@ void fmt_class_string<CellDaisyError>::format(std::string& out, u64 arg)
}); });
} }
// Temporarily
#ifndef _MSC_VER
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
using LFQueue2 = struct CellDaisyLFQueue2; using LFQueue2 = struct CellDaisyLFQueue2;
using Lock = struct CellDaisyLock; using Lock = struct CellDaisyLock;
using ScatterGatherInterlock = struct CellDaisyScatterGatherInterlock; using ScatterGatherInterlock = struct CellDaisyScatterGatherInterlock;

View file

@ -938,14 +938,14 @@ void ElementaryStream::reset()
raw_pos = 0; raw_pos = 0;
} }
void dmuxQueryAttr(u32 info_addr /* may be 0 */, vm::ptr<CellDmuxAttr> attr) void dmuxQueryAttr(u32 /* info_addr, may be 0 */, vm::ptr<CellDmuxAttr> attr)
{ {
attr->demuxerVerLower = 0x280000; // TODO: check values attr->demuxerVerLower = 0x280000; // TODO: check values
attr->demuxerVerUpper = 0x260000; attr->demuxerVerUpper = 0x260000;
attr->memSize = 0x10000; // 0x3e8e6 from ps3 attr->memSize = 0x10000; // 0x3e8e6 from ps3
} }
void dmuxQueryEsAttr(u32 info /* may be 0 */, vm::cptr<CellCodecEsFilterId> esFilterId, u32 esSpecificInfo, vm::ptr<CellDmuxEsAttr> attr) void dmuxQueryEsAttr(u32 /* info, may be 0 */, vm::cptr<CellCodecEsFilterId> esFilterId, u32 /*esSpecificInfo*/, vm::ptr<CellDmuxEsAttr> attr)
{ {
if (esFilterId->filterIdMajor >= 0xe0) if (esFilterId->filterIdMajor >= 0xe0)
{ {

View file

@ -66,7 +66,8 @@ error_code cellFontInitializeWithRevision(u64 revisionFlags, vm::ptr<CellFontCon
error_code cellFontGetRevisionFlags(vm::ptr<u64> revisionFlags) error_code cellFontGetRevisionFlags(vm::ptr<u64> revisionFlags)
{ {
UNIMPLEMENTED_FUNC(cellFont); cellFont.todo("cellFontGetRevisionFlags(*0x%x)", revisionFlags);
return CELL_OK; return CELL_OK;
} }
@ -118,7 +119,7 @@ error_code cellFontOpenFontFile(vm::ptr<CellFontLibrary> library, vm::cptr<char>
return ret; return ret;
} }
error_code cellFontOpenFontset(ppu_thread& ppu, vm::ptr<CellFontLibrary> library, vm::ptr<CellFontType> fontType, vm::ptr<CellFont> font) error_code cellFontOpenFontset(vm::ptr<CellFontLibrary> library, vm::ptr<CellFontType> fontType, vm::ptr<CellFont> font)
{ {
cellFont.warning("cellFontOpenFontset(library=*0x%x, fontType=*0x%x, font=*0x%x)", library, fontType, font); cellFont.warning("cellFontOpenFontset(library=*0x%x, fontType=*0x%x, font=*0x%x)", library, fontType, font);
@ -458,7 +459,7 @@ error_code cellFontGraphicsSetFontRGBA()
return CELL_OK; return CELL_OK;
} }
error_code cellFontOpenFontsetOnMemory(ppu_thread& ppu, vm::ptr<CellFontLibrary> library, vm::ptr<CellFontType> fontType, vm::ptr<CellFont> font) error_code cellFontOpenFontsetOnMemory(vm::ptr<CellFontLibrary> library, vm::ptr<CellFontType> fontType, vm::ptr<CellFont> font)
{ {
cellFont.todo("cellFontOpenFontsetOnMemory(library=*0x%x, fontType=*0x%x, font=*0x%x)", library, fontType, font); cellFont.todo("cellFontOpenFontsetOnMemory(library=*0x%x, fontType=*0x%x, font=*0x%x)", library, fontType, font);

View file

@ -11,6 +11,11 @@
LOG_CHANNEL(cellGifDec); LOG_CHANNEL(cellGifDec);
// Temporarily
#ifndef _MSC_VER
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
template <> template <>
void fmt_class_string<CellGifDecError>::format(std::string& out, u64 arg) void fmt_class_string<CellGifDecError>::format(std::string& out, u64 arg)
{ {

View file

@ -11,6 +11,11 @@
LOG_CHANNEL(cellJpgDec); LOG_CHANNEL(cellJpgDec);
// Temporarily
#ifndef _MSC_VER
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
template <> template <>
void fmt_class_string<CellJpgDecError>::format(std::string& out, u64 arg) void fmt_class_string<CellJpgDecError>::format(std::string& out, u64 arg)
{ {

View file

@ -343,7 +343,7 @@ s32 JISstoUTF8s(vm::cptr<u8> src, vm::cptr<s32> src_len, vm::ptr<u8> dst, vm::pt
s32 SjisZen2Han(vm::cptr<u16> src) s32 SjisZen2Han(vm::cptr<u16> src)
{ {
cellL10n.todo("SjisZen2Han()"); cellL10n.todo("SjisZen2Han(src=*0x%x)", src);
return ConversionOK; return ConversionOK;
} }

View file

@ -514,7 +514,7 @@ error_code cellMicInit()
return CELL_OK; return CELL_OK;
} }
error_code cellMicEnd(ppu_thread& ppu) error_code cellMicEnd()
{ {
cellMic.notice("cellMicEnd()"); cellMic.notice("cellMicEnd()");

View file

@ -19,6 +19,11 @@ typedef png_bytep iCCP_profile_type;
typedef png_charp iCCP_profile_type; typedef png_charp iCCP_profile_type;
#endif #endif
// Temporarily
#ifndef _MSC_VER
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
LOG_CHANNEL(cellPngDec); LOG_CHANNEL(cellPngDec);
template <> template <>

View file

@ -272,7 +272,7 @@ error_code cellRescSetSrc(s32 idx, vm::cptr<CellRescSrc> src)
return CELL_OK; return CELL_OK;
} }
error_code cellRescSetConvertAndFlip(ppu_thread& ppu, vm::ptr<CellGcmContextData> con, s32 idx) error_code cellRescSetConvertAndFlip(vm::ptr<CellGcmContextData> con, s32 idx)
{ {
cellResc.todo("cellRescSetConvertAndFlip(con=*0x%x, idx=0x%x)", con, idx); cellResc.todo("cellRescSetConvertAndFlip(con=*0x%x, idx=0x%x)", con, idx);

View file

@ -1129,7 +1129,8 @@ error_code cellRtcConvertLocalTimeToUtc(vm::cptr<CellRtcTick> pLocalTime, vm::pt
error_code cellRtcGetCurrentSecureTick(vm::ptr<CellRtcTick> tick) error_code cellRtcGetCurrentSecureTick(vm::ptr<CellRtcTick> tick)
{ {
UNIMPLEMENTED_FUNC(cellRtc); cellRtc.todo("cellRtcGetCurrentSecureTick(*0x%x)", tick);
return CELL_OK; return CELL_OK;
} }

View file

@ -88,12 +88,12 @@ error_code cellRudpInit(vm::ptr<CellRudpAllocator> allocator)
} }
else else
{ {
rudp.malloc = [](ppu_thread& ppu, u32 size) rudp.malloc = [](ppu_thread&, u32 size)
{ {
return vm::ptr<void>::make(vm::alloc(size, vm::main)); return vm::ptr<void>::make(vm::alloc(size, vm::main));
}; };
rudp.free = [](ppu_thread& ppu, vm::ptr<void> ptr) rudp.free = [](ppu_thread&, vm::ptr<void> ptr)
{ {
if (!vm::dealloc(ptr.addr(), vm::main)) if (!vm::dealloc(ptr.addr(), vm::main))
{ {

View file

@ -334,7 +334,7 @@ static std::string get_confirmation_message(u32 operation, const SaveDataEntry&
static s32 savedata_check_args(u32 operation, u32 version, vm::cptr<char> dirName, static s32 savedata_check_args(u32 operation, u32 version, vm::cptr<char> dirName,
u32 errDialog, PSetList setList, PSetBuf setBuf, PFuncList funcList, PFuncFixed funcFixed, PFuncStat funcStat, u32 errDialog, PSetList setList, PSetBuf setBuf, PFuncList funcList, PFuncFixed funcFixed, PFuncStat funcStat,
PFuncFile funcFile, u32 container, u32 unk_op_flags, vm::ptr<void> userdata, u32 userId, PFuncDone funcDone) PFuncFile funcFile, u32 /*container*/, u32 unk_op_flags, vm::ptr<void> /*userdata*/, u32 userId, PFuncDone /*funcDone*/)
{ {
if (version > CELL_SAVEDATA_VERSION_420) if (version > CELL_SAVEDATA_VERSION_420)
{ {
@ -2296,6 +2296,11 @@ error_code cellSaveDataListDelete(ppu_thread& ppu, PSetList setList, PSetBuf set
return savedata_op(ppu, SAVEDATA_OP_LIST_DELETE, 0, vm::null, 0, setList, setBuf, funcList, vm::null, vm::null, vm::null, container, 0x40, userdata, 0, funcDone); return savedata_op(ppu, SAVEDATA_OP_LIST_DELETE, 0, vm::null, 0, setList, setBuf, funcList, vm::null, vm::null, vm::null, container, 0x40, userdata, 0, funcDone);
} }
// Temporarily
#ifndef _MSC_VER
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
error_code cellSaveDataListImport(ppu_thread& ppu, PSetList setList, u32 maxSizeKB, PFuncDone funcDone, u32 container, vm::ptr<void> userdata) error_code cellSaveDataListImport(ppu_thread& ppu, PSetList setList, u32 maxSizeKB, PFuncDone funcDone, u32 container, vm::ptr<void> userdata)
{ {
UNIMPLEMENTED_FUNC(cellSaveData); UNIMPLEMENTED_FUNC(cellSaveData);

View file

@ -160,6 +160,11 @@ void fmt_class_string<SpursWorkloadState>::format(std::string& out, u64 arg)
error_code sys_spu_image_close(ppu_thread&, vm::ptr<sys_spu_image> img); error_code sys_spu_image_close(ppu_thread&, vm::ptr<sys_spu_image> img);
// Temporarily
#ifndef _MSC_VER
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Function prototypes // Function prototypes
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------

View file

@ -19,8 +19,10 @@
LOG_CHANNEL(cellSpurs); LOG_CHANNEL(cellSpurs);
// Temporarily
#ifndef _MSC_VER #ifndef _MSC_VER
#pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif #endif
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -775,7 +777,7 @@ void spursSysServiceIdleHandler(spu_thread& spu, SpursKernelContext* ctxt)
while (true) while (true)
{ {
const auto spurs = spu._ptr<CellSpurs>(0x100); const auto spurs = spu._ptr<CellSpurs>(0x100);
//vm::reservation_acquire(spurs, vm::cast(ctxt->spurs.addr()), 128); //vm::reservation_acquire(ctxt->spurs.addr());
// Find the number of SPUs that are idling in this SPURS instance // Find the number of SPUs that are idling in this SPURS instance
u32 nIdlingSpus = 0; u32 nIdlingSpus = 0;
@ -891,9 +893,9 @@ void spursSysServiceMain(spu_thread& spu, u32 pollStatus)
{ {
ctxt->sysSrvInitialised = 1; ctxt->sysSrvInitialised = 1;
//vm::reservation_acquire(ctxt, vm::cast(ctxt->spurs.addr()), 128); //vm::reservation_acquire(ctxt->spurs.addr());
//vm::reservation_op(ctxt->spurs.ptr(&CellSpurs::wklState1).addr(), 128, [&]() //vm::reservation_op(ctxt->spurs.ptr(&CellSpurs::wklState1).addr(), [&]()
{ {
auto spurs = ctxt->spurs.get_ptr(); auto spurs = ctxt->spurs.get_ptr();
@ -1215,7 +1217,7 @@ void spursSysServiceTraceUpdate(spu_thread& spu, SpursKernelContext* ctxt, u32 a
// Get trace parameters from CellSpurs and store them in the LS // Get trace parameters from CellSpurs and store them in the LS
if (((sysSrvMsgUpdateTrace & (1 << ctxt->spuNum)) != 0) || (arg3 != 0)) if (((sysSrvMsgUpdateTrace & (1 << ctxt->spuNum)) != 0) || (arg3 != 0))
{ {
//vm::reservation_acquire(spu._ptr<void>(0x80), ctxt->spurs.ptr(&CellSpurs::traceBuffer).addr(), 128); //vm::reservation_acquire(ctxt->spurs.ptr(&CellSpurs::traceBuffer).addr());
auto spurs = spu._ptr<CellSpurs>(0x80 - offset32(&CellSpurs::traceBuffer)); auto spurs = spu._ptr<CellSpurs>(0x80 - offset32(&CellSpurs::traceBuffer));
if (ctxt->traceMsgCount != 0xffu || spurs->traceBuffer.addr() == 0u) if (ctxt->traceMsgCount != 0xffu || spurs->traceBuffer.addr() == 0u)

View file

@ -964,7 +964,7 @@ error_code _cellSyncLFQueueGetPushPointer(ppu_thread& ppu, vm::ptr<CellSyncLFQue
} }
} }
error_code _cellSyncLFQueueGetPushPointer2(ppu_thread& ppu, vm::ptr<CellSyncLFQueue> queue, vm::ptr<s32> pointer, u32 isBlocking, u32 useEventQueue) error_code _cellSyncLFQueueGetPushPointer2(ppu_thread& /*ppu*/, vm::ptr<CellSyncLFQueue> queue, vm::ptr<s32> pointer, u32 isBlocking, u32 useEventQueue)
{ {
// arguments copied from _cellSyncLFQueueGetPushPointer // arguments copied from _cellSyncLFQueueGetPushPointer
cellSync.todo("_cellSyncLFQueueGetPushPointer2(queue=*0x%x, pointer=*0x%x, isBlocking=%d, useEventQueue=%d)", queue, pointer, isBlocking, useEventQueue); cellSync.todo("_cellSyncLFQueueGetPushPointer2(queue=*0x%x, pointer=*0x%x, isBlocking=%d, useEventQueue=%d)", queue, pointer, isBlocking, useEventQueue);
@ -1105,7 +1105,7 @@ error_code _cellSyncLFQueueCompletePushPointer(ppu_thread& ppu, vm::ptr<CellSync
} }
} }
error_code _cellSyncLFQueueCompletePushPointer2(ppu_thread& ppu, vm::ptr<CellSyncLFQueue> queue, s32 pointer, vm::ptr<s32(u32 addr, u32 arg)> fpSendSignal) error_code _cellSyncLFQueueCompletePushPointer2(ppu_thread&, vm::ptr<CellSyncLFQueue> queue, s32 pointer, vm::ptr<s32(u32 addr, u32 arg)> fpSendSignal)
{ {
// arguments copied from _cellSyncLFQueueCompletePushPointer // arguments copied from _cellSyncLFQueueCompletePushPointer
cellSync.todo("_cellSyncLFQueueCompletePushPointer2(queue=*0x%x, pointer=%d, fpSendSignal=*0x%x)", queue, pointer, fpSendSignal); cellSync.todo("_cellSyncLFQueueCompletePushPointer2(queue=*0x%x, pointer=%d, fpSendSignal=*0x%x)", queue, pointer, fpSendSignal);
@ -1263,7 +1263,7 @@ error_code _cellSyncLFQueueGetPopPointer(ppu_thread& ppu, vm::ptr<CellSyncLFQueu
} }
} }
error_code _cellSyncLFQueueGetPopPointer2(ppu_thread& ppu, vm::ptr<CellSyncLFQueue> queue, vm::ptr<s32> pointer, u32 isBlocking, u32 useEventQueue) error_code _cellSyncLFQueueGetPopPointer2(ppu_thread&, vm::ptr<CellSyncLFQueue> queue, vm::ptr<s32> pointer, u32 isBlocking, u32 useEventQueue)
{ {
// arguments copied from _cellSyncLFQueueGetPopPointer // arguments copied from _cellSyncLFQueueGetPopPointer
cellSync.todo("_cellSyncLFQueueGetPopPointer2(queue=*0x%x, pointer=*0x%x, isBlocking=%d, useEventQueue=%d)", queue, pointer, isBlocking, useEventQueue); cellSync.todo("_cellSyncLFQueueGetPopPointer2(queue=*0x%x, pointer=*0x%x, isBlocking=%d, useEventQueue=%d)", queue, pointer, isBlocking, useEventQueue);
@ -1405,7 +1405,7 @@ error_code _cellSyncLFQueueCompletePopPointer(ppu_thread& ppu, vm::ptr<CellSyncL
} }
} }
error_code _cellSyncLFQueueCompletePopPointer2(ppu_thread& ppu, vm::ptr<CellSyncLFQueue> queue, s32 pointer, vm::ptr<s32(u32 addr, u32 arg)> fpSendSignal, u32 noQueueFull) error_code _cellSyncLFQueueCompletePopPointer2(ppu_thread&, vm::ptr<CellSyncLFQueue> queue, s32 pointer, vm::ptr<s32(u32 addr, u32 arg)> fpSendSignal, u32 noQueueFull)
{ {
// arguments copied from _cellSyncLFQueueCompletePopPointer // arguments copied from _cellSyncLFQueueCompletePopPointer
cellSync.todo("_cellSyncLFQueueCompletePopPointer2(queue=*0x%x, pointer=%d, fpSendSignal=*0x%x, noQueueFull=%d)", queue, pointer, fpSendSignal, noQueueFull); cellSync.todo("_cellSyncLFQueueCompletePopPointer2(queue=*0x%x, pointer=%d, fpSendSignal=*0x%x, noQueueFull=%d)", queue, pointer, fpSendSignal, noQueueFull);

View file

@ -79,7 +79,7 @@ struct syscache_info
// Poison opened files in /dev_hdd1 to return CELL_EIO on access // Poison opened files in /dev_hdd1 to return CELL_EIO on access
if (remove_root) if (remove_root)
{ {
idm::select<lv2_fs_object, lv2_file>([](u32 id, lv2_file& file) idm::select<lv2_fs_object, lv2_file>([](u32 /*id*/, lv2_file& file)
{ {
if (std::memcmp("/dev_hdd1", file.name.data(), 9) == 0) if (std::memcmp("/dev_hdd1", file.name.data(), 9) == 0)
{ {

View file

@ -127,7 +127,7 @@ struct vdec_context final
lf_queue<std::variant<vdec_start_seq_t, vdec_close_t, vdec_cmd, CellVdecFrameRate>> in_cmd; lf_queue<std::variant<vdec_start_seq_t, vdec_close_t, vdec_cmd, CellVdecFrameRate>> in_cmd;
vdec_context(s32 type, u32 profile, u32 addr, u32 size, vm::ptr<CellVdecCbMsg> func, u32 arg) vdec_context(s32 type, u32 /*profile*/, u32 addr, u32 size, vm::ptr<CellVdecCbMsg> func, u32 arg)
: type(type) : type(type)
, mem_addr(addr) , mem_addr(addr)
, mem_size(size) , mem_size(size)

View file

@ -361,6 +361,11 @@ error_code cellVideoOutGetResolutionAvailability(u32 videoOut, u32 resolutionId,
return CELL_VIDEO_OUT_ERROR_UNSUPPORTED_VIDEO_OUT; return CELL_VIDEO_OUT_ERROR_UNSUPPORTED_VIDEO_OUT;
} }
// Temporarily
#ifndef _MSC_VER
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
error_code cellVideoOutGetConvertCursorColorInfo(vm::ptr<u8> rgbOutputRange) error_code cellVideoOutGetConvertCursorColorInfo(vm::ptr<u8> rgbOutputRange)
{ {
cellSysutil.todo("cellVideoOutGetConvertCursorColorInfo()"); cellSysutil.todo("cellVideoOutGetConvertCursorColorInfo()");

View file

@ -34,6 +34,11 @@ void fmt_class_string<CellSnd3Error>::format(std::string& out, u64 arg)
}); });
} }
// Temporarily
#ifndef _MSC_VER
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
error_code cellSnd3Init(u32 maxVoice, u32 samples, vm::ptr<CellSnd3RequestQueueCtx> queue) error_code cellSnd3Init(u32 maxVoice, u32 samples, vm::ptr<CellSnd3RequestQueueCtx> queue)
{ {
UNIMPLEMENTED_FUNC(libsnd3); UNIMPLEMENTED_FUNC(libsnd3);

View file

@ -2571,7 +2571,7 @@ error_code sceNpManagerGetOnlineId(vm::ptr<SceNpOnlineId> onlineId)
return CELL_OK; return CELL_OK;
} }
error_code sceNpManagerGetNpId(ppu_thread& ppu, vm::ptr<SceNpId> npId) error_code sceNpManagerGetNpId(ppu_thread&, vm::ptr<SceNpId> npId)
{ {
sceNp.warning("sceNpManagerGetNpId(npId=*0x%x)", npId); sceNp.warning("sceNpManagerGetNpId(npId=*0x%x)", npId);

View file

@ -285,7 +285,7 @@ error_code sceNp2Term(ppu_thread& ppu)
return CELL_OK; return CELL_OK;
} }
error_code sceNpMatching2Term(ppu_thread& ppu) error_code sceNpMatching2Term(ppu_thread&)
{ {
sceNp2.warning("sceNpMatching2Term()"); sceNp2.warning("sceNpMatching2Term()");
return sceNpMatching2Term2(); // > SDK 2.4.0 return sceNpMatching2Term2(); // > SDK 2.4.0
@ -1529,7 +1529,7 @@ error_code sceNpAuthCreateOAuthRequest()
error_code sceNpAuthDeleteOAuthRequest(SceNpAuthOAuthRequestId reqId) error_code sceNpAuthDeleteOAuthRequest(SceNpAuthOAuthRequestId reqId)
{ {
sceNp2.todo("sceNpAuthDeleteOAuthRequest(reqId=%d)"); sceNp2.todo("sceNpAuthDeleteOAuthRequest(reqId=%d)", reqId);
auto& nph = g_fxo->get<named_thread<np_handler>>(); auto& nph = g_fxo->get<named_thread<np_handler>>();
@ -1543,7 +1543,7 @@ error_code sceNpAuthDeleteOAuthRequest(SceNpAuthOAuthRequestId reqId)
error_code sceNpAuthAbortOAuthRequest(SceNpAuthOAuthRequestId reqId) error_code sceNpAuthAbortOAuthRequest(SceNpAuthOAuthRequestId reqId)
{ {
sceNp2.todo("sceNpAuthAbortOAuthRequest(reqId=%d)"); sceNp2.todo("sceNpAuthAbortOAuthRequest(reqId=%d)", reqId);
auto& nph = g_fxo->get<named_thread<np_handler>>(); auto& nph = g_fxo->get<named_thread<np_handler>>();

View file

@ -1,6 +1,11 @@
#include "stdafx.h" #include "stdafx.h"
#include "Emu/Cell/PPUModule.h" #include "Emu/Cell/PPUModule.h"
// Temporarily
#ifndef _MSC_VER
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
LOG_CHANNEL(sceNpMatchingInt); LOG_CHANNEL(sceNpMatchingInt);
error_code sceNpMatchingCancelRequest() error_code sceNpMatchingCancelRequest()

View file

@ -16,7 +16,7 @@ struct ps3_fmt_src
ppu_thread* ctx; ppu_thread* ctx;
u32 g_count; u32 g_count;
bool test(usz index) const bool test(usz) const
{ {
return true; return true;
} }
@ -40,7 +40,7 @@ struct ps3_fmt_src
return out.size() - start; return out.size() - start;
} }
usz type(usz extra) const usz type(usz) const
{ {
return 0; return 0;
} }

View file

@ -65,6 +65,11 @@ void fmt_class_string<CellLv2DbgError>::format(std::string& out, u64 arg)
}); });
} }
// Temporarily
#ifndef _MSC_VER
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
error_code sys_dbg_read_ppu_thread_context(u64 id, vm::ptr<sys_dbg_ppu_thread_context_t> ppu_context) error_code sys_dbg_read_ppu_thread_context(u64 id, vm::ptr<sys_dbg_ppu_thread_context_t> ppu_context)
{ {
sys_lv2dbg.todo("sys_dbg_read_ppu_thread_context()"); sys_lv2dbg.todo("sys_dbg_read_ppu_thread_context()");

View file

@ -6,6 +6,11 @@
LOG_CHANNEL(libnet); LOG_CHANNEL(libnet);
// Temporarily
#ifndef _MSC_VER
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
s32 sys_net_accept(s32 s, vm::ptr<sys_net_sockaddr> addr, vm::ptr<u32> paddrlen) s32 sys_net_accept(s32 s, vm::ptr<sys_net_sockaddr> addr, vm::ptr<u32> paddrlen)
{ {
libnet.todo("accept(s=%d, addr=*0x%x, paddrlen=*0x%x)", s, addr, paddrlen); libnet.todo("accept(s=%d, addr=*0x%x, paddrlen=*0x%x)", s, addr, paddrlen);

View file

@ -251,12 +251,12 @@ error_code sys_prx_exitspawn_with_level()
return CELL_OK; return CELL_OK;
} }
error_code sys_prx_get_my_module_id(ppu_thread& ppu, ppu_thread& _do, ppu_thread& _not, ppu_thread& _call) error_code sys_prx_get_my_module_id(ppu_thread& ppu_do_not_call, ppu_thread&, ppu_thread&, ppu_thread&) // Do not call directly
{ {
sysPrxForUser.trace("sys_prx_get_my_module_id()"); sysPrxForUser.trace("sys_prx_get_my_module_id()");
// Call the syscall using the LR // Call the syscall using the LR
return _sys_prx_get_module_id_by_address(ppu, static_cast<u32>(ppu.lr)); return _sys_prx_get_module_id_by_address(ppu_do_not_call, static_cast<u32>(ppu_do_not_call.lr));
} }
void sysPrxForUser_sys_prx_init() void sysPrxForUser_sys_prx_init()

View file

@ -398,7 +398,7 @@ error_code sys_raw_spu_load(s32 id, vm::cptr<char> path, vm::ptr<u32> entry)
return CELL_OK; return CELL_OK;
} }
error_code sys_raw_spu_image_load(ppu_thread& ppu, s32 id, vm::ptr<sys_spu_image> img) error_code sys_raw_spu_image_load(s32 id, vm::ptr<sys_spu_image> img)
{ {
sysPrxForUser.warning("sys_raw_spu_image_load(id=%d, img=*0x%x)", id, img); sysPrxForUser.warning("sys_raw_spu_image_load(id=%d, img=*0x%x)", id, img);

View file

@ -1844,6 +1844,11 @@ void ppu_module::analyse(u32 lib_toc, u32 entry, const u32 sec_end, const std::b
ppu_log.notice("Block analysis: %zu blocks (%zu enqueued)", funcs.size(), block_queue.size()); ppu_log.notice("Block analysis: %zu blocks (%zu enqueued)", funcs.size(), block_queue.size());
} }
// Temporarily
#ifndef _MSC_VER
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
void ppu_acontext::UNK(ppu_opcode_t op) void ppu_acontext::UNK(ppu_opcode_t op)
{ {
std::fill_n(gpr, 32, spec_gpr{}); std::fill_n(gpr, 32, spec_gpr{});

View file

@ -77,13 +77,13 @@ namespace ppu_cb_detail
{ {
static_assert(std::is_same<std::decay_t<T>, ppu_thread>::value, "Invalid callback argument type for ARG_CONTEXT"); static_assert(std::is_same<std::decay_t<T>, ppu_thread>::value, "Invalid callback argument type for ARG_CONTEXT");
FORCE_INLINE static void set_value(ppu_thread& CPU, const T& arg) FORCE_INLINE static void set_value(ppu_thread&, const T&)
{ {
} }
}; };
template<u32 g_count, u32 f_count, u32 v_count> template<u32 g_count, u32 f_count, u32 v_count>
FORCE_INLINE static bool _bind_func_args(ppu_thread& CPU) FORCE_INLINE static bool _bind_func_args(ppu_thread&)
{ {
// terminator // terminator
return false; return false;

View file

@ -1076,7 +1076,7 @@ void PPUDisAsm::CRANDC(ppu_opcode_t op)
DisAsm_BI3("crandc", op.crbd, op.crba, op.crbb); DisAsm_BI3("crandc", op.crbd, op.crba, op.crbb);
} }
void PPUDisAsm::ISYNC(ppu_opcode_t op) void PPUDisAsm::ISYNC(ppu_opcode_t)
{ {
Write("isync"); Write("isync");
} }
@ -1938,7 +1938,7 @@ void PPUDisAsm::LVRXL(ppu_opcode_t op)
DisAsm_V1_R2("lvrxl", op.vd, op.ra, op.rb); DisAsm_V1_R2("lvrxl", op.vd, op.ra, op.rb);
} }
void PPUDisAsm::DSS(ppu_opcode_t op) void PPUDisAsm::DSS(ppu_opcode_t)
{ {
Write("dss()"); Write("dss()");
} }
@ -1953,7 +1953,7 @@ void PPUDisAsm::SRADI(ppu_opcode_t op)
DisAsm_R2_INT1_RC("sradi", op.ra, op.rs, op.sh64, op.rc); DisAsm_R2_INT1_RC("sradi", op.ra, op.rs, op.sh64, op.rc);
} }
void PPUDisAsm::EIEIO(ppu_opcode_t op) void PPUDisAsm::EIEIO(ppu_opcode_t)
{ {
Write("eieio"); Write("eieio");
} }
@ -2345,7 +2345,7 @@ void PPUDisAsm::FCFID(ppu_opcode_t op)
extern std::vector<std::string> g_ppu_function_names; extern std::vector<std::string> g_ppu_function_names;
void PPUDisAsm::UNK(ppu_opcode_t op) void PPUDisAsm::UNK(ppu_opcode_t)
{ {
if (ppu_function_manager::addr) if (ppu_function_manager::addr)
{ {

View file

@ -102,9 +102,9 @@ namespace ppu_func_detail
{ {
static_assert(std::is_same<std::decay_t<T>, ppu_va_args_t>::value, "Invalid function argument type for ARG_VARIADIC"); static_assert(std::is_same<std::decay_t<T>, ppu_va_args_t>::value, "Invalid function argument type for ARG_VARIADIC");
static FORCE_INLINE ppu_va_args_t get_arg(ppu_thread& ppu) static FORCE_INLINE ppu_va_args_t get_arg(ppu_thread&)
{ {
return{ g_count }; return {g_count};
} }
}; };

View file

@ -3156,7 +3156,7 @@ bool ppu_interpreter::CRANDC(ppu_thread& ppu, ppu_opcode_t op)
return true; return true;
} }
bool ppu_interpreter::ISYNC(ppu_thread& ppu, ppu_opcode_t op) bool ppu_interpreter::ISYNC(ppu_thread&, ppu_opcode_t)
{ {
atomic_fence_acquire(); atomic_fence_acquire();
return true; return true;
@ -3514,7 +3514,7 @@ bool ppu_interpreter::LDUX(ppu_thread& ppu, ppu_opcode_t op)
return true; return true;
} }
bool ppu_interpreter::DCBST(ppu_thread& ppu, ppu_opcode_t op) bool ppu_interpreter::DCBST(ppu_thread&, ppu_opcode_t)
{ {
return true; return true;
} }
@ -3587,7 +3587,7 @@ bool ppu_interpreter::LDARX(ppu_thread& ppu, ppu_opcode_t op)
return true; return true;
} }
bool ppu_interpreter::DCBF(ppu_thread& ppu, ppu_opcode_t op) bool ppu_interpreter::DCBF(ppu_thread&, ppu_opcode_t)
{ {
return true; return true;
} }
@ -3850,7 +3850,7 @@ bool ppu_interpreter::MULLW(ppu_thread& ppu, ppu_opcode_t op)
return true; return true;
} }
bool ppu_interpreter::DCBTST(ppu_thread& ppu, ppu_opcode_t op) bool ppu_interpreter::DCBTST(ppu_thread&, ppu_opcode_t)
{ {
return true; return true;
} }
@ -3873,7 +3873,7 @@ bool ppu_interpreter::ADD(ppu_thread& ppu, ppu_opcode_t op)
return true; return true;
} }
bool ppu_interpreter::DCBT(ppu_thread& ppu, ppu_opcode_t op) bool ppu_interpreter::DCBT(ppu_thread&, ppu_opcode_t)
{ {
return true; return true;
} }
@ -3892,7 +3892,7 @@ bool ppu_interpreter::EQV(ppu_thread& ppu, ppu_opcode_t op)
return true; return true;
} }
bool ppu_interpreter::ECIWX(ppu_thread& ppu, ppu_opcode_t op) bool ppu_interpreter::ECIWX(ppu_thread&, ppu_opcode_t)
{ {
fmt::throw_exception("ECIWX"); fmt::throw_exception("ECIWX");
} }
@ -3938,7 +3938,7 @@ bool ppu_interpreter::LWAX(ppu_thread& ppu, ppu_opcode_t op)
return true; return true;
} }
bool ppu_interpreter::DST(ppu_thread& ppu, ppu_opcode_t op) bool ppu_interpreter::DST(ppu_thread&, ppu_opcode_t)
{ {
return true; return true;
} }
@ -3979,7 +3979,7 @@ bool ppu_interpreter::LWAUX(ppu_thread& ppu, ppu_opcode_t op)
return true; return true;
} }
bool ppu_interpreter::DSTST(ppu_thread& ppu, ppu_opcode_t op) bool ppu_interpreter::DSTST(ppu_thread&, ppu_opcode_t)
{ {
return true; return true;
} }
@ -4006,7 +4006,7 @@ bool ppu_interpreter::ORC(ppu_thread& ppu, ppu_opcode_t op)
return true; return true;
} }
bool ppu_interpreter::ECOWX(ppu_thread& ppu, ppu_opcode_t op) bool ppu_interpreter::ECOWX(ppu_thread&, ppu_opcode_t)
{ {
fmt::throw_exception("ECOWX"); fmt::throw_exception("ECOWX");
} }
@ -4070,7 +4070,7 @@ bool ppu_interpreter::MTSPR(ppu_thread& ppu, ppu_opcode_t op)
return true; return true;
} }
bool ppu_interpreter::DCBI(ppu_thread& ppu, ppu_opcode_t op) bool ppu_interpreter::DCBI(ppu_thread&, ppu_opcode_t)
{ {
return true; return true;
} }
@ -4222,7 +4222,7 @@ bool ppu_interpreter::LFSUX(ppu_thread& ppu, ppu_opcode_t op)
return true; return true;
} }
bool ppu_interpreter::SYNC(ppu_thread& ppu, ppu_opcode_t op) bool ppu_interpreter::SYNC(ppu_thread&, ppu_opcode_t)
{ {
atomic_fence_seq_cst(); atomic_fence_seq_cst();
return true; return true;
@ -4406,7 +4406,7 @@ bool ppu_interpreter::LVRXL(ppu_thread& ppu, ppu_opcode_t op)
return LVRX(ppu, op); return LVRX(ppu, op);
} }
bool ppu_interpreter::DSS(ppu_thread& ppu, ppu_opcode_t op) bool ppu_interpreter::DSS(ppu_thread&, ppu_opcode_t)
{ {
return true; return true;
} }
@ -4432,7 +4432,7 @@ bool ppu_interpreter::SRADI(ppu_thread& ppu, ppu_opcode_t op)
return true; return true;
} }
bool ppu_interpreter::EIEIO(ppu_thread& ppu, ppu_opcode_t op) bool ppu_interpreter::EIEIO(ppu_thread&, ppu_opcode_t)
{ {
atomic_fence_seq_cst(); atomic_fence_seq_cst();
return true; return true;
@ -4483,7 +4483,7 @@ bool ppu_interpreter::EXTSW(ppu_thread& ppu, ppu_opcode_t op)
return true; return true;
} }
bool ppu_interpreter::ICBI(ppu_thread& ppu, ppu_opcode_t op) bool ppu_interpreter::ICBI(ppu_thread&, ppu_opcode_t)
{ {
return true; return true;
} }

View file

@ -30,6 +30,7 @@
#pragma GCC diagnostic ignored "-Wall" #pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wextra" #pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wold-style-cast" #pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif #endif
#include "llvm/Support/FormattedStream.h" #include "llvm/Support/FormattedStream.h"
#include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/MemoryBuffer.h"
@ -352,7 +353,7 @@ void ppu_reservation_fallback(ppu_thread& ppu)
static std::unordered_map<u32, u32>* s_ppu_toc; static std::unordered_map<u32, u32>* s_ppu_toc;
static bool ppu_check_toc(ppu_thread& ppu, ppu_opcode_t op) static bool ppu_check_toc(ppu_thread& ppu, ppu_opcode_t)
{ {
// Compare TOC with expected value // Compare TOC with expected value
const auto found = s_ppu_toc->find(ppu.cia); const auto found = s_ppu_toc->find(ppu.cia);
@ -457,7 +458,7 @@ extern void ppu_register_function_at(u32 addr, u32 size, ppu_function_t ptr)
} }
// Breakpoint entry point // Breakpoint entry point
static bool ppu_break(ppu_thread& ppu, ppu_opcode_t op) static bool ppu_break(ppu_thread& ppu, ppu_opcode_t)
{ {
// Pause // Pause
ppu.state.atomic_op([](bs_t<cpu_flag>& state) { if (!(state & cpu_flag::dbg_step)) state += cpu_flag::dbg_pause; }); ppu.state.atomic_op([](bs_t<cpu_flag>& state) { if (!(state & cpu_flag::dbg_step)) state += cpu_flag::dbg_pause; });
@ -1428,7 +1429,7 @@ static T ppu_load_acquire_reservation(ppu_thread& ppu, u32 addr)
ppu_log.trace(u8"LARX after fail: addr=0x%x, faddr=0x%x, time=%u c", addr, ppu.last_faddr, (perf0.get() - ppu.last_ftsc)); ppu_log.trace(u8"LARX after fail: addr=0x%x, faddr=0x%x, time=%u c", addr, ppu.last_faddr, (perf0.get() - ppu.last_ftsc));
} }
if ((addr & addr_mask) == (ppu.last_faddr & addr_mask) && (perf0.get() - ppu.last_ftsc) < 600 && (vm::reservation_acquire(addr, sizeof(T)) & -128) == ppu.last_ftime) if ((addr & addr_mask) == (ppu.last_faddr & addr_mask) && (perf0.get() - ppu.last_ftsc) < 600 && (vm::reservation_acquire(addr) & -128) == ppu.last_ftime)
{ {
be_t<u64> rdata; be_t<u64> rdata;
std::memcpy(&rdata, &ppu.rdata[addr & 0x78], 8); std::memcpy(&rdata, &ppu.rdata[addr & 0x78], 8);
@ -1450,7 +1451,7 @@ static T ppu_load_acquire_reservation(ppu_thread& ppu, u32 addr)
ppu.last_faddr = 0; ppu.last_faddr = 0;
} }
ppu.rtime = vm::reservation_acquire(addr, sizeof(T)) & -128; ppu.rtime = vm::reservation_acquire(addr) & -128;
be_t<u64> rdata; be_t<u64> rdata;
@ -1834,7 +1835,7 @@ static bool ppu_store_reservation(ppu_thread& ppu, u32 addr, u64 reg_value)
} }
auto& data = vm::_ref<atomic_be_t<u64>>(addr & -8); auto& data = vm::_ref<atomic_be_t<u64>>(addr & -8);
auto& res = vm::reservation_acquire(addr, sizeof(T)); auto& res = vm::reservation_acquire(addr);
const u64 rtime = ppu.rtime; const u64 rtime = ppu.rtime;
be_t<u64> old_data = 0; be_t<u64> old_data = 0;
@ -2143,7 +2144,7 @@ namespace
return m_file.stat(); return m_file.stat();
} }
bool trunc(u64 length) override bool trunc(u64) override
{ {
return false; return false;
} }
@ -2159,7 +2160,7 @@ namespace
return result; return result;
} }
u64 write(const void* buffer, u64 size) override u64 write(const void*, u64) override
{ {
return 0; return 0;
} }

View file

@ -2071,7 +2071,7 @@ void PPUTranslator::CRANDC(ppu_opcode_t op)
SetCrb(op.crbd, m_ir->CreateAnd(GetCrb(op.crba), m_ir->CreateNot(GetCrb(op.crbb)))); SetCrb(op.crbd, m_ir->CreateAnd(GetCrb(op.crba), m_ir->CreateNot(GetCrb(op.crbb))));
} }
void PPUTranslator::ISYNC(ppu_opcode_t op) void PPUTranslator::ISYNC(ppu_opcode_t)
{ {
m_ir->CreateFence(AtomicOrdering::Acquire); m_ir->CreateFence(AtomicOrdering::Acquire);
} }
@ -2081,7 +2081,7 @@ void PPUTranslator::CRXOR(ppu_opcode_t op)
SetCrb(op.crbd, m_ir->CreateXor(GetCrb(op.crba), GetCrb(op.crbb))); SetCrb(op.crbd, m_ir->CreateXor(GetCrb(op.crba), GetCrb(op.crbb)));
} }
void PPUTranslator::DCBI(ppu_opcode_t op) void PPUTranslator::DCBI(ppu_opcode_t)
{ {
} }
@ -2656,7 +2656,7 @@ void PPUTranslator::LDUX(ppu_opcode_t op)
SetGpr(op.ra, addr); SetGpr(op.ra, addr);
} }
void PPUTranslator::DCBST(ppu_opcode_t op) void PPUTranslator::DCBST(ppu_opcode_t)
{ {
} }
@ -2723,7 +2723,7 @@ void PPUTranslator::LDARX(ppu_opcode_t op)
SetGpr(op.rd, Call(GetType<u64>(), "__ldarx", m_thread, op.ra ? m_ir->CreateAdd(GetGpr(op.ra), GetGpr(op.rb)) : GetGpr(op.rb))); SetGpr(op.rd, Call(GetType<u64>(), "__ldarx", m_thread, op.ra ? m_ir->CreateAdd(GetGpr(op.ra), GetGpr(op.rb)) : GetGpr(op.rb)));
} }
void PPUTranslator::DCBF(ppu_opcode_t op) void PPUTranslator::DCBF(ppu_opcode_t)
{ {
} }
@ -2978,7 +2978,7 @@ void PPUTranslator::MULLW(ppu_opcode_t op)
if (op.oe) SetOverflow(Call(GetType<bool>(), m_pure_attr, "__mullw_get_ov", a, b)); if (op.oe) SetOverflow(Call(GetType<bool>(), m_pure_attr, "__mullw_get_ov", a, b));
} }
void PPUTranslator::DCBTST(ppu_opcode_t op) void PPUTranslator::DCBTST(ppu_opcode_t)
{ {
} }
@ -3006,7 +3006,7 @@ void PPUTranslator::ADD(ppu_opcode_t op)
if (op.rc) SetCrFieldSignedCmp(0, result, m_ir->getInt64(0)); if (op.rc) SetCrFieldSignedCmp(0, result, m_ir->getInt64(0));
} }
void PPUTranslator::DCBT(ppu_opcode_t op) void PPUTranslator::DCBT(ppu_opcode_t)
{ {
} }
@ -3080,7 +3080,7 @@ void PPUTranslator::LWAX(ppu_opcode_t op)
SetGpr(op.rd, SExt(ReadMemory(op.ra ? m_ir->CreateAdd(GetGpr(op.ra), GetGpr(op.rb)) : GetGpr(op.rb), GetType<s32>()))); SetGpr(op.rd, SExt(ReadMemory(op.ra ? m_ir->CreateAdd(GetGpr(op.ra), GetGpr(op.rb)) : GetGpr(op.rb), GetType<s32>())));
} }
void PPUTranslator::DST(ppu_opcode_t op) void PPUTranslator::DST(ppu_opcode_t)
{ {
} }
@ -3120,7 +3120,7 @@ void PPUTranslator::LWAUX(ppu_opcode_t op)
SetGpr(op.ra, addr); SetGpr(op.ra, addr);
} }
void PPUTranslator::DSTST(ppu_opcode_t op) void PPUTranslator::DSTST(ppu_opcode_t)
{ {
} }
@ -3487,7 +3487,7 @@ void PPUTranslator::LVRXL(ppu_opcode_t op)
return LVRX(op); return LVRX(op);
} }
void PPUTranslator::DSS(ppu_opcode_t op) void PPUTranslator::DSS(ppu_opcode_t)
{ {
} }
@ -3510,7 +3510,7 @@ void PPUTranslator::SRADI(ppu_opcode_t op)
if (op.rc) SetCrFieldSignedCmp(0, result, m_ir->getInt64(0)); if (op.rc) SetCrFieldSignedCmp(0, result, m_ir->getInt64(0));
} }
void PPUTranslator::EIEIO(ppu_opcode_t op) void PPUTranslator::EIEIO(ppu_opcode_t)
{ {
// TODO // TODO
m_ir->CreateFence(AtomicOrdering::SequentiallyConsistent); m_ir->CreateFence(AtomicOrdering::SequentiallyConsistent);
@ -3557,7 +3557,7 @@ void PPUTranslator::EXTSW(ppu_opcode_t op)
if (op.rc) SetCrFieldSignedCmp(0, result, m_ir->getInt64(0)); if (op.rc) SetCrFieldSignedCmp(0, result, m_ir->getInt64(0));
} }
void PPUTranslator::ICBI(ppu_opcode_t op) void PPUTranslator::ICBI(ppu_opcode_t)
{ {
} }
@ -4734,7 +4734,7 @@ void PPUTranslator::SetFPCC(Value* lt, Value* gt, Value* eq, Value* un, bool set
if (set_cr) SetCrField(1, lt, gt, eq, un); if (set_cr) SetCrField(1, lt, gt, eq, un);
} }
void PPUTranslator::SetFPRF(Value* value, bool set_cr) void PPUTranslator::SetFPRF(Value* value, bool /*set_cr*/)
{ {
//const bool is32 = //const bool is32 =
value->getType()->isFloatTy() ? true : value->getType()->isFloatTy() ? true :
@ -4755,18 +4755,18 @@ void PPUTranslator::SetFPRF(Value* value, bool set_cr)
//SetFPCC(lt, gt, eq, un, set_cr); //SetFPCC(lt, gt, eq, un, set_cr);
} }
void PPUTranslator::SetFPSCR_FR(Value* value) void PPUTranslator::SetFPSCR_FR(Value* /*value*/)
{ {
//m_ir->CreateStore(value, m_fpscr_fr); //m_ir->CreateStore(value, m_fpscr_fr);
} }
void PPUTranslator::SetFPSCR_FI(Value* value) void PPUTranslator::SetFPSCR_FI(Value* /*value*/)
{ {
//m_ir->CreateStore(value, m_fpscr_fi); //m_ir->CreateStore(value, m_fpscr_fi);
//SetFPSCRException(m_fpscr_xx, value); //SetFPSCRException(m_fpscr_xx, value);
} }
void PPUTranslator::SetFPSCRException(Value* ptr, Value* value) void PPUTranslator::SetFPSCRException(Value* /*ptr*/, Value* /*value*/)
{ {
//m_ir->CreateStore(m_ir->CreateOr(m_ir->CreateLoad(ptr), value), ptr); //m_ir->CreateStore(m_ir->CreateOr(m_ir->CreateLoad(ptr), value), ptr);
//m_ir->CreateStore(m_ir->CreateOr(m_ir->CreateLoad(m_fpscr_fx), value), m_fpscr_fx); //m_ir->CreateStore(m_ir->CreateOr(m_ir->CreateLoad(m_fpscr_fx), value), m_fpscr_fx);
@ -4808,7 +4808,7 @@ Value* PPUTranslator::GetFPSCRBit(u32 n)
return value; return value;
} }
void PPUTranslator::SetFPSCRBit(u32 n, Value* value, bool update_fx) void PPUTranslator::SetFPSCRBit(u32 n, Value* value, bool /*update_fx*/)
{ {
if (n < 16 || n > 19) if (n < 16 || n > 19)
{ {

View file

@ -1305,11 +1305,11 @@ void spu_recompiler::STOP(spu_opcode_t op)
} }
} }
void spu_recompiler::LNOP(spu_opcode_t op) void spu_recompiler::LNOP(spu_opcode_t)
{ {
} }
void spu_recompiler::SYNC(spu_opcode_t op) void spu_recompiler::SYNC(spu_opcode_t)
{ {
// This instruction must be used following a store instruction that modifies the instruction stream. // This instruction must be used following a store instruction that modifies the instruction stream.
c->lock().or_(asmjit::x86::dword_ptr(asmjit::x86::rsp), 0); c->lock().or_(asmjit::x86::dword_ptr(asmjit::x86::rsp), 0);
@ -1324,7 +1324,7 @@ void spu_recompiler::SYNC(spu_opcode_t op)
} }
} }
void spu_recompiler::DSYNC(spu_opcode_t op) void spu_recompiler::DSYNC(spu_opcode_t)
{ {
// This instruction forces all earlier load, store, and channel instructions to complete before proceeding. // This instruction forces all earlier load, store, and channel instructions to complete before proceeding.
c->lock().or_(asmjit::x86::dword_ptr(asmjit::x86::rsp), 0); c->lock().or_(asmjit::x86::dword_ptr(asmjit::x86::rsp), 0);
@ -2259,7 +2259,7 @@ void spu_recompiler::AVGB(spu_opcode_t op)
c->movdqa(SPU_OFF_128(gpr, op.rt), vb); c->movdqa(SPU_OFF_128(gpr, op.rt), vb);
} }
void spu_recompiler::MTSPR(spu_opcode_t op) void spu_recompiler::MTSPR(spu_opcode_t)
{ {
// Check SPUInterpreter for notes. // Check SPUInterpreter for notes.
} }
@ -2581,7 +2581,7 @@ void spu_recompiler::BIHNZ(spu_opcode_t op)
}); });
} }
void spu_recompiler::STOPD(spu_opcode_t op) void spu_recompiler::STOPD(spu_opcode_t)
{ {
STOP(spu_opcode_t{0x3fff}); STOP(spu_opcode_t{0x3fff});
} }
@ -2678,7 +2678,7 @@ void spu_recompiler::BISLED(spu_opcode_t op)
}); });
} }
void spu_recompiler::HBR(spu_opcode_t op) void spu_recompiler::HBR([[maybe_unused]] spu_opcode_t op)
{ {
} }
@ -3186,7 +3186,7 @@ void spu_recompiler::SHLQBYI(spu_opcode_t op)
c->movdqa(SPU_OFF_128(gpr, op.rt), va); c->movdqa(SPU_OFF_128(gpr, op.rt), va);
} }
void spu_recompiler::NOP(spu_opcode_t op) void spu_recompiler::NOP(spu_opcode_t)
{ {
} }
@ -3815,7 +3815,7 @@ void spu_recompiler::FRDS(spu_opcode_t op)
c->movaps(SPU_OFF_128(gpr, op.rt), va); c->movaps(SPU_OFF_128(gpr, op.rt), va);
} }
void spu_recompiler::FSCRWR(spu_opcode_t op) void spu_recompiler::FSCRWR(spu_opcode_t /*op*/)
{ {
// nop (not implemented) // nop (not implemented)
} }
@ -4579,11 +4579,11 @@ void spu_recompiler::HEQI(spu_opcode_t op)
}); });
} }
void spu_recompiler::HBRA(spu_opcode_t op) void spu_recompiler::HBRA([[maybe_unused]] spu_opcode_t op)
{ {
} }
void spu_recompiler::HBRR(spu_opcode_t op) void spu_recompiler::HBRR([[maybe_unused]] spu_opcode_t op)
{ {
} }

View file

@ -93,7 +93,7 @@ namespace asmjit
} }
} }
bool spu_interpreter::UNK(spu_thread& spu, spu_opcode_t op) bool spu_interpreter::UNK(spu_thread&, spu_opcode_t op)
{ {
fmt::throw_exception("Unknown/Illegal instruction (0x%08x)", op.opcode); fmt::throw_exception("Unknown/Illegal instruction (0x%08x)", op.opcode);
} }
@ -135,20 +135,20 @@ bool spu_interpreter::STOP(spu_thread& spu, spu_opcode_t op)
return true; return true;
} }
bool spu_interpreter::LNOP(spu_thread& spu, spu_opcode_t op) bool spu_interpreter::LNOP(spu_thread&, spu_opcode_t)
{ {
return true; return true;
} }
// This instruction must be used following a store instruction that modifies the instruction stream. // This instruction must be used following a store instruction that modifies the instruction stream.
bool spu_interpreter::SYNC(spu_thread& spu, spu_opcode_t op) bool spu_interpreter::SYNC(spu_thread&, spu_opcode_t)
{ {
atomic_fence_seq_cst(); atomic_fence_seq_cst();
return true; return true;
} }
// This instruction forces all earlier load, store, and channel instructions to complete before proceeding. // This instruction forces all earlier load, store, and channel instructions to complete before proceeding.
bool spu_interpreter::DSYNC(spu_thread& spu, spu_opcode_t op) bool spu_interpreter::DSYNC(spu_thread&, spu_opcode_t)
{ {
atomic_fence_seq_cst(); atomic_fence_seq_cst();
return true; return true;
@ -416,7 +416,7 @@ bool spu_interpreter::AVGB(spu_thread& spu, spu_opcode_t op)
return true; return true;
} }
bool spu_interpreter::MTSPR(spu_thread& spu, spu_opcode_t op) bool spu_interpreter::MTSPR(spu_thread&, spu_opcode_t)
{ {
// SPR writes are ignored. TODO: check it. // SPR writes are ignored. TODO: check it.
return true; return true;
@ -482,7 +482,7 @@ bool spu_interpreter::BIHNZ(spu_thread& spu, spu_opcode_t op)
return true; return true;
} }
bool spu_interpreter::STOPD(spu_thread& spu, spu_opcode_t op) bool spu_interpreter::STOPD(spu_thread& spu, spu_opcode_t)
{ {
return spu.stop_and_signal(0x3fff); return spu.stop_and_signal(0x3fff);
} }
@ -531,7 +531,7 @@ bool spu_interpreter::BISLED(spu_thread& spu, spu_opcode_t op)
return true; return true;
} }
bool spu_interpreter::HBR(spu_thread& spu, spu_opcode_t op) bool spu_interpreter::HBR(spu_thread&, spu_opcode_t)
{ {
return true; return true;
} }
@ -834,7 +834,7 @@ bool spu_interpreter::SHLQBYI(spu_thread& spu, spu_opcode_t op)
return true; return true;
} }
bool spu_interpreter::NOP(spu_thread& spu, spu_opcode_t op) bool spu_interpreter::NOP(spu_thread&, spu_opcode_t)
{ {
return true; return true;
} }
@ -990,7 +990,7 @@ bool spu_interpreter_fast::FCGT(spu_thread& spu, spu_opcode_t op)
return true; return true;
} }
bool spu_interpreter::DFCGT(spu_thread& spu, spu_opcode_t op) bool spu_interpreter::DFCGT(spu_thread&, spu_opcode_t)
{ {
fmt::throw_exception("Unexpected instruction"); fmt::throw_exception("Unexpected instruction");
return true; return true;
@ -1077,7 +1077,7 @@ bool spu_interpreter_fast::FCMGT(spu_thread& spu, spu_opcode_t op)
return true; return true;
} }
bool spu_interpreter::DFCMGT(spu_thread& spu, spu_opcode_t op) bool spu_interpreter::DFCMGT(spu_thread&, spu_opcode_t)
{ {
fmt::throw_exception("Unexpected Instruction"); fmt::throw_exception("Unexpected Instruction");
return true; return true;
@ -1220,12 +1220,12 @@ bool spu_interpreter_fast::FRDS(spu_thread& spu, spu_opcode_t op)
return true; return true;
} }
bool spu_interpreter_fast::FSCRWR(spu_thread& spu, spu_opcode_t op) bool spu_interpreter_fast::FSCRWR(spu_thread&, spu_opcode_t)
{ {
return true; return true;
} }
bool spu_interpreter::DFTSV(spu_thread& spu, spu_opcode_t op) bool spu_interpreter::DFTSV(spu_thread&, spu_opcode_t)
{ {
fmt::throw_exception("Unexpected instruction"); fmt::throw_exception("Unexpected instruction");
return true; return true;
@ -1237,7 +1237,7 @@ bool spu_interpreter_fast::FCEQ(spu_thread& spu, spu_opcode_t op)
return true; return true;
} }
bool spu_interpreter::DFCEQ(spu_thread& spu, spu_opcode_t op) bool spu_interpreter::DFCEQ(spu_thread&, spu_opcode_t)
{ {
fmt::throw_exception("Unexpected instruction"); fmt::throw_exception("Unexpected instruction");
return true; return true;
@ -1281,7 +1281,7 @@ bool spu_interpreter_fast::FCMEQ(spu_thread& spu, spu_opcode_t op)
return true; return true;
} }
bool spu_interpreter::DFCMEQ(spu_thread& spu, spu_opcode_t op) bool spu_interpreter::DFCMEQ(spu_thread&, spu_opcode_t)
{ {
fmt::throw_exception("Unexpected instruction"); fmt::throw_exception("Unexpected instruction");
return true; return true;
@ -1667,12 +1667,12 @@ bool spu_interpreter::HEQI(spu_thread& spu, spu_opcode_t op)
} }
bool spu_interpreter::HBRA(spu_thread& spu, spu_opcode_t op) bool spu_interpreter::HBRA(spu_thread&, spu_opcode_t)
{ {
return true; return true;
} }
bool spu_interpreter::HBRR(spu_thread& spu, spu_opcode_t op) bool spu_interpreter::HBRR(spu_thread&, spu_opcode_t)
{ {
return true; return true;
} }
@ -1713,7 +1713,7 @@ bool spu_interpreter::SHUFB(spu_thread& spu, spu_opcode_t op)
return true; return true;
} }
const spu_inter_func_t optimized_shufb = build_function_asm<spu_inter_func_t>([](asmjit::X86Assembler& c, auto& args) const spu_inter_func_t optimized_shufb = build_function_asm<spu_inter_func_t>([](asmjit::X86Assembler& c, auto& /*args*/)
{ {
using namespace asmjit; using namespace asmjit;

View file

@ -1182,7 +1182,7 @@ void spu_recompiler_base::branch(spu_thread& spu, void*, u8* rip)
spu_runtime::g_tail_escape(&spu, func, rip); spu_runtime::g_tail_escape(&spu, func, rip);
} }
void spu_recompiler_base::old_interpreter(spu_thread& spu, void* ls, u8* rip) void spu_recompiler_base::old_interpreter(spu_thread& spu, void* ls, u8* /*rip*/)
{ {
if (g_cfg.core.spu_decoder > spu_decoder_type::fast) if (g_cfg.core.spu_decoder > spu_decoder_type::fast)
{ {
@ -3220,6 +3220,7 @@ void spu_recompiler_base::dump(const spu_program& result, std::string& out)
#pragma GCC diagnostic ignored "-Wall" #pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wextra" #pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wold-style-cast" #pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif #endif
#include "llvm/ADT/Triple.h" #include "llvm/ADT/Triple.h"
#include "llvm/IR/LegacyPassManager.h" #include "llvm/IR/LegacyPassManager.h"
@ -3765,7 +3766,7 @@ class spu_llvm_recompiler : public spu_recompiler_base, public cpu_translator
// Get pointer to the vector register (interpreter only) // Get pointer to the vector register (interpreter only)
template <typename T, uint I> template <typename T, uint I>
llvm::Value* init_vr(const bf_t<u32, I, 7>& index) llvm::Value* init_vr(const bf_t<u32, I, 7>&)
{ {
if (!m_interp_magn) if (!m_interp_magn)
{ {
@ -5311,7 +5312,7 @@ public:
call(name, &exec_fall<F>, m_thread, m_ir->getInt32(op.opcode)); call(name, &exec_fall<F>, m_thread, m_ir->getInt32(op.opcode));
} }
static void exec_unk(spu_thread* _spu, u32 op) static void exec_unk(spu_thread*, u32 op)
{ {
fmt::throw_exception("Unknown/Illegal instruction (0x%08x)", op); fmt::throw_exception("Unknown/Illegal instruction (0x%08x)", op);
} }
@ -5364,7 +5365,7 @@ public:
} }
} }
void STOPD(spu_opcode_t op) // void STOPD(spu_opcode_t) //
{ {
if (m_interp_magn) if (m_interp_magn)
{ {
@ -6165,15 +6166,15 @@ public:
call("spu_write_channel", &exec_wrch, m_thread, m_ir->getInt32(op.ra), val.value); call("spu_write_channel", &exec_wrch, m_thread, m_ir->getInt32(op.ra), val.value);
} }
void LNOP(spu_opcode_t op) // void LNOP(spu_opcode_t) //
{ {
} }
void NOP(spu_opcode_t op) // void NOP(spu_opcode_t) //
{ {
} }
void SYNC(spu_opcode_t op) // void SYNC(spu_opcode_t) //
{ {
// This instruction must be used following a store instruction that modifies the instruction stream. // This instruction must be used following a store instruction that modifies the instruction stream.
m_ir->CreateFence(llvm::AtomicOrdering::SequentiallyConsistent); m_ir->CreateFence(llvm::AtomicOrdering::SequentiallyConsistent);
@ -6186,7 +6187,7 @@ public:
} }
} }
void DSYNC(spu_opcode_t op) // void DSYNC(spu_opcode_t) //
{ {
// This instruction forces all earlier load, store, and channel instructions to complete before proceeding. // This instruction forces all earlier load, store, and channel instructions to complete before proceeding.
m_ir->CreateFence(llvm::AtomicOrdering::SequentiallyConsistent); m_ir->CreateFence(llvm::AtomicOrdering::SequentiallyConsistent);
@ -6198,7 +6199,7 @@ public:
set_vr(op.rt, splat<u32[4]>(0)); set_vr(op.rt, splat<u32[4]>(0));
} }
void MTSPR(spu_opcode_t op) // void MTSPR(spu_opcode_t) //
{ {
// Check SPUInterpreter for notes. // Check SPUInterpreter for notes.
} }
@ -6400,7 +6401,7 @@ public:
void AND(spu_opcode_t op) void AND(spu_opcode_t op)
{ {
if (match_vr<u8[16], u16[8], u64[2]>(op.ra, [&](auto a, auto MP1) if (match_vr<u8[16], u16[8], u64[2]>(op.ra, [&](auto a, auto /*MP1*/)
{ {
if (auto b = match_vr_as(a, op.rb)) if (auto b = match_vr_as(a, op.rb))
{ {
@ -6408,7 +6409,7 @@ public:
return true; return true;
} }
return match_vr<u8[16], u16[8], u64[2]>(op.rb, [&](auto b, auto MP2) return match_vr<u8[16], u16[8], u64[2]>(op.rb, [&](auto /*b*/, auto /*MP2*/)
{ {
set_vr(op.rt, a & get_vr_as(a, op.rb)); set_vr(op.rt, a & get_vr_as(a, op.rb));
return true; return true;
@ -7441,7 +7442,7 @@ public:
set_vr(op.rt, splat<u32[4]>(0)); set_vr(op.rt, splat<u32[4]>(0));
} }
void FSCRWR(spu_opcode_t op) // void FSCRWR(spu_opcode_t /*op*/) //
{ {
// Hack // Hack
} }
@ -8341,17 +8342,17 @@ public:
make_halt(cond); make_halt(cond);
} }
void HBR(spu_opcode_t op) // void HBR([[maybe_unused]] spu_opcode_t op) //
{ {
// TODO: use the hint. // TODO: use the hint.
} }
void HBRA(spu_opcode_t op) // void HBRA([[maybe_unused]] spu_opcode_t op) //
{ {
// TODO: use the hint. // TODO: use the hint.
} }
void HBRR(spu_opcode_t op) // void HBRR([[maybe_unused]] spu_opcode_t op) //
{ {
// TODO: use the hint. // TODO: use the hint.
} }
@ -9026,7 +9027,7 @@ struct spu_llvm
} }
// Collect profiling samples // Collect profiling samples
idm::select<named_thread<spu_thread>>([&](u32 id, spu_thread& spu) idm::select<named_thread<spu_thread>>([&](u32 /*id*/, spu_thread& spu)
{ {
const u64 name = atomic_storage<u64>::load(spu.block_hash); const u64 name = atomic_storage<u64>::load(spu.block_hash);

View file

@ -2038,7 +2038,7 @@ void spu_thread::do_dma_transfer(spu_thread* _this, const spu_mfc_cmd& args, u8*
} }
}()) }())
{ {
const u64 time0 = vm::reservation_acquire(eal, size0); const u64 time0 = vm::reservation_acquire(eal);
if (time0 & 127) if (time0 & 127)
{ {
@ -2103,7 +2103,7 @@ void spu_thread::do_dma_transfer(spu_thread* _this, const spu_mfc_cmd& args, u8*
} }
} }
if (time0 != vm::reservation_acquire(eal, size0) || (size0 == 128 && !cmp_rdata(*reinterpret_cast<spu_rdata_t*>(dst0), *reinterpret_cast<const spu_rdata_t*>(src)))) if (time0 != vm::reservation_acquire(eal) || (size0 == 128 && !cmp_rdata(*reinterpret_cast<spu_rdata_t*>(dst0), *reinterpret_cast<const spu_rdata_t*>(src))))
{ {
continue; continue;
} }
@ -2158,7 +2158,7 @@ void spu_thread::do_dma_transfer(spu_thread* _this, const spu_mfc_cmd& args, u8*
} }
// Lock each cache line // Lock each cache line
auto& res = vm::reservation_acquire(eal, size0); auto& res = vm::reservation_acquire(eal);
// Lock each bit corresponding to a byte being written, using some free space in reservation memory // Lock each bit corresponding to a byte being written, using some free space in reservation memory
auto* bits = reinterpret_cast<atomic_t<u128>*>(vm::g_reservations + (eal & 0xff80) / 2 + 16); auto* bits = reinterpret_cast<atomic_t<u128>*>(vm::g_reservations + (eal & 0xff80) / 2 + 16);
@ -2712,7 +2712,7 @@ bool spu_thread::do_putllc(const spu_mfc_cmd& args)
} }
const auto& to_write = _ref<spu_rdata_t>(args.lsa & 0x3ff80); const auto& to_write = _ref<spu_rdata_t>(args.lsa & 0x3ff80);
auto& res = vm::reservation_acquire(addr, 128); auto& res = vm::reservation_acquire(addr);
// TODO: Limit scope!! // TODO: Limit scope!!
rsx::reservation_lock rsx_lock(addr, 128); rsx::reservation_lock rsx_lock(addr, 128);
@ -2849,7 +2849,7 @@ bool spu_thread::do_putllc(const spu_mfc_cmd& args)
return success; return success;
}()) }())
{ {
vm::reservation_notifier(addr, 128).notify_all(-128); vm::reservation_notifier(addr).notify_all(-128);
raddr = 0; raddr = 0;
perf0.reset(); perf0.reset();
return true; return true;
@ -2894,7 +2894,7 @@ void do_cell_atomic_128_store(u32 addr, const void* to_write)
if (result == 0) if (result == 0)
{ {
auto& sdata = *vm::get_super_ptr<spu_rdata_t>(addr); auto& sdata = *vm::get_super_ptr<spu_rdata_t>(addr);
auto& res = vm::reservation_acquire(addr, 128); auto& res = vm::reservation_acquire(addr);
cpu_thread::suspend_all<+2>(cpu, {&res}, [&] cpu_thread::suspend_all<+2>(cpu, {&res}, [&]
{ {
@ -2954,10 +2954,10 @@ void spu_thread::do_putlluc(const spu_mfc_cmd& args)
} }
do_cell_atomic_128_store(addr, _ptr<spu_rdata_t>(args.lsa & 0x3ff80)); do_cell_atomic_128_store(addr, _ptr<spu_rdata_t>(args.lsa & 0x3ff80));
vm::reservation_notifier(addr, 128).notify_all(-128); vm::reservation_notifier(addr).notify_all(-128);
} }
void spu_thread::do_mfc(bool wait) void spu_thread::do_mfc(bool /*wait*/)
{ {
u32 removed = 0; u32 removed = 0;
u32 barrier = 0; u32 barrier = 0;
@ -3149,7 +3149,7 @@ bool spu_thread::process_mfc_cmd()
spu_log.trace(u8"GETLLAR after fail: addr=0x%x, time=%u c", last_faddr, (perf0.get() - last_ftsc)); spu_log.trace(u8"GETLLAR after fail: addr=0x%x, time=%u c", last_faddr, (perf0.get() - last_ftsc));
} }
if (addr == last_faddr && perf0.get() - last_ftsc < 1000 && (vm::reservation_acquire(addr, 128) & -128) == last_ftime) if (addr == last_faddr && perf0.get() - last_ftsc < 1000 && (vm::reservation_acquire(addr) & -128) == last_ftime)
{ {
rtime = last_ftime; rtime = last_ftime;
raddr = last_faddr; raddr = last_faddr;
@ -3165,7 +3165,7 @@ bool spu_thread::process_mfc_cmd()
last_faddr = 0; last_faddr = 0;
} }
if (addr == raddr && !g_use_rtm && g_cfg.core.spu_getllar_polling_detection && rtime == vm::reservation_acquire(addr, 128) && cmp_rdata(rdata, data)) if (addr == raddr && !g_use_rtm && g_cfg.core.spu_getllar_polling_detection && rtime == vm::reservation_acquire(addr) && cmp_rdata(rdata, data))
{ {
// Spinning, might as well yield cpu resources // Spinning, might as well yield cpu resources
std::this_thread::yield(); std::this_thread::yield();
@ -3193,7 +3193,7 @@ bool spu_thread::process_mfc_cmd()
const bool ok = cpu_thread::if_suspended<0>(this, {&ntime}, [&] const bool ok = cpu_thread::if_suspended<0>(this, {&ntime}, [&]
{ {
// Guaranteed success // Guaranteed success
ntime = vm::reservation_acquire(addr, 128); ntime = vm::reservation_acquire(addr);
mov_rdata_nt(rdata, sdata); mov_rdata_nt(rdata, sdata);
}); });
@ -3218,7 +3218,7 @@ bool spu_thread::process_mfc_cmd()
} }
}()) }())
{ {
ntime = vm::reservation_acquire(addr, 128); ntime = vm::reservation_acquire(addr);
if (ntime & vm::rsrv_unique_lock) if (ntime & vm::rsrv_unique_lock)
{ {
@ -3247,7 +3247,7 @@ bool spu_thread::process_mfc_cmd()
mov_rdata(rdata, data); mov_rdata(rdata, data);
} }
if (u64 time0 = vm::reservation_acquire(addr, 128); (ntime & test_mask) != (time0 & test_mask)) if (u64 time0 = vm::reservation_acquire(addr); (ntime & test_mask) != (time0 & test_mask))
{ {
// Reservation data has been modified recently // Reservation data has been modified recently
if (time0 & vm::rsrv_unique_lock) i += 12; if (time0 & vm::rsrv_unique_lock) i += 12;
@ -3429,7 +3429,7 @@ bool spu_thread::process_mfc_cmd()
//if (g_cfg.core.mfc_debug) //if (g_cfg.core.mfc_debug)
//{ //{
// TODO: This needs a disambiguator with list elements dumping // TODO: This needs a disambiguator with list elements dumping
// auto& dump = reinterpret_cast<mfc_cmd_dump*>(vm::g_stat_addr + vm_offset())[mfc_dump_idx++ % spu_thread::max_mfc_dump_idx]; // auto& dump = reinterpret_cast<mfc_cmd_dump*>(vm::g_stat_addr + vm_offset())[mfc_dump_idx++ % spu_thread::max_mfc_dump_idx];
// dump.cmd = ch_mfc_cmd; // dump.cmd = ch_mfc_cmd;
// dump.cmd.eah = pc; // dump.cmd.eah = pc;
@ -3497,7 +3497,7 @@ bool spu_thread::reservation_check(u32 addr, const decltype(rdata)& data)
return false; return false;
} }
if ((vm::reservation_acquire(addr, 128) & -128) != rtime) if ((vm::reservation_acquire(addr) & -128) != rtime)
{ {
return true; return true;
} }
@ -3883,7 +3883,7 @@ s64 spu_thread::get_ch_value(u32 ch)
continue; continue;
} }
vm::reservation_notifier(raddr, 128).wait(rtime, -128, atomic_wait_timeout{100'000}); vm::reservation_notifier(raddr).wait(rtime, -128, atomic_wait_timeout{100'000});
} }
check_state(); check_state();

View file

@ -161,7 +161,8 @@ void lv2_config_service_listener::notify_all()
std::vector<std::shared_ptr<lv2_config_service>> services; std::vector<std::shared_ptr<lv2_config_service>> services;
// Grab all events // Grab all events
idm::select<lv2_config_service>([&](u32 id, lv2_config_service& service) -> void { idm::select<lv2_config_service>([&](u32 /*id*/, lv2_config_service& service)
{
if (check_service(service)) if (check_service(service))
{ {
services.push_back(service.get_shared_ptr()); services.push_back(service.get_shared_ptr());
@ -169,7 +170,8 @@ void lv2_config_service_listener::notify_all()
}, 0); }, 0);
// Sort services by timestamp // Sort services by timestamp
sort(services.begin(), services.end(), [](const std::shared_ptr<lv2_config_service>& s1, const std::shared_ptr<lv2_config_service>& s2) -> bool { sort(services.begin(), services.end(), [](const std::shared_ptr<lv2_config_service>& s1, const std::shared_ptr<lv2_config_service>& s2)
{
return s1->timestamp < s2->timestamp; return s1->timestamp < s2->timestamp;
}); });
@ -200,7 +202,8 @@ void lv2_config_service::notify() const
auto sptr = wkptr.lock(); auto sptr = wkptr.lock();
idm::select<lv2_config_service_listener>([&](u32 id, lv2_config_service_listener& listener) -> void { idm::select<lv2_config_service_listener>([&](u32 /*id*/, lv2_config_service_listener& listener)
{
if (listener.check_service(*sptr)) if (listener.check_service(*sptr))
listeners.push_back(listener.get_shared_ptr()); listeners.push_back(listener.get_shared_ptr());
}); });

View file

@ -197,7 +197,7 @@ struct lv2_file::file_view : fs::file_base
return m_file->file.stat(); return m_file->file.stat();
} }
bool trunc(u64 length) override bool trunc(u64) override
{ {
return false; return false;
} }
@ -213,7 +213,7 @@ struct lv2_file::file_view : fs::file_base
return result; return result;
} }
u64 write(const void* buffer, u64 size) override u64 write(const void*, u64) override
{ {
return 0; return 0;
} }
@ -248,7 +248,7 @@ fs::file lv2_file::make_view(const std::shared_ptr<lv2_file>& _file, u64 offset)
return result; return result;
} }
error_code sys_fs_test(ppu_thread& ppu, u32 arg1, u32 arg2, vm::ptr<u32> arg3, u32 arg4, vm::ptr<char> buf, u32 buf_size) error_code sys_fs_test(ppu_thread&, u32 arg1, u32 arg2, vm::ptr<u32> arg3, u32 arg4, vm::ptr<char> buf, u32 buf_size)
{ {
sys_fs.trace("sys_fs_test(arg1=0x%x, arg2=0x%x, arg3=*0x%x, arg4=0x%x, buf=*0x%x, buf_size=0x%x)", arg1, arg2, arg3, arg4, buf, buf_size); sys_fs.trace("sys_fs_test(arg1=0x%x, arg2=0x%x, arg3=*0x%x, arg4=0x%x, buf=*0x%x, buf_size=0x%x)", arg1, arg2, arg3, arg4, buf, buf_size);
@ -281,7 +281,7 @@ error_code sys_fs_test(ppu_thread& ppu, u32 arg1, u32 arg2, vm::ptr<u32> arg3, u
return CELL_OK; return CELL_OK;
} }
lv2_file::open_raw_result_t lv2_file::open_raw(const std::string& local_path, s32 flags, s32 mode, lv2_file_type type, const lv2_fs_mount_point* mp) lv2_file::open_raw_result_t lv2_file::open_raw(const std::string& local_path, s32 flags, s32 /*mode*/, lv2_file_type type, const lv2_fs_mount_point* mp)
{ {
// TODO: other checks for path // TODO: other checks for path
@ -1005,7 +1005,7 @@ error_code sys_fs_fstat(ppu_thread& ppu, u32 fd, vm::ptr<CellFsStat> sb)
return CELL_OK; return CELL_OK;
} }
error_code sys_fs_link(ppu_thread& ppu, vm::cptr<char> from, vm::cptr<char> to) error_code sys_fs_link(ppu_thread&, vm::cptr<char> from, vm::cptr<char> to)
{ {
sys_fs.todo("sys_fs_link(from=%s, to=%s)", from, to); sys_fs.todo("sys_fs_link(from=%s, to=%s)", from, to);
@ -1225,7 +1225,7 @@ error_code sys_fs_unlink(ppu_thread& ppu, vm::cptr<char> path)
return CELL_OK; return CELL_OK;
} }
error_code sys_fs_access(ppu_thread& ppu, vm::cptr<char> path, s32 mode) error_code sys_fs_access(ppu_thread&, vm::cptr<char> path, s32 mode)
{ {
sys_fs.todo("sys_fs_access(path=%s, mode=%#o)", path, mode); sys_fs.todo("sys_fs_access(path=%s, mode=%#o)", path, mode);
@ -1732,6 +1732,8 @@ error_code sys_fs_fsync(ppu_thread& ppu, u32 fd)
error_code sys_fs_fget_block_size(ppu_thread& ppu, u32 fd, vm::ptr<u64> sector_size, vm::ptr<u64> block_size, vm::ptr<u64> arg4, vm::ptr<s32> out_flags) error_code sys_fs_fget_block_size(ppu_thread& ppu, u32 fd, vm::ptr<u64> sector_size, vm::ptr<u64> block_size, vm::ptr<u64> arg4, vm::ptr<s32> out_flags)
{ {
ppu.state += cpu_flag::wait;
sys_fs.warning("sys_fs_fget_block_size(fd=%d, sector_size=*0x%x, block_size=*0x%x, arg4=*0x%x, out_flags=*0x%x)", fd, sector_size, block_size, arg4, out_flags); sys_fs.warning("sys_fs_fget_block_size(fd=%d, sector_size=*0x%x, block_size=*0x%x, arg4=*0x%x, out_flags=*0x%x)", fd, sector_size, block_size, arg4, out_flags);
const auto file = idm::get<lv2_fs_object, lv2_file>(fd); const auto file = idm::get<lv2_fs_object, lv2_file>(fd);
@ -1741,6 +1743,11 @@ error_code sys_fs_fget_block_size(ppu_thread& ppu, u32 fd, vm::ptr<u64> sector_s
return CELL_EBADF; return CELL_EBADF;
} }
if (ppu.is_stopped())
{
return {};
}
// TODO // TODO
*sector_size = file->mp->sector_size; *sector_size = file->mp->sector_size;
*block_size = file->mp->block_size; *block_size = file->mp->block_size;
@ -1752,6 +1759,8 @@ error_code sys_fs_fget_block_size(ppu_thread& ppu, u32 fd, vm::ptr<u64> sector_s
error_code sys_fs_get_block_size(ppu_thread& ppu, vm::cptr<char> path, vm::ptr<u64> sector_size, vm::ptr<u64> block_size, vm::ptr<u64> arg4) error_code sys_fs_get_block_size(ppu_thread& ppu, vm::cptr<char> path, vm::ptr<u64> sector_size, vm::ptr<u64> block_size, vm::ptr<u64> arg4)
{ {
ppu.state += cpu_flag::wait;
sys_fs.warning("sys_fs_get_block_size(path=%s, sector_size=*0x%x, block_size=*0x%x, arg4=*0x%x)", path, sector_size, block_size, arg4); sys_fs.warning("sys_fs_get_block_size(path=%s, sector_size=*0x%x, block_size=*0x%x, arg4=*0x%x)", path, sector_size, block_size, arg4);
if (!path) if (!path)
@ -1788,6 +1797,11 @@ error_code sys_fs_get_block_size(ppu_thread& ppu, vm::cptr<char> path, vm::ptr<u
return {CELL_EIO, path}; // ??? return {CELL_EIO, path}; // ???
} }
if (ppu.is_stopped())
{
return {};
}
// TODO // TODO
*sector_size = mp->sector_size; *sector_size = mp->sector_size;
*block_size = mp->block_size; *block_size = mp->block_size;
@ -1890,21 +1904,21 @@ error_code sys_fs_ftruncate(ppu_thread& ppu, u32 fd, u64 size)
return CELL_OK; return CELL_OK;
} }
error_code sys_fs_symbolic_link(ppu_thread& ppu, vm::cptr<char> target, vm::cptr<char> linkpath) error_code sys_fs_symbolic_link(ppu_thread&, vm::cptr<char> target, vm::cptr<char> linkpath)
{ {
sys_fs.todo("sys_fs_symbolic_link(target=%s, linkpath=%s)", target, linkpath); sys_fs.todo("sys_fs_symbolic_link(target=%s, linkpath=%s)", target, linkpath);
return CELL_OK; return CELL_OK;
} }
error_code sys_fs_chmod(ppu_thread& ppu, vm::cptr<char> path, s32 mode) error_code sys_fs_chmod(ppu_thread&, vm::cptr<char> path, s32 mode)
{ {
sys_fs.todo("sys_fs_chmod(path=%s, mode=%#o)", path, mode); sys_fs.todo("sys_fs_chmod(path=%s, mode=%#o)", path, mode);
return CELL_OK; return CELL_OK;
} }
error_code sys_fs_chown(ppu_thread& ppu, vm::cptr<char> path, s32 uid, s32 gid) error_code sys_fs_chown(ppu_thread&, vm::cptr<char> path, s32 uid, s32 gid)
{ {
sys_fs.todo("sys_fs_chown(path=%s, uid=%d, gid=%d)", path, uid, gid); sys_fs.todo("sys_fs_chown(path=%s, uid=%d, gid=%d)", path, uid, gid);
@ -2033,21 +2047,21 @@ error_code sys_fs_utime(ppu_thread& ppu, vm::cptr<char> path, vm::cptr<CellFsUti
return CELL_OK; return CELL_OK;
} }
error_code sys_fs_acl_read(ppu_thread& ppu, vm::cptr<char> path, vm::ptr<void> ptr) error_code sys_fs_acl_read(ppu_thread&, vm::cptr<char> path, vm::ptr<void> ptr)
{ {
sys_fs.todo("sys_fs_acl_read(path=%s, ptr=*0x%x)", path, ptr); sys_fs.todo("sys_fs_acl_read(path=%s, ptr=*0x%x)", path, ptr);
return CELL_OK; return CELL_OK;
} }
error_code sys_fs_acl_write(ppu_thread& ppu, vm::cptr<char> path, vm::ptr<void> ptr) error_code sys_fs_acl_write(ppu_thread&, vm::cptr<char> path, vm::ptr<void> ptr)
{ {
sys_fs.todo("sys_fs_acl_write(path=%s, ptr=*0x%x)", path, ptr); sys_fs.todo("sys_fs_acl_write(path=%s, ptr=*0x%x)", path, ptr);
return CELL_OK; return CELL_OK;
} }
error_code sys_fs_lsn_get_cda_size(ppu_thread& ppu, u32 fd, vm::ptr<u64> ptr) error_code sys_fs_lsn_get_cda_size(ppu_thread&, u32 fd, vm::ptr<u64> ptr)
{ {
sys_fs.warning("sys_fs_lsn_get_cda_size(fd=%d, ptr=*0x%x)", fd, ptr); sys_fs.warning("sys_fs_lsn_get_cda_size(fd=%d, ptr=*0x%x)", fd, ptr);
@ -2063,14 +2077,14 @@ error_code sys_fs_lsn_get_cda_size(ppu_thread& ppu, u32 fd, vm::ptr<u64> ptr)
return CELL_OK; return CELL_OK;
} }
error_code sys_fs_lsn_get_cda(ppu_thread& ppu, u32 fd, vm::ptr<void> arg2, u64 arg3, vm::ptr<u64> arg4) error_code sys_fs_lsn_get_cda(ppu_thread&, u32 fd, vm::ptr<void> arg2, u64 arg3, vm::ptr<u64> arg4)
{ {
sys_fs.todo("sys_fs_lsn_get_cda(fd=%d, arg2=*0x%x, arg3=0x%x, arg4=*0x%x)", fd, arg2, arg3, arg4); sys_fs.todo("sys_fs_lsn_get_cda(fd=%d, arg2=*0x%x, arg3=0x%x, arg4=*0x%x)", fd, arg2, arg3, arg4);
return CELL_OK; return CELL_OK;
} }
error_code sys_fs_lsn_lock(ppu_thread& ppu, u32 fd) error_code sys_fs_lsn_lock(ppu_thread&, u32 fd)
{ {
sys_fs.trace("sys_fs_lsn_lock(fd=%d)", fd); sys_fs.trace("sys_fs_lsn_lock(fd=%d)", fd);
@ -2091,7 +2105,7 @@ error_code sys_fs_lsn_lock(ppu_thread& ppu, u32 fd)
return CELL_OK; return CELL_OK;
} }
error_code sys_fs_lsn_unlock(ppu_thread& ppu, u32 fd) error_code sys_fs_lsn_unlock(ppu_thread&, u32 fd)
{ {
sys_fs.trace("sys_fs_lsn_unlock(fd=%d)", fd); sys_fs.trace("sys_fs_lsn_unlock(fd=%d)", fd);
@ -2107,56 +2121,56 @@ error_code sys_fs_lsn_unlock(ppu_thread& ppu, u32 fd)
return CELL_OK; return CELL_OK;
} }
error_code sys_fs_lsn_read(ppu_thread& ppu, u32 fd, vm::cptr<void> ptr, u64 size) error_code sys_fs_lsn_read(ppu_thread&, u32 fd, vm::cptr<void> ptr, u64 size)
{ {
sys_fs.todo("sys_fs_lsn_read(fd=%d, ptr=*0x%x, size=0x%x)", fd, ptr, size); sys_fs.todo("sys_fs_lsn_read(fd=%d, ptr=*0x%x, size=0x%x)", fd, ptr, size);
return CELL_OK; return CELL_OK;
} }
error_code sys_fs_lsn_write(ppu_thread& ppu, u32 fd, vm::cptr<void> ptr, u64 size) error_code sys_fs_lsn_write(ppu_thread&, u32 fd, vm::cptr<void> ptr, u64 size)
{ {
sys_fs.todo("sys_fs_lsn_write(fd=%d, ptr=*0x%x, size=0x%x)", fd, ptr, size); sys_fs.todo("sys_fs_lsn_write(fd=%d, ptr=*0x%x, size=0x%x)", fd, ptr, size);
return CELL_OK; return CELL_OK;
} }
error_code sys_fs_mapped_allocate(ppu_thread& ppu, u32 fd, u64 size, vm::pptr<void> out_ptr) error_code sys_fs_mapped_allocate(ppu_thread&, u32 fd, u64 size, vm::pptr<void> out_ptr)
{ {
sys_fs.todo("sys_fs_mapped_allocate(fd=%d, arg2=0x%x, out_ptr=**0x%x)", fd, size, out_ptr); sys_fs.todo("sys_fs_mapped_allocate(fd=%d, arg2=0x%x, out_ptr=**0x%x)", fd, size, out_ptr);
return CELL_OK; return CELL_OK;
} }
error_code sys_fs_mapped_free(ppu_thread& ppu, u32 fd, vm::ptr<void> ptr) error_code sys_fs_mapped_free(ppu_thread&, u32 fd, vm::ptr<void> ptr)
{ {
sys_fs.todo("sys_fs_mapped_free(fd=%d, ptr=0x%#x)", fd, ptr); sys_fs.todo("sys_fs_mapped_free(fd=%d, ptr=0x%#x)", fd, ptr);
return CELL_OK; return CELL_OK;
} }
error_code sys_fs_truncate2(ppu_thread& ppu, u32 fd, u64 size) error_code sys_fs_truncate2(ppu_thread&, u32 fd, u64 size)
{ {
sys_fs.todo("sys_fs_truncate2(fd=%d, size=0x%x)", fd, size); sys_fs.todo("sys_fs_truncate2(fd=%d, size=0x%x)", fd, size);
return CELL_OK; return CELL_OK;
} }
error_code sys_fs_get_mount_info_size(ppu_thread& ppu, vm::ptr<u64> len) error_code sys_fs_get_mount_info_size(ppu_thread&, vm::ptr<u64> len)
{ {
sys_fs.todo("sys_fs_get_mount_info_size(len=*0x%x)", len); sys_fs.todo("sys_fs_get_mount_info_size(len=*0x%x)", len);
return CELL_OK; return CELL_OK;
} }
error_code sys_fs_get_mount_info(ppu_thread& ppu, vm::ptr<CellFsMountInfo> info, u32 len, vm::ptr<u64> out_len) error_code sys_fs_get_mount_info(ppu_thread&, vm::ptr<CellFsMountInfo> info, u32 len, vm::ptr<u64> out_len)
{ {
sys_fs.todo("sys_fs_get_mount_info(info=*0x%x, len=0x%x, out_len=*0x%x)", info, len, out_len); sys_fs.todo("sys_fs_get_mount_info(info=*0x%x, len=0x%x, out_len=*0x%x)", info, len, out_len);
return CELL_OK; return CELL_OK;
} }
error_code sys_fs_mount(ppu_thread& ppu, vm::cptr<char> dev_name, vm::cptr<char> file_system, vm::cptr<char> path, s32 unk1, s32 prot, s32 unk3, vm::cptr<char> str1, u32 str_len) error_code sys_fs_mount(ppu_thread&, vm::cptr<char> dev_name, vm::cptr<char> file_system, vm::cptr<char> path, s32 unk1, s32 prot, s32 unk3, vm::cptr<char> str1, u32 str_len)
{ {
sys_fs.todo("sys_fs_mount(dev_name=%s, file_system=%s, path=%s, unk1=0x%x, prot=0x%x, unk3=0x%x, str1=%s, str_len=%d)", dev_name, file_system, path, unk1, prot, unk3, str1, str_len); sys_fs.todo("sys_fs_mount(dev_name=%s, file_system=%s, path=%s, unk1=0x%x, prot=0x%x, unk3=0x%x, str1=%s, str_len=%d)", dev_name, file_system, path, unk1, prot, unk3, str1, str_len);

View file

@ -699,7 +699,7 @@ struct nt_p2p_port
return true; return true;
} }
bool handle_listening(s32 sock_id, lv2_socket::p2ps_i::encapsulated_tcp* tcp_header, u8* data, ::sockaddr_storage* op_addr) bool handle_listening(s32 sock_id, lv2_socket::p2ps_i::encapsulated_tcp* tcp_header, u8* /*data*/, ::sockaddr_storage* op_addr)
{ {
auto sock = idm::get<lv2_socket>(sock_id); auto sock = idm::get<lv2_socket>(sock_id);
if (!sock) if (!sock)
@ -3656,7 +3656,7 @@ error_code _sys_net_write_dump(ppu_thread& ppu, s32 id, vm::cptr<void> buf, s32
{ {
ppu.state += cpu_flag::wait; ppu.state += cpu_flag::wait;
sys_net.todo(__func__); sys_net.todo("_sys_net_write_dump(id=0x%x, buf=*0x%x, len=%d, unk=0x%x)", id, buf, len, unknown);
return CELL_OK; return CELL_OK;
} }

View file

@ -19,7 +19,7 @@ extern void ppu_finalize(const ppu_module&);
LOG_CHANNEL(sys_overlay); LOG_CHANNEL(sys_overlay);
static error_code overlay_load_module(vm::ptr<u32> ovlmid, const std::string& vpath, u64 flags, vm::ptr<u32> entry, fs::file src = {}) static error_code overlay_load_module(vm::ptr<u32> ovlmid, const std::string& vpath, u64 /*flags*/, vm::ptr<u32> entry, fs::file src = {})
{ {
if (!src) if (!src)
{ {

View file

@ -272,7 +272,7 @@ error_code _sys_process_get_paramsfo(vm::ptr<char> buffer)
return CELL_OK; return CELL_OK;
} }
s32 process_get_sdk_version(u32 pid, s32& ver) s32 process_get_sdk_version(u32 /*pid*/, s32& ver)
{ {
// get correct SDK version for selected pid // get correct SDK version for selected pid
ver = g_ps3_process_info.sdk_ver; ver = g_ps3_process_info.sdk_ver;

View file

@ -169,7 +169,7 @@ extern const std::map<std::string_view, int> g_prx_list
{ "libwmadec.sprx", 0 }, { "libwmadec.sprx", 0 },
}; };
static error_code prx_load_module(const std::string& vpath, u64 flags, vm::ptr<sys_prx_load_module_option_t> pOpt, fs::file src = {}) static error_code prx_load_module(const std::string& vpath, u64 flags, vm::ptr<sys_prx_load_module_option_t> /*pOpt*/, fs::file src = {})
{ {
if (flags != 0) if (flags != 0)
{ {
@ -323,7 +323,7 @@ error_code _sys_prx_load_module_on_memcontainer_by_fd(ppu_thread& ppu, s32 fd, u
return _sys_prx_load_module_by_fd(ppu, fd, offset, flags, pOpt); return _sys_prx_load_module_by_fd(ppu, fd, offset, flags, pOpt);
} }
static error_code prx_load_module_list(ppu_thread& ppu, s32 count, vm::cpptr<char, u32, u64> path_list, u32 mem_ct, u64 flags, vm::ptr<sys_prx_load_module_option_t> pOpt, vm::ptr<u32> id_list) static error_code prx_load_module_list(ppu_thread& ppu, s32 count, vm::cpptr<char, u32, u64> path_list, u32 /*mem_ct*/, u64 flags, vm::ptr<sys_prx_load_module_option_t> pOpt, vm::ptr<u32> id_list)
{ {
if (flags != 0) if (flags != 0)
{ {

View file

@ -2026,7 +2026,7 @@ error_code sys_isolated_spu_destroy(ppu_thread& ppu, u32 id)
} }
template <bool isolated = false> template <bool isolated = false>
error_code raw_spu_create_interrupt_tag(u32 id, u32 class_id, u32 hwthread, vm::ptr<u32> intrtag) error_code raw_spu_create_interrupt_tag(u32 id, u32 class_id, u32 /*hwthread*/, vm::ptr<u32> intrtag)
{ {
if (class_id != 0 && class_id != 2) if (class_id != 0 && class_id != 2)
{ {

View file

@ -625,7 +625,7 @@ error_code sys_usbd_register_ldd(ppu_thread& ppu, u32 handle, vm::ptr<char> s_pr
return CELL_OK; return CELL_OK;
} }
error_code sys_usbd_unregister_ldd(ppu_thread& ppu) error_code sys_usbd_unregister_ldd(ppu_thread&)
{ {
sys_usbd.todo("sys_usbd_unregister_ldd()"); sys_usbd.todo("sys_usbd_unregister_ldd()");
return CELL_OK; return CELL_OK;

View file

@ -480,7 +480,7 @@ bool gdb_thread::set_reg(ppu_thread* thread, u32 rid, std::string value)
} }
} }
u32 gdb_thread::get_reg_size(ppu_thread* thread, u32 rid) u32 gdb_thread::get_reg_size(ppu_thread*, u32 rid)
{ {
switch (rid) { switch (rid) {
case 66: case 66:
@ -523,22 +523,22 @@ void gdb_thread::wait_with_interrupts()
} }
} }
bool gdb_thread::cmd_extended_mode(gdb_cmd& cmd) bool gdb_thread::cmd_extended_mode(gdb_cmd&)
{ {
return send_cmd_ack("OK"); return send_cmd_ack("OK");
} }
bool gdb_thread::cmd_reason(gdb_cmd& cmd) bool gdb_thread::cmd_reason(gdb_cmd&)
{ {
return send_reason(); return send_reason();
} }
bool gdb_thread::cmd_supported(gdb_cmd& cmd) bool gdb_thread::cmd_supported(gdb_cmd&)
{ {
return send_cmd_ack("PacketSize=1200"); return send_cmd_ack("PacketSize=1200");
} }
bool gdb_thread::cmd_thread_info(gdb_cmd& cmd) bool gdb_thread::cmd_thread_info(gdb_cmd&)
{ {
std::string result; std::string result;
const auto on_select = [&](u32, cpu_thread& cpu) const auto on_select = [&](u32, cpu_thread& cpu)
@ -557,7 +557,7 @@ bool gdb_thread::cmd_thread_info(gdb_cmd& cmd)
return send_cmd_ack(result);; return send_cmd_ack(result);;
} }
bool gdb_thread::cmd_current_thread(gdb_cmd& cmd) bool gdb_thread::cmd_current_thread(gdb_cmd&)
{ {
return send_cmd_ack(selected_thread.expired() ? "" : ("QC" + u64_to_padded_hex(selected_thread.lock()->id))); return send_cmd_ack(selected_thread.expired() ? "" : ("QC" + u64_to_padded_hex(selected_thread.lock()->id)));
} }
@ -657,7 +657,7 @@ bool gdb_thread::cmd_write_memory(gdb_cmd& cmd)
return send_cmd_ack("OK"); return send_cmd_ack("OK");
} }
bool gdb_thread::cmd_read_all_registers(gdb_cmd& cmd) bool gdb_thread::cmd_read_all_registers(gdb_cmd&)
{ {
std::string result; std::string result;
select_thread(general_ops_thread_id); select_thread(general_ops_thread_id);
@ -711,19 +711,19 @@ bool gdb_thread::cmd_set_thread_ops(gdb_cmd& cmd)
return send_cmd_ack("E01"); return send_cmd_ack("E01");
} }
bool gdb_thread::cmd_attached_to_what(gdb_cmd& cmd) bool gdb_thread::cmd_attached_to_what(gdb_cmd&)
{ {
//creating processes from client is not available yet //creating processes from client is not available yet
return send_cmd_ack("1"); return send_cmd_ack("1");
} }
bool gdb_thread::cmd_kill(gdb_cmd& cmd) bool gdb_thread::cmd_kill(gdb_cmd&)
{ {
Emu.Stop(); Emu.Stop();
return true; return true;
} }
bool gdb_thread::cmd_continue_support(gdb_cmd& cmd) bool gdb_thread::cmd_continue_support(gdb_cmd&)
{ {
return send_cmd_ack("vCont;c;s;C;S"); return send_cmd_ack("vCont;c;s;C;S");
} }

View file

@ -42,7 +42,7 @@ void usb_device_buzz::control_transfer(u8 bmRequestType, u8 bRequest, u16 wValue
} }
} }
void usb_device_buzz::interrupt_transfer(u32 buf_size, u8* buf, u32 endpoint, UsbTransfer* transfer) void usb_device_buzz::interrupt_transfer(u32 buf_size, u8* buf, u32 /*endpoint*/, UsbTransfer* transfer)
{ {
transfer->fake = true; transfer->fake = true;
transfer->expected_count = 5; transfer->expected_count = 5;

View file

@ -45,7 +45,7 @@ void usb_device_ghltar::control_transfer(u8 bmRequestType, u8 bRequest, u16 wVal
} }
} }
void usb_device_ghltar::interrupt_transfer(u32 buf_size, u8* buf, u32 endpoint, UsbTransfer* transfer) void usb_device_ghltar::interrupt_transfer(u32 buf_size, u8* buf, u32 /*endpoint*/, UsbTransfer* transfer)
{ {
transfer->fake = true; transfer->fake = true;
transfer->expected_count = buf_size; transfer->expected_count = buf_size;

View file

@ -307,7 +307,7 @@ void usb_device_skylander::control_transfer(u8 bmRequestType, u8 bRequest, u16 w
} }
} }
void usb_device_skylander::interrupt_transfer(u32 buf_size, u8* buf, u32 endpoint, UsbTransfer* transfer) void usb_device_skylander::interrupt_transfer(u32 buf_size, u8* buf, u32 /*endpoint*/, UsbTransfer* transfer)
{ {
ensure(buf_size == 0x20); ensure(buf_size == 0x20);

View file

@ -102,7 +102,7 @@ bool usb_device_passthrough::set_interface(u8 int_num)
return (libusb_claim_interface(lusb_handle, int_num) == LIBUSB_SUCCESS); return (libusb_claim_interface(lusb_handle, int_num) == LIBUSB_SUCCESS);
} }
void usb_device_passthrough::control_transfer(u8 bmRequestType, u8 bRequest, u16 wValue, u16 wIndex, u16 wLength, u32 buf_size, u8* buf, UsbTransfer* transfer) void usb_device_passthrough::control_transfer(u8 bmRequestType, u8 bRequest, u16 wValue, u16 wIndex, u16 /*wLength*/, u32 buf_size, u8* buf, UsbTransfer* transfer)
{ {
if (transfer->setup_buf.size() < buf_size + 8) if (transfer->setup_buf.size() < buf_size + 8)
transfer->setup_buf.resize(buf_size + 8); transfer->setup_buf.resize(buf_size + 8);
@ -150,7 +150,7 @@ bool usb_device_emulated::open_device()
return true; return true;
} }
s32 usb_device_emulated::get_descriptor(u8 type, u8 index, u8* ptr, u32 max_size) s32 usb_device_emulated::get_descriptor(u8 type, u8 index, u8* ptr, u32 /*max_size*/)
{ {
if (type == USB_DESCRIPTOR_STRING) if (type == USB_DESCRIPTOR_STRING)
{ {
@ -175,7 +175,7 @@ s32 usb_device_emulated::get_descriptor(u8 type, u8 index, u8* ptr, u32 max_size
return -1; return -1;
} }
void usb_device_emulated::control_transfer(u8 bmRequestType, u8 bRequest, u16 wValue, u16 wIndex, u16 wLength, u32 buf_size, u8* buf, UsbTransfer* transfer) void usb_device_emulated::control_transfer(u8 bmRequestType, u8 bRequest, u16 wValue, u16 /*wIndex*/, u16 /*wLength*/, u32 buf_size, u8* /*buf*/, UsbTransfer* transfer)
{ {
transfer->fake = true; transfer->fake = true;
transfer->expected_count = buf_size; transfer->expected_count = buf_size;
@ -195,6 +195,11 @@ void usb_device_emulated::control_transfer(u8 bmRequestType, u8 bRequest, u16 wV
} }
} }
// Temporarily
#ifndef _MSC_VER
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
void usb_device_emulated::interrupt_transfer(u32 buf_size, u8* buf, u32 endpoint, UsbTransfer* transfer) void usb_device_emulated::interrupt_transfer(u32 buf_size, u8* buf, u32 endpoint, UsbTransfer* transfer)
{ {
} }

View file

@ -85,7 +85,7 @@ namespace vm
std::pair<bool, u64> try_reservation_update(u32 addr) std::pair<bool, u64> try_reservation_update(u32 addr)
{ {
// Update reservation info with new timestamp // Update reservation info with new timestamp
auto& res = reservation_acquire(addr, 1); auto& res = reservation_acquire(addr);
const u64 rtime = res; const u64 rtime = res;
return {!(rtime & vm::rsrv_unique_lock) && res.compare_and_swap_test(rtime, rtime + 128), rtime}; return {!(rtime & vm::rsrv_unique_lock) && res.compare_and_swap_test(rtime, rtime + 128), rtime};
@ -609,7 +609,7 @@ namespace vm
void reservation_op_internal(u32 addr, std::function<bool()> func) void reservation_op_internal(u32 addr, std::function<bool()> func)
{ {
auto& res = vm::reservation_acquire(addr, 1); auto& res = vm::reservation_acquire(addr);
auto* ptr = vm::get_super_ptr(addr & -128); auto* ptr = vm::get_super_ptr(addr & -128);
cpu_thread::suspend_all<+1>(get_current_cpu_thread(), {ptr, ptr + 64, &res}, [&] cpu_thread::suspend_all<+1>(get_current_cpu_thread(), {ptr, ptr + 64, &res}, [&]

View file

@ -36,7 +36,7 @@ namespace vm
}; };
// Get reservation status for further atomic update: last update timestamp // Get reservation status for further atomic update: last update timestamp
inline atomic_t<u64>& reservation_acquire(u32 addr, u32 size) inline atomic_t<u64>& reservation_acquire(u32 addr)
{ {
// Access reservation info: stamp and the lock bit // Access reservation info: stamp and the lock bit
return *reinterpret_cast<atomic_t<u64>*>(g_reservations + (addr & 0xff80) / 2); return *reinterpret_cast<atomic_t<u64>*>(g_reservations + (addr & 0xff80) / 2);
@ -46,7 +46,7 @@ namespace vm
void reservation_update(u32 addr); void reservation_update(u32 addr);
// Get reservation sync variable // Get reservation sync variable
inline atomic_t<u64>& reservation_notifier(u32 addr, u32 size) inline atomic_t<u64>& reservation_notifier(u32 addr)
{ {
return *reinterpret_cast<atomic_t<u64>*>(g_reservations + (addr & 0xff80) / 2); return *reinterpret_cast<atomic_t<u64>*>(g_reservations + (addr & 0xff80) / 2);
} }
@ -67,7 +67,7 @@ namespace vm
inline std::pair<atomic_t<u64>&, u64> reservation_lock(u32 addr) inline std::pair<atomic_t<u64>&, u64> reservation_lock(u32 addr)
{ {
auto res = &vm::reservation_acquire(addr, 1); auto res = &vm::reservation_acquire(addr);
auto rtime = res->load(); auto rtime = res->load();
if (rtime & 127 || !reservation_try_lock(*res, rtime)) [[unlikely]] if (rtime & 127 || !reservation_try_lock(*res, rtime)) [[unlikely]]
@ -105,7 +105,7 @@ namespace vm
// Use 128-byte aligned addr // Use 128-byte aligned addr
const u32 addr = static_cast<u32>(ptr.addr()) & -128; const u32 addr = static_cast<u32>(ptr.addr()) & -128;
auto& res = vm::reservation_acquire(addr, 128); auto& res = vm::reservation_acquire(addr);
//_m_prefetchw(&res); //_m_prefetchw(&res);
if (g_use_rtm) if (g_use_rtm)
@ -346,7 +346,7 @@ namespace vm
} }
} }
const u64 rtime = vm::reservation_acquire(addr, 128); const u64 rtime = vm::reservation_acquire(addr);
if (rtime & 127) if (rtime & 127)
{ {
@ -358,7 +358,7 @@ namespace vm
{ {
std::invoke(op, *ptr); std::invoke(op, *ptr);
if (rtime == vm::reservation_acquire(addr, 128)) if (rtime == vm::reservation_acquire(addr))
{ {
return; return;
} }
@ -367,7 +367,7 @@ namespace vm
{ {
auto res = std::invoke(op, *ptr); auto res = std::invoke(op, *ptr);
if (rtime == vm::reservation_acquire(addr, 128)) if (rtime == vm::reservation_acquire(addr))
{ {
return res; return res;
} }
@ -385,7 +385,7 @@ namespace vm
const auto sptr = vm::get_super_ptr<T>(addr); const auto sptr = vm::get_super_ptr<T>(addr);
// "Lock" reservation // "Lock" reservation
auto& res = vm::reservation_acquire(addr, 128); auto& res = vm::reservation_acquire(addr);
auto [_old, _ok] = res.fetch_op([&](u64& r) auto [_old, _ok] = res.fetch_op([&](u64& r)
{ {

View file

@ -14,7 +14,7 @@ namespace vm
return vm::cast(vm::alloc(size, Location, std::max<u32>(align, 0x10000))); return vm::cast(vm::alloc(size, Location, std::max<u32>(align, 0x10000)));
} }
static inline void dealloc(u32 addr, u32 size = 0) noexcept static inline void dealloc(u32 addr, u32 /*size*/ = 0) noexcept
{ {
ensure(vm::dealloc(addr, Location)); ensure(vm::dealloc(addr, Location));
} }

View file

@ -471,7 +471,7 @@ u32 np_handler::get_server_status(SceNpMatching2ContextId ctx_id, vm::cptr<SceNp
return req_id; return req_id;
} }
u32 np_handler::create_server_context(SceNpMatching2ContextId ctx_id, vm::cptr<SceNpMatching2RequestOptParam> optParam, u16 server_id) u32 np_handler::create_server_context(SceNpMatching2ContextId ctx_id, vm::cptr<SceNpMatching2RequestOptParam> optParam, u16 /*server_id*/)
{ {
u32 req_id = generate_callback_info(ctx_id, optParam); u32 req_id = generate_callback_info(ctx_id, optParam);
u32 event_key = get_event_key(); u32 event_key = get_event_key();
@ -636,7 +636,7 @@ void np_handler::req_sign_infos(const std::string& npid, u32 conn_id)
return; return;
} }
void np_handler::req_ticket(u32 version, const SceNpId *npid, const char *service_id, const u8 *cookie, u32 cookie_size, const char *entitlement_id, u32 consumed_count) void np_handler::req_ticket(u32 /*version*/, const SceNpId* /*npid*/, const char* service_id, const u8* /*cookie*/, u32 /*cookie_size*/, const char* /*entitlement_id*/, u32 /*consumed_count*/)
{ {
u32 req_id = get_req_id(0x3333); u32 req_id = get_req_id(0x3333);
@ -910,7 +910,7 @@ bool np_handler::reply_search_room(u32 req_id, std::vector<u8>& reply_data)
return true; return true;
} }
bool np_handler::reply_set_roomdata_external(u32 req_id, std::vector<u8>& reply_data) bool np_handler::reply_set_roomdata_external(u32 req_id, std::vector<u8>& /*reply_data*/)
{ {
if (pending_requests.count(req_id) == 0) if (pending_requests.count(req_id) == 0)
return error_and_disconnect("Unexpected reply ID to SetRoomDataExternal"); return error_and_disconnect("Unexpected reply ID to SetRoomDataExternal");
@ -963,7 +963,7 @@ bool np_handler::reply_get_roomdata_internal(u32 req_id, std::vector<u8>& reply_
return true; return true;
} }
bool np_handler::reply_set_roomdata_internal(u32 req_id, std::vector<u8>& reply_data) bool np_handler::reply_set_roomdata_internal(u32 req_id, std::vector<u8>& /*reply_data*/)
{ {
if (pending_requests.count(req_id) == 0) if (pending_requests.count(req_id) == 0)
return error_and_disconnect("Unexpected reply ID to SetRoomDataInternal"); return error_and_disconnect("Unexpected reply ID to SetRoomDataInternal");
@ -1012,7 +1012,7 @@ bool np_handler::reply_get_ping_info(u32 req_id, std::vector<u8>& reply_data)
return true; return true;
} }
bool np_handler::reply_send_room_message(u32 req_id, std::vector<u8>& reply_data) bool np_handler::reply_send_room_message(u32 req_id, std::vector<u8>& /*reply_data*/)
{ {
if (pending_requests.count(req_id) == 0) if (pending_requests.count(req_id) == 0)
return error_and_disconnect("Unexpected reply ID to PingRoomOwner"); return error_and_disconnect("Unexpected reply ID to PingRoomOwner");
@ -1050,7 +1050,7 @@ bool np_handler::reply_req_sign_infos(u32 req_id, std::vector<u8>& reply_data)
return true; return true;
} }
bool np_handler::reply_req_ticket(u32 req_id, std::vector<u8>& reply_data) bool np_handler::reply_req_ticket(u32 /*req_id*/, std::vector<u8>& reply_data)
{ {
vec_stream reply(reply_data, 1); vec_stream reply(reply_data, 1);
auto ticket_raw = reply.get_rawdata(); auto ticket_raw = reply.get_rawdata();
@ -1372,7 +1372,7 @@ u8* np_handler::allocate_req_result(u32 event_key, usz size)
return match2_req_results[event_key].data(); return match2_req_results[event_key].data();
} }
u32 np_handler::add_players_to_history(vm::cptr<SceNpId> npids, u32 count) u32 np_handler::add_players_to_history(vm::cptr<SceNpId> /*npids*/, u32 /*count*/)
{ {
const u32 req_id = get_req_id(0); const u32 req_id = get_req_id(0);

View file

@ -54,7 +54,7 @@ namespace rsx
return contextInfo->context_id; return contextInfo->context_id;
} }
std::vector<u32> rsx_replay_thread::alloc_write_fifo(be_t<u32> context_id) std::vector<u32> rsx_replay_thread::alloc_write_fifo(be_t<u32> /*context_id*/)
{ {
// copy commands into fifo buffer // copy commands into fifo buffer
// todo: could change rsx_command to just be values to avoid this loop, // todo: could change rsx_command to just be values to avoid this loop,

View file

@ -140,7 +140,7 @@ struct copy_unmodified_block_swizzled
struct copy_unmodified_block_vtc struct copy_unmodified_block_vtc
{ {
template<typename T, typename U> template<typename T, typename U>
static void copy_mipmap_level(gsl::span<T> dst, gsl::span<const U> src, u16 width_in_block, u16 row_count, u16 depth, u32 dst_pitch_in_block, u32 src_pitch_in_block) static void copy_mipmap_level(gsl::span<T> dst, gsl::span<const U> src, u16 width_in_block, u16 row_count, u16 depth, u32 /*dst_pitch_in_block*/, u32 /*src_pitch_in_block*/)
{ {
static_assert(sizeof(T) == sizeof(U), "Type size doesn't match."); static_assert(sizeof(T) == sizeof(U), "Type size doesn't match.");
u32 row_element_count = width_in_block * row_count; u32 row_element_count = width_in_block * row_count;

View file

@ -1226,7 +1226,7 @@ namespace rsx
} }
template <typename ...Args> template <typename ...Args>
void discard_framebuffer_memory_region(commandbuffer_type& cmd, const address_range& rsx_range, Args&&... extras) void discard_framebuffer_memory_region(commandbuffer_type& /*cmd*/, const address_range& rsx_range, Args&&... /*extras*/)
{ {
if (g_cfg.video.write_color_buffers || g_cfg.video.write_depth_buffer) if (g_cfg.video.write_color_buffers || g_cfg.video.write_depth_buffer)
{ {
@ -1565,7 +1565,7 @@ namespace rsx
} }
} }
template <typename surface_store_type, typename ...Args> template <typename SurfaceStoreType, typename... Args>
sampled_image_descriptor fast_texture_search( sampled_image_descriptor fast_texture_search(
commandbuffer_type& cmd, commandbuffer_type& cmd,
const image_section_attributes_t& attr, const image_section_attributes_t& attr,
@ -1575,7 +1575,7 @@ namespace rsx
const texture_cache_search_options& options, const texture_cache_search_options& options,
const utils::address_range& memory_range, const utils::address_range& memory_range,
rsx::texture_dimension_extended extended_dimension, rsx::texture_dimension_extended extended_dimension,
surface_store_type& m_rtts, Args&& ... extras) SurfaceStoreType& m_rtts, Args&&... /*extras*/)
{ {
if (options.is_compressed_format) [[likely]] if (options.is_compressed_format) [[likely]]
{ {
@ -1609,7 +1609,7 @@ namespace rsx
} }
} }
std::vector<typename surface_store_type::surface_overlap_info> overlapping_fbos; std::vector<typename SurfaceStoreType::surface_overlap_info> overlapping_fbos;
std::vector<section_storage_type*> overlapping_locals; std::vector<section_storage_type*> overlapping_locals;
auto fast_fbo_check = [&]() -> sampled_image_descriptor auto fast_fbo_check = [&]() -> sampled_image_descriptor

View file

@ -238,7 +238,7 @@ namespace rsx
const surface_store_list_type& fbos, const surface_store_list_type& fbos,
const std::vector<section_storage_type*>& local, const std::vector<section_storage_type*>& local,
const image_section_attributes_t& attr, const image_section_attributes_t& attr,
u16 count, bool is_depth) u16 count, bool /*is_depth*/)
{ {
// Need to preserve sorting order // Need to preserve sorting order
struct sort_helper struct sort_helper
@ -589,7 +589,7 @@ namespace rsx
const image_section_attributes_t& attr, const image_section_attributes_t& attr,
const size2f& scale, const size2f& scale,
texture_dimension_extended extended_dimension, texture_dimension_extended extended_dimension,
u32 encoded_remap, const texture_channel_remap_t& decoded_remap, u32 /*encoded_remap*/, const texture_channel_remap_t& decoded_remap,
int select_hint = -1) int select_hint = -1)
{ {
ensure((select_hint & 0x1) == select_hint); ensure((select_hint & 0x1) == select_hint);

View file

@ -61,8 +61,8 @@ namespace gl
// https://www.khronos.org/opengl/wiki/Debug_Output // https://www.khronos.org/opengl/wiki/Debug_Output
void APIENTRY log_debug(GLenum source, GLenum type, GLuint id, void APIENTRY log_debug(GLenum source, GLenum type, GLuint id,
GLenum severity, GLsizei length, const GLchar* message, GLenum severity, GLsizei /*length*/, const GLchar* message,
const void* user_param) const void* /*user_param*/)
{ {
// Message source // Message source
std::string str_source; std::string str_source;
@ -631,7 +631,7 @@ namespace gl
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, GL_NONE, 0); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, GL_NONE, 0);
} }
void blitter::fast_clear_image(gl::command_context& cmd, const texture* dst, float depth, u8 stencil) void blitter::fast_clear_image(gl::command_context& cmd, const texture* dst, float /*depth*/, u8 /*stencil*/)
{ {
GLenum attachment; GLenum attachment;
GLbitfield clear_mask; GLbitfield clear_mask;

View file

@ -99,7 +99,7 @@ u8 rsx::internals::get_pixel_size(rsx::surface_depth_format format)
fmt::throw_exception("Unknown depth format"); fmt::throw_exception("Unknown depth format");
} }
void GLGSRender::init_buffers(rsx::framebuffer_creation_context context, bool skip_reading) void GLGSRender::init_buffers(rsx::framebuffer_creation_context context, bool /*skip_reading*/)
{ {
const bool clipped_scissor = (context == rsx::framebuffer_creation_context::context_draw); const bool clipped_scissor = (context == rsx::framebuffer_creation_context::context_draw);
if (m_current_framebuffer_context == context && !m_rtts_dirty && m_draw_fbo) if (m_current_framebuffer_context == context && !m_rtts_dirty && m_draw_fbo)

View file

@ -66,7 +66,7 @@ namespace
, m_vertex_layout(vertex_layout) , m_vertex_layout(vertex_layout)
{} {}
vertex_input_state operator()(const rsx::draw_array_command& command) vertex_input_state operator()(const rsx::draw_array_command& /*command*/)
{ {
const u32 vertex_count = rsx::method_registers.current_draw_clause.get_elements_count(); const u32 vertex_count = rsx::method_registers.current_draw_clause.get_elements_count();
const u32 min_index = rsx::method_registers.current_draw_clause.min_index(); const u32 min_index = rsx::method_registers.current_draw_clause.min_index();
@ -127,7 +127,7 @@ namespace
return{ true, min_index, max_index, index_count, index_offset, std::make_tuple(get_index_type(type), offset_in_index_buffer) }; return{ true, min_index, max_index, index_count, index_offset, std::make_tuple(get_index_type(type), offset_in_index_buffer) };
} }
vertex_input_state operator()(const rsx::draw_inlined_array& command) vertex_input_state operator()(const rsx::draw_inlined_array& /*command*/)
{ {
const auto stream_length = rsx::method_registers.current_draw_clause.inline_vertex_array.size(); const auto stream_length = rsx::method_registers.current_draw_clause.inline_vertex_array.size();
const u32 vertex_count = u32(stream_length * sizeof(u32)) / m_vertex_layout.interleaved_blocks[0].attribute_stride; const u32 vertex_count = u32(stream_length * sizeof(u32)) / m_vertex_layout.interleaved_blocks[0].attribute_stride;

View file

@ -13,7 +13,7 @@ std::string GLVertexDecompilerThread::getFloatTypeName(usz elementCount)
return glsl::getFloatTypeNameImpl(elementCount); return glsl::getFloatTypeNameImpl(elementCount);
} }
std::string GLVertexDecompilerThread::getIntTypeName(usz elementCount) std::string GLVertexDecompilerThread::getIntTypeName(usz /*elementCount*/)
{ {
return "ivec4"; return "ivec4";
} }
@ -50,13 +50,13 @@ void GLVertexDecompilerThread::insertHeader(std::stringstream &OS)
OS << "};\n\n"; OS << "};\n\n";
} }
void GLVertexDecompilerThread::insertInputs(std::stringstream & OS, const std::vector<ParamType>& inputs) void GLVertexDecompilerThread::insertInputs(std::stringstream& OS, const std::vector<ParamType>& /*inputs*/)
{ {
OS << "layout(location=0) uniform usamplerBuffer persistent_input_stream;\n"; //Data stream with persistent vertex data (cacheable) OS << "layout(location=0) uniform usamplerBuffer persistent_input_stream;\n"; //Data stream with persistent vertex data (cacheable)
OS << "layout(location=1) uniform usamplerBuffer volatile_input_stream;\n"; //Data stream with per-draw data (registers and immediate draw data) OS << "layout(location=1) uniform usamplerBuffer volatile_input_stream;\n"; //Data stream with per-draw data (registers and immediate draw data)
} }
void GLVertexDecompilerThread::insertConstants(std::stringstream & OS, const std::vector<ParamType> & constants) void GLVertexDecompilerThread::insertConstants(std::stringstream& OS, const std::vector<ParamType>& constants)
{ {
OS << "layout(std140, binding = 2) uniform VertexConstantsBuffer\n"; OS << "layout(std140, binding = 2) uniform VertexConstantsBuffer\n";
OS << "{\n"; OS << "{\n";
@ -105,7 +105,7 @@ static const vertex_reg_info reg_table[] =
{ "tc9", true, "dst_reg6", "", false, "", "", "", true, CELL_GCM_ATTRIB_OUTPUT_MASK_TEX9 } // In this line, dst_reg6 is correct since dst_reg goes from 0 to 15. { "tc9", true, "dst_reg6", "", false, "", "", "", true, CELL_GCM_ATTRIB_OUTPUT_MASK_TEX9 } // In this line, dst_reg6 is correct since dst_reg goes from 0 to 15.
}; };
void GLVertexDecompilerThread::insertOutputs(std::stringstream & OS, const std::vector<ParamType> & outputs) void GLVertexDecompilerThread::insertOutputs(std::stringstream& OS, const std::vector<ParamType>& /*outputs*/)
{ {
for (auto &i : reg_table) for (auto &i : reg_table)
{ {

View file

@ -44,7 +44,7 @@ void GSRender::on_exit()
rsx::thread::on_exit(); rsx::thread::on_exit();
} }
void GSRender::flip(const rsx::display_flip_info_t& info) void GSRender::flip(const rsx::display_flip_info_t&)
{ {
if (m_frame) if (m_frame)
{ {

View file

@ -16,7 +16,7 @@ namespace rsx
dlg->type.bg_invisible = true; dlg->type.bg_invisible = true;
dlg->type.progress_bar_count = 2; dlg->type.progress_bar_count = 2;
dlg->ProgressBarSetTaskbarIndex(-1); // -1 to combine all progressbars in the taskbar progress dlg->ProgressBarSetTaskbarIndex(-1); // -1 to combine all progressbars in the taskbar progress
dlg->on_close = [](s32 status) { Emu.CallAfter([]() { Emu.Stop(); }); }; dlg->on_close = [](s32 /*status*/) { Emu.CallAfter([]() { Emu.Stop(); }); };
ref_cnt++; ref_cnt++;

View file

@ -786,7 +786,7 @@ namespace rsx
static constexpr auto thread_name = "OSK Thread"sv; static constexpr auto thread_name = "OSK Thread"sv;
}; };
void osk_dialog::Create(const std::string& title, const std::u16string& message, char16_t* init_text, u32 charlimit, u32 prohibit_flags, u32 panel_flag, u32 first_view_panel) void osk_dialog::Create(const std::string& /*title*/, const std::u16string& message, char16_t* init_text, u32 charlimit, u32 prohibit_flags, u32 panel_flag, u32 first_view_panel)
{ {
state = OskDialogState::Open; state = OskDialogState::Open;
flags = prohibit_flags; flags = prohibit_flags;

View file

@ -761,12 +761,12 @@ namespace rsx
* Fill buffer with vertex program constants. * Fill buffer with vertex program constants.
* Buffer must be at least 512 float4 wide. * Buffer must be at least 512 float4 wide.
*/ */
void thread::fill_vertex_program_constants_data(void *buffer) void thread::fill_vertex_program_constants_data(void* buffer)
{ {
memcpy(buffer, rsx::method_registers.transform_constants.data(), 468 * 4 * sizeof(float)); memcpy(buffer, rsx::method_registers.transform_constants.data(), 468 * 4 * sizeof(float));
} }
void thread::fill_fragment_state_buffer(void *buffer, const RSXFragmentProgram &fragment_program) void thread::fill_fragment_state_buffer(void* buffer, const RSXFragmentProgram& /*fragment_program*/)
{ {
u32 rop_control = 0u; u32 rop_control = 0u;
@ -842,7 +842,7 @@ namespace rsx
stream_vector(dst + 4, 0u, fog_mode, std::bit_cast<u32>(wpos_scale), std::bit_cast<u32>(wpos_bias)); stream_vector(dst + 4, 0u, fog_mode, std::bit_cast<u32>(wpos_scale), std::bit_cast<u32>(wpos_bias));
} }
void thread::fill_fragment_texture_parameters(void *buffer, const RSXFragmentProgram &fragment_program) void thread::fill_fragment_texture_parameters(void* buffer, const RSXFragmentProgram& fragment_program)
{ {
// Copy only the relevant section // Copy only the relevant section
if (current_fp_metadata.referenced_textures_mask) if (current_fp_metadata.referenced_textures_mask)

View file

@ -900,18 +900,18 @@ namespace rsx
* Fill buffer with vertex program constants. * Fill buffer with vertex program constants.
* Buffer must be at least 512 float4 wide. * Buffer must be at least 512 float4 wide.
*/ */
void fill_vertex_program_constants_data(void *buffer); void fill_vertex_program_constants_data(void* buffer);
/** /**
* Fill buffer with fragment rasterization state. * Fill buffer with fragment rasterization state.
* Fills current fog values, alpha test parameters and texture scaling parameters * Fills current fog values, alpha test parameters and texture scaling parameters
*/ */
void fill_fragment_state_buffer(void *buffer, const RSXFragmentProgram &fragment_program); void fill_fragment_state_buffer(void* buffer, const RSXFragmentProgram& fragment_program);
/** /**
* Fill buffer with fragment texture parameter constants (texture matrix) * Fill buffer with fragment texture parameter constants (texture matrix)
*/ */
void fill_fragment_texture_parameters(void *buffer, const RSXFragmentProgram &fragment_program); void fill_fragment_texture_parameters(void* buffer, const RSXFragmentProgram& fragment_program);
/** /**
* Notify that a section of memory has been mapped * Notify that a section of memory has been mapped

View file

@ -227,17 +227,17 @@ namespace vk
// NOP // NOP
} }
void dma_block_EXT::flush(const utils::address_range& range) void dma_block_EXT::flush(const utils::address_range&)
{ {
// NOP // NOP
} }
void dma_block_EXT::load(const utils::address_range& range) void dma_block_EXT::load(const utils::address_range&)
{ {
// NOP // NOP
} }
bool test_host_pointer(u32 base_address, usz length) bool test_host_pointer([[maybe_unused]] u32 base_address, [[maybe_unused]] usz length)
{ {
#ifdef _WIN32 #ifdef _WIN32
MEMORY_BASIC_INFORMATION mem_info; MEMORY_BASIC_INFORMATION mem_info;

View file

@ -44,6 +44,7 @@ private:
#pragma GCC diagnostic ignored "-Wold-style-cast" #pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wunused-variable" #pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wsuggest-override" #pragma GCC diagnostic ignored "-Wsuggest-override"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#ifdef __clang__ #ifdef __clang__
#pragma clang diagnostic ignored "-Winconsistent-missing-override" #pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif #endif

View file

@ -514,7 +514,7 @@ namespace vk
ensure(!dst_rect.is_flipped()); ensure(!dst_rect.is_flipped());
auto stretch_image_typeless_unsafe = [&cmd, filter](vk::image* src, vk::image* dst, vk::image* typeless, auto stretch_image_typeless_unsafe = [&cmd, filter](vk::image* src, vk::image* dst, vk::image* typeless,
const areai& src_rect, const areai& dst_rect, VkImageAspectFlags aspect, VkImageAspectFlags transfer_flags = 0xFF) const areai& src_rect, const areai& dst_rect, VkImageAspectFlags /*aspect*/, VkImageAspectFlags transfer_flags = 0xFF)
{ {
const auto src_w = src_rect.width(); const auto src_w = src_rect.width();
const auto src_h = src_rect.height(); const auto src_h = src_rect.height();
@ -834,7 +834,7 @@ namespace vk
} }
void upload_image(const vk::command_buffer& cmd, vk::image* dst_image, void upload_image(const vk::command_buffer& cmd, vk::image* dst_image,
const std::vector<rsx::subresource_layout>& subresource_layout, int format, bool is_swizzled, u16 mipmap_count, const std::vector<rsx::subresource_layout>& subresource_layout, int format, bool is_swizzled, u16 /*mipmap_count*/,
VkImageAspectFlags flags, vk::data_heap &upload_heap, u32 heap_align, rsx::flags32_t image_setup_flags) VkImageAspectFlags flags, vk::data_heap &upload_heap, u32 heap_align, rsx::flags32_t image_setup_flags)
{ {
const bool requires_depth_processing = (dst_image->aspect() & VK_IMAGE_ASPECT_STENCIL_BIT) || (format == CELL_GCM_TEXTURE_DEPTH16_FLOAT); const bool requires_depth_processing = (dst_image->aspect() & VK_IMAGE_ASPECT_STENCIL_BIT) || (format == CELL_GCM_TEXTURE_DEPTH16_FLOAT);

View file

@ -95,7 +95,7 @@ namespace
{ {
} }
vertex_input_state operator()(const rsx::draw_array_command& command) vertex_input_state operator()(const rsx::draw_array_command& /*command*/)
{ {
bool primitives_emulated = false; bool primitives_emulated = false;
VkPrimitiveTopology prims = vk::get_appropriate_topology( VkPrimitiveTopology prims = vk::get_appropriate_topology(
@ -195,7 +195,7 @@ namespace
return {prims, true, min_index, max_index, index_count, index_offset, index_info}; return {prims, true, min_index, max_index, index_count, index_offset, index_info};
} }
vertex_input_state operator()(const rsx::draw_inlined_array& command) vertex_input_state operator()(const rsx::draw_inlined_array& /*command*/)
{ {
bool primitives_emulated = false; bool primitives_emulated = false;
auto &draw_clause = rsx::method_registers.current_draw_clause; auto &draw_clause = rsx::method_registers.current_draw_clause;

View file

@ -12,7 +12,7 @@ std::string VKVertexDecompilerThread::getFloatTypeName(usz elementCount)
return glsl::getFloatTypeNameImpl(elementCount); return glsl::getFloatTypeNameImpl(elementCount);
} }
std::string VKVertexDecompilerThread::getIntTypeName(usz elementCount) std::string VKVertexDecompilerThread::getIntTypeName(usz /*elementCount*/)
{ {
return "ivec4"; return "ivec4";
} }
@ -73,7 +73,7 @@ void VKVertexDecompilerThread::insertHeader(std::stringstream &OS)
inputs.push_back(in); inputs.push_back(in);
} }
void VKVertexDecompilerThread::insertInputs(std::stringstream & OS, const std::vector<ParamType>& inputs) void VKVertexDecompilerThread::insertInputs(std::stringstream& OS, const std::vector<ParamType>& /*inputs*/)
{ {
OS << "layout(set=0, binding=5) uniform usamplerBuffer persistent_input_stream;\n"; // Data stream with persistent vertex data (cacheable) OS << "layout(set=0, binding=5) uniform usamplerBuffer persistent_input_stream;\n"; // Data stream with persistent vertex data (cacheable)
OS << "layout(set=0, binding=6) uniform usamplerBuffer volatile_input_stream;\n"; // Data stream with per-draw data (registers and immediate draw data) OS << "layout(set=0, binding=6) uniform usamplerBuffer volatile_input_stream;\n"; // Data stream with per-draw data (registers and immediate draw data)
@ -169,7 +169,7 @@ static const vertex_reg_info reg_table[] =
{ "tc9", true, "dst_reg6", "", false, "", "", "", true, CELL_GCM_ATTRIB_OUTPUT_MASK_TEX9 } // In this line, dst_reg6 is correct since dst_reg goes from 0 to 15. { "tc9", true, "dst_reg6", "", false, "", "", "", true, CELL_GCM_ATTRIB_OUTPUT_MASK_TEX9 } // In this line, dst_reg6 is correct since dst_reg goes from 0 to 15.
}; };
void VKVertexDecompilerThread::insertOutputs(std::stringstream & OS, const std::vector<ParamType> & outputs) void VKVertexDecompilerThread::insertOutputs(std::stringstream& OS, const std::vector<ParamType>& /*outputs*/)
{ {
for (auto &i : reg_table) for (auto &i : reg_table)
{ {

View file

@ -239,7 +239,7 @@ namespace vk
return 0ull; return 0ull;
} }
void* memory_block_host::map(u64 offset, u64 size) void* memory_block_host::map(u64 offset, u64 /*size*/)
{ {
return reinterpret_cast<char*>(m_host_pointer) + offset; return reinterpret_cast<char*>(m_host_pointer) + offset;
} }

View file

@ -1,6 +1,10 @@
#include "shared.h" #include "shared.h"
#include "util/logs.hpp" #include "util/logs.hpp"
#ifndef _WIN32
#include <signal.h>
#endif
namespace vk namespace vk
{ {
void die_with_error(VkResult error_code, std::string message, void die_with_error(VkResult error_code, std::string message,
@ -109,9 +113,9 @@ namespace vk
} }
} }
VKAPI_ATTR VkBool32 VKAPI_CALL dbgFunc(VkFlags msgFlags, VkDebugReportObjectTypeEXT objType, VKAPI_ATTR VkBool32 VKAPI_CALL dbgFunc(VkFlags msgFlags, VkDebugReportObjectTypeEXT /*objType*/,
u64 srcObject, usz location, s32 msgCode, u64 /*srcObject*/, usz /*location*/, s32 msgCode,
const char* pLayerPrefix, const char* pMsg, void* pUserData) const char* pLayerPrefix, const char* pMsg, void* /*pUserData*/)
{ {
if (msgFlags & VK_DEBUG_REPORT_ERROR_BIT_EXT) if (msgFlags & VK_DEBUG_REPORT_ERROR_BIT_EXT)
{ {
@ -133,12 +137,19 @@ namespace vk
return false; return false;
} }
// Temporarily
#ifndef _MSC_VER
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
VkBool32 BreakCallback(VkFlags msgFlags, VkDebugReportObjectTypeEXT objType, VkBool32 BreakCallback(VkFlags msgFlags, VkDebugReportObjectTypeEXT objType,
u64 srcObject, usz location, s32 msgCode, u64 srcObject, usz location, s32 msgCode,
const char* pLayerPrefix, const char* pMsg, void* pUserData) const char* pLayerPrefix, const char* pMsg, void* pUserData)
{ {
#ifdef _WIN32 #ifdef _WIN32
DebugBreak(); DebugBreak();
#else
raise(SIGTRAP);
#endif #endif
return false; return false;

View file

@ -990,7 +990,7 @@ namespace
} }
template <typename T, T... Index> template <typename T, T... Index>
std::array<std::string(*)(u32, u32), 1 << 14> create_printing_table(std::integer_sequence<T, Index...> seq) std::array<std::string(*)(u32, u32), 1 << 14> create_printing_table(std::integer_sequence<T, Index...>)
{ {
std::array<std::string(*)(u32, u32), 1 << 14> result{}; std::array<std::string(*)(u32, u32), 1 << 14> result{};

View file

@ -15,20 +15,20 @@ namespace rsx
std::array<rsx_method_t, 0x10000 / 4> methods{}; std::array<rsx_method_t, 0x10000 / 4> methods{};
void invalid_method(thread* rsx, u32 _reg, u32 arg) void invalid_method(thread* rsx, u32 reg, u32 arg)
{ {
//Don't throw, gather information and ignore broken/garbage commands //Don't throw, gather information and ignore broken/garbage commands
//TODO: Investigate why these commands are executed at all. (Heap corruption? Alignment padding?) //TODO: Investigate why these commands are executed at all. (Heap corruption? Alignment padding?)
const u32 cmd = rsx->get_fifo_cmd(); const u32 cmd = rsx->get_fifo_cmd();
rsx_log.error("Invalid RSX method 0x%x (arg=0x%x, start=0x%x, count=0x%x, non-inc=%s)", _reg << 2, arg, rsx_log.error("Invalid RSX method 0x%x (arg=0x%x, start=0x%x, count=0x%x, non-inc=%s)", reg << 2, arg,
cmd & 0xfffc, (cmd >> 18) & 0x7ff, !!(cmd & RSX_METHOD_NON_INCREMENT_CMD)); cmd & 0xfffc, (cmd >> 18) & 0x7ff, !!(cmd & RSX_METHOD_NON_INCREMENT_CMD));
rsx->recover_fifo(); rsx->recover_fifo();
} }
static void trace_method(thread* rsx, u32 _reg, u32 arg) static void trace_method(thread* /*rsx*/, u32 reg, u32 arg)
{ {
// For unknown yet valid methods // For unknown yet valid methods
rsx_log.trace("RSX method 0x%x (arg=0x%x)", _reg << 2, arg); rsx_log.trace("RSX method 0x%x (arg=0x%x)", reg << 2, arg);
} }
template<typename Type> struct vertex_data_type_from_element_type; template<typename Type> struct vertex_data_type_from_element_type;
@ -40,7 +40,7 @@ namespace rsx
namespace nv406e namespace nv406e
{ {
void set_reference(thread* rsx, u32 _reg, u32 arg) void set_reference(thread* rsx, u32 /*reg*/, u32 arg)
{ {
rsx->sync(); rsx->sync();
@ -48,7 +48,7 @@ namespace rsx
vm::_ref<atomic_be_t<u64>>(rsx->dma_address + ::offset32(&RsxDmaControl::get)).store(u64{rsx->fifo_ctrl->get_pos()} << 32 | arg); vm::_ref<atomic_be_t<u64>>(rsx->dma_address + ::offset32(&RsxDmaControl::get)).store(u64{rsx->fifo_ctrl->get_pos()} << 32 | arg);
} }
void semaphore_acquire(thread* rsx, u32 /*_reg*/, u32 arg) void semaphore_acquire(thread* rsx, u32 /*reg*/, u32 arg)
{ {
rsx->sync_point_request.release(true); rsx->sync_point_request.release(true);
const u32 addr = get_address(method_registers.semaphore_offset_406e(), method_registers.semaphore_context_dma_406e()); const u32 addr = get_address(method_registers.semaphore_offset_406e(), method_registers.semaphore_context_dma_406e());
@ -114,7 +114,7 @@ namespace rsx
rsx->performance_counters.idle_time += (get_system_time() - start); rsx->performance_counters.idle_time += (get_system_time() - start);
} }
void semaphore_release(thread* rsx, u32 /*_reg*/, u32 arg) void semaphore_release(thread* rsx, u32 /*reg*/, u32 arg)
{ {
rsx->sync(); rsx->sync();
@ -150,7 +150,7 @@ namespace rsx
namespace nv4097 namespace nv4097
{ {
void clear(thread* rsx, u32 _reg, u32 arg) void clear(thread* rsx, u32 /*reg*/, u32 arg)
{ {
rsx->clear_surface(arg); rsx->clear_surface(arg);
@ -160,7 +160,7 @@ namespace rsx
} }
} }
void clear_zcull(thread* rsx, u32 _reg, u32 arg) void clear_zcull(thread* rsx, u32 /*reg*/, u32 /*arg*/)
{ {
if (rsx->capture_current_frame) if (rsx->capture_current_frame)
{ {
@ -168,9 +168,9 @@ namespace rsx
} }
} }
void set_cull_face(thread* rsx, u32 reg, u32 arg) void set_cull_face(thread* /*rsx*/, u32 reg, u32 arg)
{ {
switch(arg) switch (arg)
{ {
case CELL_GCM_FRONT_AND_BACK: case CELL_GCM_FRONT_AND_BACK:
case CELL_GCM_FRONT: case CELL_GCM_FRONT:
@ -182,7 +182,7 @@ namespace rsx
} }
} }
void set_notify(thread* rsx, u32 _reg, u32 arg) void set_notify(thread* rsx, u32 /*reg*/, u32 /*arg*/)
{ {
const u32 location = method_registers.context_dma_notify(); const u32 location = method_registers.context_dma_notify();
const u32 index = (location & 0x7) ^ 0x7; const u32 index = (location & 0x7) ^ 0x7;
@ -204,7 +204,7 @@ namespace rsx
}); });
} }
void texture_read_semaphore_release(thread* rsx, u32 _reg, u32 arg) void texture_read_semaphore_release(thread* rsx, u32 /*reg*/, u32 arg)
{ {
// Pipeline barrier seems to be equivalent to a SHADER_READ stage barrier // Pipeline barrier seems to be equivalent to a SHADER_READ stage barrier
g_fxo->get<rsx::dma_manager>().sync(); g_fxo->get<rsx::dma_manager>().sync();
@ -227,7 +227,7 @@ namespace rsx
vm::_ref<RsxSemaphore>(get_address(offset, method_registers.semaphore_context_dma_4097())).val = arg; vm::_ref<RsxSemaphore>(get_address(offset, method_registers.semaphore_context_dma_4097())).val = arg;
} }
void back_end_write_semaphore_release(thread* rsx, u32 _reg, u32 arg) void back_end_write_semaphore_release(thread* rsx, u32 /*reg*/, u32 arg)
{ {
// Full pipeline barrier // Full pipeline barrier
g_fxo->get<rsx::dma_manager>().sync(); g_fxo->get<rsx::dma_manager>().sync();
@ -295,7 +295,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct set_vertex_data4ub_m struct set_vertex_data4ub_m
{ {
static void impl(thread* rsx, u32 _reg, u32 arg) static void impl(thread* rsx, u32 /*reg*/, u32 arg)
{ {
set_vertex_data_impl<NV4097_SET_VERTEX_DATA4UB_M, index, 4, 4, u8>(rsx, arg); set_vertex_data_impl<NV4097_SET_VERTEX_DATA4UB_M, index, 4, 4, u8>(rsx, arg);
} }
@ -304,7 +304,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct set_vertex_data1f_m struct set_vertex_data1f_m
{ {
static void impl(thread* rsx, u32 _reg, u32 arg) static void impl(thread* rsx, u32 /*reg*/, u32 arg)
{ {
set_vertex_data_impl<NV4097_SET_VERTEX_DATA1F_M, index, 1, 1, f32>(rsx, arg); set_vertex_data_impl<NV4097_SET_VERTEX_DATA1F_M, index, 1, 1, f32>(rsx, arg);
} }
@ -313,7 +313,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct set_vertex_data2f_m struct set_vertex_data2f_m
{ {
static void impl(thread* rsx, u32 _reg, u32 arg) static void impl(thread* rsx, u32 /*reg*/, u32 arg)
{ {
set_vertex_data_impl<NV4097_SET_VERTEX_DATA2F_M, index, 2, 2, f32>(rsx, arg); set_vertex_data_impl<NV4097_SET_VERTEX_DATA2F_M, index, 2, 2, f32>(rsx, arg);
} }
@ -322,7 +322,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct set_vertex_data3f_m struct set_vertex_data3f_m
{ {
static void impl(thread* rsx, u32 _reg, u32 arg) static void impl(thread* rsx, u32 /*reg*/, u32 arg)
{ {
//Register alignment is only 1, 2, or 4 (Rachet & Clank 2) //Register alignment is only 1, 2, or 4 (Rachet & Clank 2)
set_vertex_data_impl<NV4097_SET_VERTEX_DATA3F_M, index, 3, 4, f32>(rsx, arg); set_vertex_data_impl<NV4097_SET_VERTEX_DATA3F_M, index, 3, 4, f32>(rsx, arg);
@ -332,7 +332,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct set_vertex_data4f_m struct set_vertex_data4f_m
{ {
static void impl(thread* rsx, u32 _reg, u32 arg) static void impl(thread* rsx, u32 /*reg*/, u32 arg)
{ {
set_vertex_data_impl<NV4097_SET_VERTEX_DATA4F_M, index, 4, 4, f32>(rsx, arg); set_vertex_data_impl<NV4097_SET_VERTEX_DATA4F_M, index, 4, 4, f32>(rsx, arg);
} }
@ -341,7 +341,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct set_vertex_data2s_m struct set_vertex_data2s_m
{ {
static void impl(thread* rsx, u32 _reg, u32 arg) static void impl(thread* rsx, u32 /*reg*/, u32 arg)
{ {
set_vertex_data_impl<NV4097_SET_VERTEX_DATA2S_M, index, 2, 2, u16>(rsx, arg); set_vertex_data_impl<NV4097_SET_VERTEX_DATA2S_M, index, 2, 2, u16>(rsx, arg);
} }
@ -350,7 +350,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct set_vertex_data4s_m struct set_vertex_data4s_m
{ {
static void impl(thread* rsx, u32 _reg, u32 arg) static void impl(thread* rsx, u32 /*reg*/, u32 arg)
{ {
set_vertex_data_impl<NV4097_SET_VERTEX_DATA4S_M, index, 4, 4, u16>(rsx, arg); set_vertex_data_impl<NV4097_SET_VERTEX_DATA4S_M, index, 4, 4, u16>(rsx, arg);
} }
@ -359,7 +359,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct set_vertex_data_scaled4s_m struct set_vertex_data_scaled4s_m
{ {
static void impl(thread* rsx, u32 _reg, u32 arg) static void impl(thread* rsx, u32 /*reg*/, u32 arg)
{ {
set_vertex_data_impl<NV4097_SET_VERTEX_DATA_SCALED4S_M, index, 4, 4, s16>(rsx, arg); set_vertex_data_impl<NV4097_SET_VERTEX_DATA_SCALED4S_M, index, 4, 4, s16>(rsx, arg);
} }
@ -380,7 +380,7 @@ namespace rsx
rsx->append_array_element(arg); rsx->append_array_element(arg);
} }
void draw_arrays(thread* rsx, u32 _reg, u32 arg) void draw_arrays(thread* /*rsx*/, u32 /*reg*/, u32 arg)
{ {
rsx::method_registers.current_draw_clause.command = rsx::draw_command::array; rsx::method_registers.current_draw_clause.command = rsx::draw_command::array;
rsx::registers_decoder<NV4097_DRAW_ARRAYS>::decoded_type v(arg); rsx::registers_decoder<NV4097_DRAW_ARRAYS>::decoded_type v(arg);
@ -388,7 +388,7 @@ namespace rsx
rsx::method_registers.current_draw_clause.append(v.start(), v.count()); rsx::method_registers.current_draw_clause.append(v.start(), v.count());
} }
void draw_index_array(thread* rsx, u32 _reg, u32 arg) void draw_index_array(thread* /*rsx*/, u32 /*reg*/, u32 arg)
{ {
rsx::method_registers.current_draw_clause.command = rsx::draw_command::indexed; rsx::method_registers.current_draw_clause.command = rsx::draw_command::indexed;
rsx::registers_decoder<NV4097_DRAW_INDEX_ARRAY>::decoded_type v(arg); rsx::registers_decoder<NV4097_DRAW_INDEX_ARRAY>::decoded_type v(arg);
@ -396,7 +396,7 @@ namespace rsx
rsx::method_registers.current_draw_clause.append(v.start(), v.count()); rsx::method_registers.current_draw_clause.append(v.start(), v.count());
} }
void draw_inline_array(thread* rsx, u32 _reg, u32 arg) void draw_inline_array(thread* /*rsx*/, u32 /*reg*/, u32 arg)
{ {
rsx::method_registers.current_draw_clause.command = rsx::draw_command::inlined_array; rsx::method_registers.current_draw_clause.command = rsx::draw_command::inlined_array;
rsx::method_registers.current_draw_clause.inline_vertex_array.push_back(arg); rsx::method_registers.current_draw_clause.inline_vertex_array.push_back(arg);
@ -405,7 +405,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct set_transform_constant struct set_transform_constant
{ {
static void impl(thread* rsx, u32 /*_reg*/, u32 /*arg*/) static void impl(thread* rsx, u32 /*reg*/, u32 /*arg*/)
{ {
static constexpr u32 reg = index / 4; static constexpr u32 reg = index / 4;
static constexpr u8 subreg = index % 4; static constexpr u8 subreg = index % 4;
@ -451,7 +451,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct set_transform_program struct set_transform_program
{ {
static void impl(thread* rsx, u32 /*_reg*/, u32 /*arg*/) static void impl(thread* rsx, u32 /*reg*/, u32 /*arg*/)
{ {
// Get real args count // Get real args count
const u32 count = std::min<u32>({rsx->fifo_ctrl->get_remaining_args_count() + 1, const u32 count = std::min<u32>({rsx->fifo_ctrl->get_remaining_args_count() + 1,
@ -496,7 +496,7 @@ namespace rsx
} }
} }
void set_begin_end(thread* rsxthr, u32 _reg, u32 arg) void set_begin_end(thread* rsxthr, u32 /*reg*/, u32 arg)
{ {
// Ignore upper bits // Ignore upper bits
if (const u8 prim = static_cast<u8>(arg)) if (const u8 prim = static_cast<u8>(arg))
@ -575,7 +575,7 @@ namespace rsx
return vm::cast(get_address(offset, location)); return vm::cast(get_address(offset, location));
} }
void get_report(thread* rsx, u32 _reg, u32 arg) void get_report(thread* rsx, u32 /*reg*/, u32 arg)
{ {
u8 type = arg >> 24; u8 type = arg >> 24;
u32 offset = arg & 0xffffff; u32 offset = arg & 0xffffff;
@ -608,7 +608,7 @@ namespace rsx
} }
} }
void clear_report_value(thread* rsx, u32 _reg, u32 arg) void clear_report_value(thread* rsx, u32 /*reg*/, u32 arg)
{ {
switch (arg) switch (arg)
{ {
@ -790,7 +790,7 @@ namespace rsx
} }
} }
void set_blend_equation(thread* rsx, u32 reg, u32 arg) void set_blend_equation(thread* /*rsx*/, u32 reg, u32 arg)
{ {
for (u32 i = 0; i < 32u; i += 16) for (u32 i = 0; i < 32u; i += 16)
{ {
@ -816,7 +816,7 @@ namespace rsx
} }
} }
void set_blend_factor(thread* rsx, u32 reg, u32 arg) void set_blend_factor(thread* /*rsx*/, u32 reg, u32 arg)
{ {
for (u32 i = 0; i < 32u; i += 16) for (u32 i = 0; i < 32u; i += 16)
{ {
@ -850,7 +850,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct set_texture_dirty_bit struct set_texture_dirty_bit
{ {
static void impl(thread* rsx, u32 _reg, u32 arg) static void impl(thread* rsx, u32 /*reg*/, u32 /*arg*/)
{ {
rsx->m_textures_dirty[index] = true; rsx->m_textures_dirty[index] = true;
@ -864,7 +864,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct set_vertex_texture_dirty_bit struct set_vertex_texture_dirty_bit
{ {
static void impl(thread* rsx, u32 _reg, u32 arg) static void impl(thread* rsx, u32 /*reg*/, u32 /*arg*/)
{ {
rsx->m_vertex_textures_dirty[index] = true; rsx->m_vertex_textures_dirty[index] = true;
@ -881,7 +881,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct color struct color
{ {
static void impl(thread* rsx, u32 /*_reg*/, u32 /*arg*/) static void impl(thread* rsx, u32 /*reg*/, u32 /*arg*/)
{ {
const u32 out_x_max = method_registers.nv308a_size_out_x(); const u32 out_x_max = method_registers.nv308a_size_out_x();
@ -1002,7 +1002,7 @@ namespace rsx
namespace nv3089 namespace nv3089
{ {
void image_in(thread *rsx, u32 _reg, u32 arg) void image_in(thread* rsx, u32 /*reg*/, u32 /*arg*/)
{ {
const rsx::blit_engine::transfer_operation operation = method_registers.blit_engine_operation(); const rsx::blit_engine::transfer_operation operation = method_registers.blit_engine_operation();
@ -1471,7 +1471,7 @@ namespace rsx
namespace nv0039 namespace nv0039
{ {
void buffer_notify(thread *rsx, u32, u32 arg) void buffer_notify(thread* rsx, u32, u32 arg)
{ {
s32 in_pitch = method_registers.nv0039_input_pitch(); s32 in_pitch = method_registers.nv0039_input_pitch();
s32 out_pitch = method_registers.nv0039_output_pitch(); s32 out_pitch = method_registers.nv0039_output_pitch();
@ -1618,7 +1618,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct driver_flip struct driver_flip
{ {
static void impl(thread* rsx, u32 _reg, u32 arg) static void impl(thread* /*rsx*/, u32 /*reg*/, u32 arg)
{ {
sys_rsx_context_attribute(0x55555555, 0x102, index, arg, 0, 0); sys_rsx_context_attribute(0x55555555, 0x102, index, arg, 0, 0);
} }
@ -1627,7 +1627,7 @@ namespace rsx
template<u32 index> template<u32 index>
struct queue_flip struct queue_flip
{ {
static void impl(thread* rsx, u32 _reg, u32 arg) static void impl(thread* /*rsx*/, u32 /*reg*/, u32 arg)
{ {
sys_rsx_context_attribute(0x55555555, 0x103, index, arg, 0, 0); sys_rsx_context_attribute(0x55555555, 0x103, index, arg, 0, 0);
} }

View file

@ -230,8 +230,8 @@ namespace rsx
{ CELL_GCM_TEXTURE_REMAP_REMAP, CELL_GCM_TEXTURE_REMAP_REMAP, CELL_GCM_TEXTURE_REMAP_REMAP, CELL_GCM_TEXTURE_REMAP_REMAP } { CELL_GCM_TEXTURE_REMAP_REMAP, CELL_GCM_TEXTURE_REMAP_REMAP, CELL_GCM_TEXTURE_REMAP_REMAP, CELL_GCM_TEXTURE_REMAP_REMAP }
}; };
template<typename T> template <typename T>
void pad_texture(void* input_pixels, void* output_pixels, u16 input_width, u16 input_height, u16 output_width, u16 output_height) void pad_texture(void* input_pixels, void* output_pixels, u16 input_width, u16 input_height, u16 output_width, u16 /*output_height*/)
{ {
T *src = static_cast<T*>(input_pixels); T *src = static_cast<T*>(input_pixels);
T *dst = static_cast<T*>(output_pixels); T *dst = static_cast<T*>(output_pixels);

View file

@ -363,7 +363,7 @@ namespace
dlg->type.se_normal = true; dlg->type.se_normal = true;
dlg->type.bg_invisible = true; dlg->type.bg_invisible = true;
dlg->type.progress_bar_count = 1; dlg->type.progress_bar_count = 1;
dlg->on_close = [](s32 status) dlg->on_close = [](s32 /*status*/)
{ {
Emu.CallAfter([]() Emu.CallAfter([]()
{ {
@ -1924,7 +1924,7 @@ void Emulator::Stop(bool restart)
aw_colc = 0; aw_colc = 0;
aw_used = 0; aw_used = 0;
atomic_wait::parse_hashtable([](u64 id, u32 refs, u64 ptr, u32 maxc) -> bool atomic_wait::parse_hashtable([](u64 /*id*/, u32 refs, u64 ptr, u32 maxc) -> bool
{ {
aw_refs += refs != 0; aw_refs += refs != 0;
aw_used += ptr != 0; aw_used += ptr != 0;

View file

@ -744,7 +744,7 @@ bool vfs::host::rename(const std::string& from, const std::string& to, const lv2
return path.starts_with(from) && (path.size() == from.size() || path[from.size()] == fs::delim[0] || path[from.size()] == fs::delim[1]); return path.starts_with(from) && (path.size() == from.size() || path[from.size()] == fs::delim[0] || path[from.size()] == fs::delim[1]);
}; };
idm::select<lv2_fs_object, lv2_file>([&](u32 id, lv2_file& file) idm::select<lv2_fs_object, lv2_file>([&](u32 /*id*/, lv2_file& file)
{ {
if (check_path(fs::escape_path(file.real_path))) if (check_path(fs::escape_path(file.real_path)))
{ {
@ -773,7 +773,7 @@ bool vfs::host::rename(const std::string& from, const std::string& to, const lv2
const auto fs_error = fs::g_tls_error; const auto fs_error = fs::g_tls_error;
idm::select<lv2_fs_object, lv2_file>([&](u32 id, lv2_file& file) idm::select<lv2_fs_object, lv2_file>([&](u32 /*id*/, lv2_file& file)
{ {
const auto escaped_real = fs::escape_path(file.real_path); const auto escaped_real = fs::escape_path(file.real_path);
@ -797,7 +797,7 @@ bool vfs::host::rename(const std::string& from, const std::string& to, const lv2
return res; return res;
} }
bool vfs::host::unlink(const std::string& path, const std::string& dev_root) bool vfs::host::unlink(const std::string& path, [[maybe_unused]] const std::string& dev_root)
{ {
#ifdef _WIN32 #ifdef _WIN32
if (auto device = fs::get_virtual_device(path)) if (auto device = fs::get_virtual_device(path))
@ -831,7 +831,7 @@ bool vfs::host::unlink(const std::string& path, const std::string& dev_root)
#endif #endif
} }
bool vfs::host::remove_all(const std::string& path, const std::string& dev_root, const lv2_fs_mount_point* mp, bool remove_root) bool vfs::host::remove_all(const std::string& path, [[maybe_unused]] const std::string& dev_root, [[maybe_unused]] const lv2_fs_mount_point* mp, bool remove_root)
{ {
#ifdef _WIN32 #ifdef _WIN32
if (remove_root) if (remove_root)

View file

@ -613,7 +613,7 @@ u32 keyboard_pad_handler::GetKeyCode(const QString& keyName)
return key_code; return key_code;
} }
int keyboard_pad_handler::native_scan_code_from_string(const std::string& key) int keyboard_pad_handler::native_scan_code_from_string([[maybe_unused]] const std::string& key)
{ {
// NOTE: Qt throws a Ctrl key at us when using Alt Gr, so there is no point in distinguishing left and right Alt at the moment // NOTE: Qt throws a Ctrl key at us when using Alt Gr, so there is no point in distinguishing left and right Alt at the moment
#ifdef _WIN32 #ifdef _WIN32

View file

@ -11,7 +11,7 @@ TRPLoader::TRPLoader(const fs::file& f)
{ {
} }
bool TRPLoader::Install(const std::string& dest, bool show) bool TRPLoader::Install(const std::string& dest, bool /*show*/)
{ {
if (!trp_f) if (!trp_f)
{ {

View file

@ -32,6 +32,7 @@ else()
add_compile_options(-Werror=reorder) add_compile_options(-Werror=reorder)
add_compile_options(-Werror=return-type) add_compile_options(-Werror=return-type)
add_compile_options(-Werror=overloaded-virtual) add_compile_options(-Werror=overloaded-virtual)
add_compile_options(-Wunused-parameter)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Werror=inconsistent-missing-override) add_compile_options(-Werror=inconsistent-missing-override)

View file

@ -111,7 +111,7 @@ save_manager_dialog::save_manager_dialog(std::shared_ptr<gui_settings> gui_setti
/* /*
* Future proofing. Makes it easier in future if I add ability to change directories * Future proofing. Makes it easier in future if I add ability to change directories
*/ */
void save_manager_dialog::Init(std::string dir) void save_manager_dialog::Init(std::string /*dir*/)
{ {
// Table // Table
m_list = new QTableWidget(this); m_list = new QTableWidget(this);

View file

@ -1296,7 +1296,7 @@ SAFE_BUFFERS(void) atomic_wait_engine::wait(const void* data, u32 size, u128 old
} }
template <bool NoAlert = false> template <bool NoAlert = false>
static u32 alert_sema(u32 cond_id, const void* data, u64 tid, u32 size, u128 mask, u128 phantom) static u32 alert_sema(u32 cond_id, u64 tid, u32 size, u128 mask, u128 phantom)
{ {
ensure(cond_id); ensure(cond_id);
@ -1483,7 +1483,7 @@ bool atomic_wait_engine::raw_notify(const void* data, u64 thread_id)
root_info::slot_search(iptr, 0, thread_id, u128(-1), [&](u32 cond_id) root_info::slot_search(iptr, 0, thread_id, u128(-1), [&](u32 cond_id)
{ {
// Forced notification // Forced notification
if (alert_sema(cond_id, data, thread_id, 0, 0, 0)) if (alert_sema(cond_id, thread_id, 0, 0, 0))
{ {
if (s_tls_notify_cb) if (s_tls_notify_cb)
s_tls_notify_cb(data, ++progress); s_tls_notify_cb(data, ++progress);
@ -1517,7 +1517,7 @@ void atomic_wait_engine::notify_one(const void* data, u32 size, u128 mask, u128
root_info::slot_search(iptr, size, 0, mask, [&](u32 cond_id) root_info::slot_search(iptr, size, 0, mask, [&](u32 cond_id)
{ {
if (alert_sema(cond_id, data, -1, size, mask, new_value)) if (alert_sema(cond_id, -1, size, mask, new_value))
{ {
if (s_tls_notify_cb) if (s_tls_notify_cb)
s_tls_notify_cb(data, ++progress); s_tls_notify_cb(data, ++progress);
@ -1548,7 +1548,7 @@ SAFE_BUFFERS(void) atomic_wait_engine::notify_all(const void* data, u32 size, u1
root_info::slot_search(iptr, size, 0, mask, [&](u32 cond_id) root_info::slot_search(iptr, size, 0, mask, [&](u32 cond_id)
{ {
u32 res = alert_sema<true>(cond_id, data, -1, size, mask, 0); u32 res = alert_sema<true>(cond_id, -1, size, mask, 0);
if (res && ~res <= UINT16_MAX) if (res && ~res <= UINT16_MAX)
{ {

Some files were not shown because too many files have changed in this diff Show more