Fix some warnings

This commit is contained in:
Megamouse 2025-02-02 16:07:19 +01:00
parent cfd571cfc2
commit 3187dc816e
5 changed files with 6 additions and 5 deletions

View file

@ -636,7 +636,7 @@ jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, co
: m_context(new llvm::LLVMContext) : m_context(new llvm::LLVMContext)
, m_cpu(cpu(_cpu)) , m_cpu(cpu(_cpu))
{ {
static const bool s_install_llvm_error_handler = []() [[maybe_unused]] static const bool s_install_llvm_error_handler = []()
{ {
llvm::remove_fatal_error_handler(); llvm::remove_fatal_error_handler();
llvm::install_fatal_error_handler([](void*, const char* msg, bool) llvm::install_fatal_error_handler([](void*, const char* msg, bool)

View file

@ -598,7 +598,10 @@ int aes_setkey_dec( aes_context *ctx, const unsigned char *key, unsigned int key
*RK++ = *SK++; *RK++ = *SK++;
*RK++ = *SK++; *RK++ = *SK++;
#if defined(__SSE2__) || defined(_M_X64)
done: done:
#endif
// Wipe the stack buffer clean // Wipe the stack buffer clean
std::fill_n(reinterpret_cast<volatile char*>(&cty), sizeof(cty), 0); std::fill_n(reinterpret_cast<volatile char*>(&cty), sizeof(cty), 0);

View file

@ -807,7 +807,7 @@ bool ppu_module<lv2_obj>::analyse(u32 lib_toc, u32 entry, const u32 sec_end, con
ppu_log.trace("OPD: [0x%x] 0x%x (TOC=0x%x)", _ptr, addr, toc); ppu_log.trace("OPD: [0x%x] 0x%x (TOC=0x%x)", _ptr, addr, toc);
TOCs.emplace(toc); TOCs.emplace(toc);
auto& func = add_func(addr, addr_heap.count(_ptr.addr()) ? toc : 0, 0); add_func(addr, addr_heap.count(_ptr.addr()) ? toc : 0, 0);
known_functions.emplace(addr); known_functions.emplace(addr);
} }
} }

View file

@ -4910,7 +4910,7 @@ bool ppu_initialize(const ppu_module<lv2_obj>& info, bool check_only, u64 file_s
usz code_size_until_jump = umax; usz code_size_until_jump = umax;
auto func = build_function_asm<u8*(*)(ppu_thread&, u64, u8*, u64, u64, u64)>(name, [&](native_asm& c, auto& args) auto func = build_function_asm<u8*(*)(ppu_thread&, u64, u8*, u64, u64, u64)>(name, [&](native_asm& c, auto& /*args*/)
{ {
#if defined(ARCH_X64) #if defined(ARCH_X64)
c.mov(x86::edx, func_addr - seg0); // Load PC c.mov(x86::edx, func_addr - seg0); // Load PC

View file

@ -358,8 +358,6 @@ Function* PPUTranslator::GetSymbolResolver(const ppu_module<lv2_obj>& info)
// Create an array of function pointers // Create an array of function pointers
std::vector<llvm::Constant*> functions; std::vector<llvm::Constant*> functions;
const auto [min_addr, max_addr] = *ensure(info.jit_bounds);
for (const auto& f : info.get_funcs(false, true)) for (const auto& f : info.get_funcs(false, true))
{ {
if (!f.size) if (!f.size)