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>
static constexpr auto extract(const T& data) -> decltype(+T())
static constexpr auto extract(const T&) -> decltype(+T())
{
return 0;
}
@ -237,7 +237,7 @@ struct ff_t : bf_base<T, N>
using vtype = typename ff_t::vtype;
// 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");
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;
}
@ -1349,7 +1349,7 @@ fs::file::file(const void* ptr, usz size)
return 0;
}
u64 write(const void* buffer, u64 count) override
u64 write(const void*, u64) override
{
return 0;
}
@ -1854,7 +1854,7 @@ fs::file fs::make_gather(std::vector<fs::file> files)
return result;
}
bool trunc(u64 length) override
bool trunc(u64) override
{
return false;
}
@ -1897,7 +1897,7 @@ fs::file fs::make_gather(std::vector<fs::file> files)
return 0;
}
u64 write(const void* buffer, u64 size) override
u64 write(const void*, u64) override
{
return 0;
}

View File

@ -143,7 +143,7 @@ asmjit::Error jit_runtime::_add(void** dst, asmjit::CodeHolder* code) noexcept
return asmjit::kErrorOk;
}
asmjit::Error jit_runtime::_release(void* ptr) noexcept
asmjit::Error jit_runtime::_release(void*) noexcept
{
return asmjit::kErrorOk;
}
@ -249,7 +249,7 @@ asmjit::Runtime& asmjit::get_global_runtime()
return asmjit::kErrorOk;
}
asmjit::Error _release(void* ptr) noexcept override
asmjit::Error _release(void*) noexcept override
{
return asmjit::kErrorOk;
}
@ -281,6 +281,7 @@ asmjit::Runtime& asmjit::get_global_runtime()
#pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
#include "llvm/Support/TargetSelect.h"
#include "llvm/Support/FormattedStream.h"
@ -294,12 +295,6 @@ asmjit::Runtime& asmjit::get_global_runtime()
#pragma GCC diagnostic pop
#endif
#ifdef _WIN32
#include <Windows.h>
#else
#include <sys/mman.h>
#endif
const bool jit_initialize = []() -> bool
{
llvm::InitializeNativeTarget();
@ -439,12 +434,12 @@ struct MemoryManager1 : llvm::RTDyldMemoryManager
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);
}
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);
}
@ -454,7 +449,7 @@ struct MemoryManager1 : llvm::RTDyldMemoryManager
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};
}
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);
}
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);
}
@ -504,7 +499,7 @@ struct MemoryManager2 : llvm::RTDyldMemoryManager
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 "-Wextra"
#pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#include <asmjit/asmjit.h>
#pragma GCC diagnostic pop
#endif
@ -178,6 +179,7 @@ inline FT build_function_asm(F&& builder)
#pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wsuggest-override"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#ifdef __clang__
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif

View File

@ -1752,7 +1752,7 @@ const bool s_exception_handler_set = []() -> bool
#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);

View File

@ -308,7 +308,7 @@ public:
}
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)
{

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -208,7 +208,7 @@ public:
}
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;

View File

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

View File

@ -1125,7 +1125,7 @@ error_code cellAudioInit()
return CELL_OK;
}
error_code cellAudioQuit(ppu_thread& ppu)
error_code 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 *
// **************

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 Lock = struct CellDaisyLock;
using ScatterGatherInterlock = struct CellDaisyScatterGatherInterlock;

View File

@ -938,14 +938,14 @@ void ElementaryStream::reset()
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->demuxerVerUpper = 0x260000;
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)
{

View File

@ -66,7 +66,8 @@ error_code cellFontInitializeWithRevision(u64 revisionFlags, vm::ptr<CellFontCon
error_code cellFontGetRevisionFlags(vm::ptr<u64> revisionFlags)
{
UNIMPLEMENTED_FUNC(cellFont);
cellFont.todo("cellFontGetRevisionFlags(*0x%x)", revisionFlags);
return CELL_OK;
}
@ -118,7 +119,7 @@ error_code cellFontOpenFontFile(vm::ptr<CellFontLibrary> library, vm::cptr<char>
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);
@ -458,7 +459,7 @@ error_code cellFontGraphicsSetFontRGBA()
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);

View File

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

View File

@ -11,6 +11,11 @@
LOG_CHANNEL(cellJpgDec);
// Temporarily
#ifndef _MSC_VER
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
template <>
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)
{
cellL10n.todo("SjisZen2Han()");
cellL10n.todo("SjisZen2Han(src=*0x%x)", src);
return ConversionOK;
}

View File

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

View File

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

View File

@ -272,7 +272,7 @@ error_code cellRescSetSrc(s32 idx, vm::cptr<CellRescSrc> src)
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);

View File

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

View File

@ -88,12 +88,12 @@ error_code cellRudpInit(vm::ptr<CellRudpAllocator> allocator)
}
else
{
rudp.malloc = [](ppu_thread& ppu, u32 size)
rudp.malloc = [](ppu_thread&, u32 size)
{
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))
{

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,
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)
{
@ -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);
}
// 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)
{
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);
// Temporarily
#ifndef _MSC_VER
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
//----------------------------------------------------------------------------
// Function prototypes
//----------------------------------------------------------------------------

View File

@ -19,8 +19,10 @@
LOG_CHANNEL(cellSpurs);
// Temporarily
#ifndef _MSC_VER
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
//----------------------------------------------------------------------------
@ -775,7 +777,7 @@ void spursSysServiceIdleHandler(spu_thread& spu, SpursKernelContext* ctxt)
while (true)
{
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
u32 nIdlingSpus = 0;
@ -891,9 +893,9 @@ void spursSysServiceMain(spu_thread& spu, u32 pollStatus)
{
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();
@ -1215,7 +1217,7 @@ void spursSysServiceTraceUpdate(spu_thread& spu, SpursKernelContext* ctxt, u32 a
// Get trace parameters from CellSpurs and store them in the LS
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));
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
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
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
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
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
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)
{

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;
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)
, mem_addr(addr)
, mem_size(size)

View File

@ -361,6 +361,11 @@ error_code cellVideoOutGetResolutionAvailability(u32 videoOut, u32 resolutionId,
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)
{
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)
{
UNIMPLEMENTED_FUNC(libsnd3);

View File

@ -2571,7 +2571,7 @@ error_code sceNpManagerGetOnlineId(vm::ptr<SceNpOnlineId> onlineId)
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);

View File

@ -285,7 +285,7 @@ error_code sceNp2Term(ppu_thread& ppu)
return CELL_OK;
}
error_code sceNpMatching2Term(ppu_thread& ppu)
error_code sceNpMatching2Term(ppu_thread&)
{
sceNp2.warning("sceNpMatching2Term()");
return sceNpMatching2Term2(); // > SDK 2.4.0
@ -1529,7 +1529,7 @@ error_code sceNpAuthCreateOAuthRequest()
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>>();
@ -1543,7 +1543,7 @@ error_code sceNpAuthDeleteOAuthRequest(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>>();

View File

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

View File

@ -16,7 +16,7 @@ struct ps3_fmt_src
ppu_thread* ctx;
u32 g_count;
bool test(usz index) const
bool test(usz) const
{
return true;
}
@ -40,7 +40,7 @@ struct ps3_fmt_src
return out.size() - start;
}
usz type(usz extra) const
usz type(usz) const
{
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)
{
sys_lv2dbg.todo("sys_dbg_read_ppu_thread_context()");

View File

@ -6,6 +6,11 @@
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)
{
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;
}
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()");
// 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()

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;
}
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);

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());
}
// Temporarily
#ifndef _MSC_VER
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
void ppu_acontext::UNK(ppu_opcode_t op)
{
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");
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>
FORCE_INLINE static bool _bind_func_args(ppu_thread& CPU)
FORCE_INLINE static bool _bind_func_args(ppu_thread&)
{
// terminator
return false;

View File

@ -1076,7 +1076,7 @@ void PPUDisAsm::CRANDC(ppu_opcode_t op)
DisAsm_BI3("crandc", op.crbd, op.crba, op.crbb);
}
void PPUDisAsm::ISYNC(ppu_opcode_t op)
void PPUDisAsm::ISYNC(ppu_opcode_t)
{
Write("isync");
}
@ -1938,7 +1938,7 @@ void PPUDisAsm::LVRXL(ppu_opcode_t op)
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()");
}
@ -1953,7 +1953,7 @@ void PPUDisAsm::SRADI(ppu_opcode_t op)
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");
}
@ -2345,7 +2345,7 @@ void PPUDisAsm::FCFID(ppu_opcode_t op)
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)
{

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 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;
}
bool ppu_interpreter::ISYNC(ppu_thread& ppu, ppu_opcode_t op)
bool ppu_interpreter::ISYNC(ppu_thread&, ppu_opcode_t)
{
atomic_fence_acquire();
return true;
@ -3514,7 +3514,7 @@ bool ppu_interpreter::LDUX(ppu_thread& ppu, ppu_opcode_t op)
return true;
}
bool ppu_interpreter::DCBST(ppu_thread& ppu, ppu_opcode_t op)
bool ppu_interpreter::DCBST(ppu_thread&, ppu_opcode_t)
{
return true;
}
@ -3587,7 +3587,7 @@ bool ppu_interpreter::LDARX(ppu_thread& ppu, ppu_opcode_t op)
return true;
}
bool ppu_interpreter::DCBF(ppu_thread& ppu, ppu_opcode_t op)
bool ppu_interpreter::DCBF(ppu_thread&, ppu_opcode_t)
{
return true;
}
@ -3850,7 +3850,7 @@ bool ppu_interpreter::MULLW(ppu_thread& ppu, ppu_opcode_t op)
return true;
}
bool ppu_interpreter::DCBTST(ppu_thread& ppu, ppu_opcode_t op)
bool ppu_interpreter::DCBTST(ppu_thread&, ppu_opcode_t)
{
return true;
}
@ -3873,7 +3873,7 @@ bool ppu_interpreter::ADD(ppu_thread& ppu, ppu_opcode_t op)
return true;
}
bool ppu_interpreter::DCBT(ppu_thread& ppu, ppu_opcode_t op)
bool ppu_interpreter::DCBT(ppu_thread&, ppu_opcode_t)
{
return true;
}
@ -3892,7 +3892,7 @@ bool ppu_interpreter::EQV(ppu_thread& ppu, ppu_opcode_t op)
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");
}
@ -3938,7 +3938,7 @@ bool ppu_interpreter::LWAX(ppu_thread& ppu, ppu_opcode_t op)
return true;
}
bool ppu_interpreter::DST(ppu_thread& ppu, ppu_opcode_t op)
bool ppu_interpreter::DST(ppu_thread&, ppu_opcode_t)
{
return true;
}
@ -3979,7 +3979,7 @@ bool ppu_interpreter::LWAUX(ppu_thread& ppu, ppu_opcode_t op)
return true;
}
bool ppu_interpreter::DSTST(ppu_thread& ppu, ppu_opcode_t op)
bool ppu_interpreter::DSTST(ppu_thread&, ppu_opcode_t)
{
return true;
}
@ -4006,7 +4006,7 @@ bool ppu_interpreter::ORC(ppu_thread& ppu, ppu_opcode_t op)
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");
}
@ -4070,7 +4070,7 @@ bool ppu_interpreter::MTSPR(ppu_thread& ppu, ppu_opcode_t op)
return true;
}
bool ppu_interpreter::DCBI(ppu_thread& ppu, ppu_opcode_t op)
bool ppu_interpreter::DCBI(ppu_thread&, ppu_opcode_t)
{
return true;
}
@ -4222,7 +4222,7 @@ bool ppu_interpreter::LFSUX(ppu_thread& ppu, ppu_opcode_t op)
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();
return true;
@ -4406,7 +4406,7 @@ bool ppu_interpreter::LVRXL(ppu_thread& ppu, ppu_opcode_t 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;
}
@ -4432,7 +4432,7 @@ bool ppu_interpreter::SRADI(ppu_thread& ppu, ppu_opcode_t op)
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();
return true;
@ -4483,7 +4483,7 @@ bool ppu_interpreter::EXTSW(ppu_thread& ppu, ppu_opcode_t op)
return true;
}
bool ppu_interpreter::ICBI(ppu_thread& ppu, ppu_opcode_t op)
bool ppu_interpreter::ICBI(ppu_thread&, ppu_opcode_t)
{
return true;
}

View File

@ -30,6 +30,7 @@
#pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
#include "llvm/Support/FormattedStream.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 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
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
static bool ppu_break(ppu_thread& ppu, ppu_opcode_t op)
static bool ppu_break(ppu_thread& ppu, ppu_opcode_t)
{
// 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));
}
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;
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.rtime = vm::reservation_acquire(addr, sizeof(T)) & -128;
ppu.rtime = vm::reservation_acquire(addr) & -128;
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& res = vm::reservation_acquire(addr, sizeof(T));
auto& res = vm::reservation_acquire(addr);
const u64 rtime = ppu.rtime;
be_t<u64> old_data = 0;
@ -2143,7 +2144,7 @@ namespace
return m_file.stat();
}
bool trunc(u64 length) override
bool trunc(u64) override
{
return false;
}
@ -2159,7 +2160,7 @@ namespace
return result;
}
u64 write(const void* buffer, u64 size) override
u64 write(const void*, u64) override
{
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))));
}
void PPUTranslator::ISYNC(ppu_opcode_t op)
void PPUTranslator::ISYNC(ppu_opcode_t)
{
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)));
}
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);
}
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)));
}
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));
}
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));
}
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>())));
}
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);
}
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);
}
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));
}
void PPUTranslator::EIEIO(ppu_opcode_t op)
void PPUTranslator::EIEIO(ppu_opcode_t)
{
// TODO
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));
}
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);
}
void PPUTranslator::SetFPRF(Value* value, bool set_cr)
void PPUTranslator::SetFPRF(Value* value, bool /*set_cr*/)
{
//const bool is32 =
value->getType()->isFloatTy() ? true :
@ -4755,18 +4755,18 @@ void PPUTranslator::SetFPRF(Value* value, bool 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);
}
void PPUTranslator::SetFPSCR_FI(Value* value)
void PPUTranslator::SetFPSCR_FI(Value* /*value*/)
{
//m_ir->CreateStore(value, m_fpscr_fi);
//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(m_fpscr_fx), value), m_fpscr_fx);
@ -4808,7 +4808,7 @@ Value* PPUTranslator::GetFPSCRBit(u32 n)
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)
{

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.
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.
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);
}
void spu_recompiler::MTSPR(spu_opcode_t op)
void spu_recompiler::MTSPR(spu_opcode_t)
{
// 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});
}
@ -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);
}
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);
}
void spu_recompiler::FSCRWR(spu_opcode_t op)
void spu_recompiler::FSCRWR(spu_opcode_t /*op*/)
{
// 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);
}
@ -135,20 +135,20 @@ bool spu_interpreter::STOP(spu_thread& spu, spu_opcode_t op)
return true;
}
bool spu_interpreter::LNOP(spu_thread& spu, spu_opcode_t op)
bool spu_interpreter::LNOP(spu_thread&, spu_opcode_t)
{
return true;
}
// 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();
return true;
}
// 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();
return true;
@ -416,7 +416,7 @@ bool spu_interpreter::AVGB(spu_thread& spu, spu_opcode_t op)
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.
return true;
@ -482,7 +482,7 @@ bool spu_interpreter::BIHNZ(spu_thread& spu, spu_opcode_t op)
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);
}
@ -531,7 +531,7 @@ bool spu_interpreter::BISLED(spu_thread& spu, spu_opcode_t op)
return true;
}
bool spu_interpreter::HBR(spu_thread& spu, spu_opcode_t op)
bool spu_interpreter::HBR(spu_thread&, spu_opcode_t)
{
return true;
}
@ -834,7 +834,7 @@ bool spu_interpreter::SHLQBYI(spu_thread& spu, spu_opcode_t op)
return true;
}
bool spu_interpreter::NOP(spu_thread& spu, spu_opcode_t op)
bool spu_interpreter::NOP(spu_thread&, spu_opcode_t)
{
return true;
}
@ -990,7 +990,7 @@ bool spu_interpreter_fast::FCGT(spu_thread& spu, spu_opcode_t op)
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");
return true;
@ -1077,7 +1077,7 @@ bool spu_interpreter_fast::FCMGT(spu_thread& spu, spu_opcode_t op)
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");
return true;
@ -1220,12 +1220,12 @@ bool spu_interpreter_fast::FRDS(spu_thread& spu, spu_opcode_t op)
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;
}
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");
return true;
@ -1237,7 +1237,7 @@ bool spu_interpreter_fast::FCEQ(spu_thread& spu, spu_opcode_t op)
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");
return true;
@ -1281,7 +1281,7 @@ bool spu_interpreter_fast::FCMEQ(spu_thread& spu, spu_opcode_t op)
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");
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;
}
bool spu_interpreter::HBRR(spu_thread& spu, spu_opcode_t op)
bool spu_interpreter::HBRR(spu_thread&, spu_opcode_t)
{
return true;
}
@ -1713,7 +1713,7 @@ bool spu_interpreter::SHUFB(spu_thread& spu, spu_opcode_t op)
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;

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);
}
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)
{
@ -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 "-Wextra"
#pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
#include "llvm/ADT/Triple.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)
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)
{
@ -5311,7 +5312,7 @@ public:
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);
}
@ -5364,7 +5365,7 @@ public:
}
}
void STOPD(spu_opcode_t op) //
void STOPD(spu_opcode_t) //
{
if (m_interp_magn)
{
@ -6165,15 +6166,15 @@ public:
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.
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.
m_ir->CreateFence(llvm::AtomicOrdering::SequentiallyConsistent);
@ -6198,7 +6199,7 @@ public:
set_vr(op.rt, splat<u32[4]>(0));
}
void MTSPR(spu_opcode_t op) //
void MTSPR(spu_opcode_t) //
{
// Check SPUInterpreter for notes.
}
@ -6400,7 +6401,7 @@ public:
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))
{
@ -6408,7 +6409,7 @@ public:
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));
return true;
@ -7441,7 +7442,7 @@ public:
set_vr(op.rt, splat<u32[4]>(0));
}
void FSCRWR(spu_opcode_t op) //
void FSCRWR(spu_opcode_t /*op*/) //
{
// Hack
}
@ -8341,17 +8342,17 @@ public:
make_halt(cond);
}
void HBR(spu_opcode_t op) //
void HBR([[maybe_unused]] spu_opcode_t op) //
{
// TODO: use the hint.
}
void HBRA(spu_opcode_t op) //
void HBRA([[maybe_unused]] spu_opcode_t op) //
{
// TODO: use the hint.
}
void HBRR(spu_opcode_t op) //
void HBRR([[maybe_unused]] spu_opcode_t op) //
{
// TODO: use the hint.
}
@ -9026,7 +9027,7 @@ struct spu_llvm
}
// 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);

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)
{
@ -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;
}
@ -2158,7 +2158,7 @@ void spu_thread::do_dma_transfer(spu_thread* _this, const spu_mfc_cmd& args, u8*
}
// 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
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);
auto& res = vm::reservation_acquire(addr, 128);
auto& res = vm::reservation_acquire(addr);
// TODO: Limit scope!!
rsx::reservation_lock rsx_lock(addr, 128);
@ -2849,7 +2849,7 @@ bool spu_thread::do_putllc(const spu_mfc_cmd& args)
return success;
}())
{
vm::reservation_notifier(addr, 128).notify_all(-128);
vm::reservation_notifier(addr).notify_all(-128);
raddr = 0;
perf0.reset();
return true;
@ -2894,7 +2894,7 @@ void do_cell_atomic_128_store(u32 addr, const void* to_write)
if (result == 0)
{
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}, [&]
{
@ -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));
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 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));
}
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;
raddr = last_faddr;
@ -3165,7 +3165,7 @@ bool spu_thread::process_mfc_cmd()
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
std::this_thread::yield();
@ -3193,7 +3193,7 @@ bool spu_thread::process_mfc_cmd()
const bool ok = cpu_thread::if_suspended<0>(this, {&ntime}, [&]
{
// Guaranteed success
ntime = vm::reservation_acquire(addr, 128);
ntime = vm::reservation_acquire(addr);
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)
{
@ -3247,7 +3247,7 @@ bool spu_thread::process_mfc_cmd()
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
if (time0 & vm::rsrv_unique_lock) i += 12;
@ -3429,7 +3429,7 @@ bool spu_thread::process_mfc_cmd()
//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];
// dump.cmd = ch_mfc_cmd;
// dump.cmd.eah = pc;
@ -3497,7 +3497,7 @@ bool spu_thread::reservation_check(u32 addr, const decltype(rdata)& data)
return false;
}
if ((vm::reservation_acquire(addr, 128) & -128) != rtime)
if ((vm::reservation_acquire(addr) & -128) != rtime)
{
return true;
}
@ -3883,7 +3883,7 @@ s64 spu_thread::get_ch_value(u32 ch)
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();

View File

@ -161,7 +161,8 @@ void lv2_config_service_listener::notify_all()
std::vector<std::shared_ptr<lv2_config_service>> services;
// 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))
{
services.push_back(service.get_shared_ptr());
@ -169,7 +170,8 @@ void lv2_config_service_listener::notify_all()
}, 0);
// 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;
});
@ -200,7 +202,8 @@ void lv2_config_service::notify() const
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))
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();
}
bool trunc(u64 length) override
bool trunc(u64) override
{
return false;
}
@ -213,7 +213,7 @@ struct lv2_file::file_view : fs::file_base
return result;
}
u64 write(const void* buffer, u64 size) override
u64 write(const void*, u64) override
{
return 0;
}
@ -248,7 +248,7 @@ fs::file lv2_file::make_view(const std::shared_ptr<lv2_file>& _file, u64 offset)
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);
@ -281,7 +281,7 @@ error_code sys_fs_test(ppu_thread& ppu, u32 arg1, u32 arg2, vm::ptr<u32> arg3, u
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
@ -1005,7 +1005,7 @@ error_code sys_fs_fstat(ppu_thread& ppu, u32 fd, vm::ptr<CellFsStat> sb)
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);
@ -1225,7 +1225,7 @@ error_code sys_fs_unlink(ppu_thread& ppu, vm::cptr<char> path)
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);
@ -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)
{
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);
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;
}
if (ppu.is_stopped())
{
return {};
}
// TODO
*sector_size = file->mp->sector_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)
{
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);
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}; // ???
}
if (ppu.is_stopped())
{
return {};
}
// TODO
*sector_size = mp->sector_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;
}
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);
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);
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);
@ -2033,21 +2047,21 @@ error_code sys_fs_utime(ppu_thread& ppu, vm::cptr<char> path, vm::cptr<CellFsUti
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);
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);
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);
@ -2063,14 +2077,14 @@ error_code sys_fs_lsn_get_cda_size(ppu_thread& ppu, u32 fd, vm::ptr<u64> ptr)
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);
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);
@ -2091,7 +2105,7 @@ error_code sys_fs_lsn_lock(ppu_thread& ppu, u32 fd)
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);
@ -2107,56 +2121,56 @@ error_code sys_fs_lsn_unlock(ppu_thread& ppu, u32 fd)
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);
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);
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);
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);
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);
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);
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);
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);

View File

@ -699,7 +699,7 @@ struct nt_p2p_port
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);
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;
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;
}

View File

@ -19,7 +19,7 @@ extern void ppu_finalize(const ppu_module&);
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)
{

View File

@ -272,7 +272,7 @@ error_code _sys_process_get_paramsfo(vm::ptr<char> buffer)
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
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 },
};
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)
{
@ -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);
}
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)
{

View File

@ -2026,7 +2026,7 @@ error_code sys_isolated_spu_destroy(ppu_thread& ppu, u32 id)
}
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)
{

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;
}
error_code sys_usbd_unregister_ldd(ppu_thread& ppu)
error_code sys_usbd_unregister_ldd(ppu_thread&)
{
sys_usbd.todo("sys_usbd_unregister_ldd()");
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) {
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");
}
bool gdb_thread::cmd_reason(gdb_cmd& cmd)
bool gdb_thread::cmd_reason(gdb_cmd&)
{
return send_reason();
}
bool gdb_thread::cmd_supported(gdb_cmd& cmd)
bool gdb_thread::cmd_supported(gdb_cmd&)
{
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;
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);;
}
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)));
}
@ -657,7 +657,7 @@ bool gdb_thread::cmd_write_memory(gdb_cmd& cmd)
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;
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");
}
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
return send_cmd_ack("1");
}
bool gdb_thread::cmd_kill(gdb_cmd& cmd)
bool gdb_thread::cmd_kill(gdb_cmd&)
{
Emu.Stop();
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");
}

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->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->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);

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);
}
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)
transfer->setup_buf.resize(buf_size + 8);
@ -150,7 +150,7 @@ bool usb_device_emulated::open_device()
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)
{
@ -175,7 +175,7 @@ s32 usb_device_emulated::get_descriptor(u8 type, u8 index, u8* ptr, u32 max_size
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->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)
{
}

View File

@ -85,7 +85,7 @@ namespace vm
std::pair<bool, u64> try_reservation_update(u32 addr)
{
// Update reservation info with new timestamp
auto& res = reservation_acquire(addr, 1);
auto& res = reservation_acquire(addr);
const u64 rtime = res;
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)
{
auto& res = vm::reservation_acquire(addr, 1);
auto& res = vm::reservation_acquire(addr);
auto* ptr = vm::get_super_ptr(addr & -128);
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
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
return *reinterpret_cast<atomic_t<u64>*>(g_reservations + (addr & 0xff80) / 2);
@ -46,7 +46,7 @@ namespace vm
void reservation_update(u32 addr);
// 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);
}
@ -67,7 +67,7 @@ namespace vm
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();
if (rtime & 127 || !reservation_try_lock(*res, rtime)) [[unlikely]]
@ -105,7 +105,7 @@ namespace vm
// Use 128-byte aligned addr
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);
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)
{
@ -358,7 +358,7 @@ namespace vm
{
std::invoke(op, *ptr);
if (rtime == vm::reservation_acquire(addr, 128))
if (rtime == vm::reservation_acquire(addr))
{
return;
}
@ -367,7 +367,7 @@ namespace vm
{
auto res = std::invoke(op, *ptr);
if (rtime == vm::reservation_acquire(addr, 128))
if (rtime == vm::reservation_acquire(addr))
{
return res;
}
@ -385,7 +385,7 @@ namespace vm
const auto sptr = vm::get_super_ptr<T>(addr);
// "Lock" reservation
auto& res = vm::reservation_acquire(addr, 128);
auto& res = vm::reservation_acquire(addr);
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)));
}
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));
}

View File

@ -471,7 +471,7 @@ u32 np_handler::get_server_status(SceNpMatching2ContextId ctx_id, vm::cptr<SceNp
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 event_key = get_event_key();
@ -636,7 +636,7 @@ void np_handler::req_sign_infos(const std::string& npid, u32 conn_id)
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);
@ -910,7 +910,7 @@ bool np_handler::reply_search_room(u32 req_id, std::vector<u8>& reply_data)
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)
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;
}
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)
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;
}
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)
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;
}
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);
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();
}
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);

View File

@ -54,7 +54,7 @@ namespace rsx
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
// 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
{
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.");
u32 row_element_count = width_in_block * row_count;

View File

@ -1226,7 +1226,7 @@ namespace rsx
}
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)
{
@ -1565,7 +1565,7 @@ namespace rsx
}
}
template <typename surface_store_type, typename ...Args>
template <typename SurfaceStoreType, typename... Args>
sampled_image_descriptor fast_texture_search(
commandbuffer_type& cmd,
const image_section_attributes_t& attr,
@ -1575,7 +1575,7 @@ namespace rsx
const texture_cache_search_options& options,
const utils::address_range& memory_range,
rsx::texture_dimension_extended extended_dimension,
surface_store_type& m_rtts, Args&& ... extras)
SurfaceStoreType& m_rtts, Args&&... /*extras*/)
{
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;
auto fast_fbo_check = [&]() -> sampled_image_descriptor

View File

@ -238,7 +238,7 @@ namespace rsx
const surface_store_list_type& fbos,
const std::vector<section_storage_type*>& local,
const image_section_attributes_t& attr,
u16 count, bool is_depth)
u16 count, bool /*is_depth*/)
{
// Need to preserve sorting order
struct sort_helper
@ -589,7 +589,7 @@ namespace rsx
const image_section_attributes_t& attr,
const size2f& scale,
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)
{
ensure((select_hint & 0x1) == select_hint);

View File

@ -61,8 +61,8 @@ namespace gl
// https://www.khronos.org/opengl/wiki/Debug_Output
void APIENTRY log_debug(GLenum source, GLenum type, GLuint id,
GLenum severity, GLsizei length, const GLchar* message,
const void* user_param)
GLenum severity, GLsizei /*length*/, const GLchar* message,
const void* /*user_param*/)
{
// Message source
std::string str_source;
@ -631,7 +631,7 @@ namespace gl
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;
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");
}
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);
if (m_current_framebuffer_context == context && !m_rtts_dirty && m_draw_fbo)

View File

@ -66,7 +66,7 @@ namespace
, 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 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) };
}
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 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);
}
std::string GLVertexDecompilerThread::getIntTypeName(usz elementCount)
std::string GLVertexDecompilerThread::getIntTypeName(usz /*elementCount*/)
{
return "ivec4";
}
@ -50,13 +50,13 @@ void GLVertexDecompilerThread::insertHeader(std::stringstream &OS)
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=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 << "{\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.
};
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)
{

View File

@ -44,7 +44,7 @@ void GSRender::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)
{

View File

@ -16,7 +16,7 @@ namespace rsx
dlg->type.bg_invisible = true;
dlg->type.progress_bar_count = 2;
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++;

View File

@ -786,7 +786,7 @@ namespace rsx
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;
flags = prohibit_flags;

View File

@ -761,12 +761,12 @@ namespace rsx
* Fill buffer with vertex program constants.
* 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));
}
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;
@ -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));
}
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
if (current_fp_metadata.referenced_textures_mask)

View File

@ -900,18 +900,18 @@ namespace rsx
* Fill buffer with vertex program constants.
* 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.
* 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)
*/
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

View File

@ -227,17 +227,17 @@ namespace vk
// NOP
}
void dma_block_EXT::flush(const utils::address_range& range)
void dma_block_EXT::flush(const utils::address_range&)
{
// NOP
}
void dma_block_EXT::load(const utils::address_range& range)
void dma_block_EXT::load(const utils::address_range&)
{
// 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
MEMORY_BASIC_INFORMATION mem_info;

View File

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

View File

@ -514,7 +514,7 @@ namespace vk
ensure(!dst_rect.is_flipped());
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_h = src_rect.height();
@ -834,7 +834,7 @@ namespace vk
}
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)
{
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;
VkPrimitiveTopology prims = vk::get_appropriate_topology(
@ -195,7 +195,7 @@ namespace
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;
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);
}
std::string VKVertexDecompilerThread::getIntTypeName(usz elementCount)
std::string VKVertexDecompilerThread::getIntTypeName(usz /*elementCount*/)
{
return "ivec4";
}
@ -73,7 +73,7 @@ void VKVertexDecompilerThread::insertHeader(std::stringstream &OS)
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=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.
};
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)
{

View File

@ -239,7 +239,7 @@ namespace vk
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;
}

View File

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

View File

@ -990,7 +990,7 @@ namespace
}
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{};

View File

@ -15,20 +15,20 @@ namespace rsx
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
//TODO: Investigate why these commands are executed at all. (Heap corruption? Alignment padding?)
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));
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
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;
@ -40,7 +40,7 @@ namespace rsx
namespace nv406e
{
void set_reference(thread* rsx, u32 _reg, u32 arg)
void set_reference(thread* rsx, u32 /*reg*/, u32 arg)
{
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);
}
void semaphore_acquire(thread* rsx, u32 /*_reg*/, u32 arg)
void semaphore_acquire(thread* rsx, u32 /*reg*/, u32 arg)
{
rsx->sync_point_request.release(true);
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);
}
void semaphore_release(thread* rsx, u32 /*_reg*/, u32 arg)
void semaphore_release(thread* rsx, u32 /*reg*/, u32 arg)
{
rsx->sync();
@ -150,7 +150,7 @@ namespace rsx
namespace nv4097
{
void clear(thread* rsx, u32 _reg, u32 arg)
void clear(thread* rsx, u32 /*reg*/, u32 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)
{
@ -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:
@ -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 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
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;
}
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
g_fxo->get<rsx::dma_manager>().sync();
@ -295,7 +295,7 @@ namespace rsx
template<u32 index>
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);
}
@ -304,7 +304,7 @@ namespace rsx
template<u32 index>
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);
}
@ -313,7 +313,7 @@ namespace rsx
template<u32 index>
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);
}
@ -322,7 +322,7 @@ namespace rsx
template<u32 index>
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)
set_vertex_data_impl<NV4097_SET_VERTEX_DATA3F_M, index, 3, 4, f32>(rsx, arg);
@ -332,7 +332,7 @@ namespace rsx
template<u32 index>
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);
}
@ -341,7 +341,7 @@ namespace rsx
template<u32 index>
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);
}
@ -350,7 +350,7 @@ namespace rsx
template<u32 index>
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);
}
@ -359,7 +359,7 @@ namespace rsx
template<u32 index>
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);
}
@ -380,7 +380,7 @@ namespace rsx
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::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());
}
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::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());
}
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.inline_vertex_array.push_back(arg);
@ -405,7 +405,7 @@ namespace rsx
template<u32 index>
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 u8 subreg = index % 4;
@ -451,7 +451,7 @@ namespace rsx
template<u32 index>
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
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
if (const u8 prim = static_cast<u8>(arg))
@ -575,7 +575,7 @@ namespace rsx
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;
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)
{
@ -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)
{
@ -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)
{
@ -850,7 +850,7 @@ namespace rsx
template<u32 index>
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;
@ -864,7 +864,7 @@ namespace rsx
template<u32 index>
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;
@ -881,7 +881,7 @@ namespace rsx
template<u32 index>
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();
@ -1002,7 +1002,7 @@ namespace rsx
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();
@ -1471,7 +1471,7 @@ namespace rsx
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 out_pitch = method_registers.nv0039_output_pitch();
@ -1618,7 +1618,7 @@ namespace rsx
template<u32 index>
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);
}
@ -1627,7 +1627,7 @@ namespace rsx
template<u32 index>
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);
}

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 }
};
template<typename T>
void pad_texture(void* input_pixels, void* output_pixels, u16 input_width, u16 input_height, u16 output_width, u16 output_height)
template <typename T>
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 *dst = static_cast<T*>(output_pixels);

View File

@ -363,7 +363,7 @@ namespace
dlg->type.se_normal = true;
dlg->type.bg_invisible = true;
dlg->type.progress_bar_count = 1;
dlg->on_close = [](s32 status)
dlg->on_close = [](s32 /*status*/)
{
Emu.CallAfter([]()
{
@ -1924,7 +1924,7 @@ void Emulator::Stop(bool restart)
aw_colc = 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_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]);
};
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)))
{
@ -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;
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);
@ -797,7 +797,7 @@ bool vfs::host::rename(const std::string& from, const std::string& to, const lv2
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
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
}
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
if (remove_root)

View File

@ -613,7 +613,7 @@ u32 keyboard_pad_handler::GetKeyCode(const QString& keyName)
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
#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)
{

View File

@ -32,6 +32,7 @@ else()
add_compile_options(-Werror=reorder)
add_compile_options(-Werror=return-type)
add_compile_options(-Werror=overloaded-virtual)
add_compile_options(-Wunused-parameter)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
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
*/
void save_manager_dialog::Init(std::string dir)
void save_manager_dialog::Init(std::string /*dir*/)
{
// Table
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>
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);
@ -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)
{
// 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)
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)
{
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)
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)
{
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)
{

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