CPU/NewRec: Work around clang <16 structured binding capture bug

This commit is contained in:
Stenzek 2024-04-26 19:23:46 +10:00
parent 26917f14c5
commit 2fc9a6d834
No known key found for this signature in database
4 changed files with 4 additions and 4 deletions

View file

@ -1676,7 +1676,7 @@ void CPU::NewRec::AArch32Compiler::Compile_lwc2(CompileFlags cf, MemoryAccessSiz
std::optional<Register>(); std::optional<Register>();
FlushForLoadStore(address, false, use_fastmem); FlushForLoadStore(address, false, use_fastmem);
const Register addr = ComputeLoadStoreAddressArg(cf, address, addr_reg); const Register addr = ComputeLoadStoreAddressArg(cf, address, addr_reg);
const Register value = GenerateLoad(addr, MemoryAccessSize::Word, false, use_fastmem, [this, action]() { const Register value = GenerateLoad(addr, MemoryAccessSize::Word, false, use_fastmem, [this, action = action]() {
return (action == GTERegisterAccessAction::CallHandler && g_settings.gpu_pgxp_enable) ? return (action == GTERegisterAccessAction::CallHandler && g_settings.gpu_pgxp_enable) ?
Register(AllocateTempHostReg(HR_CALLEE_SAVED)) : Register(AllocateTempHostReg(HR_CALLEE_SAVED)) :
RRET; RRET;

View file

@ -1655,7 +1655,7 @@ void CPU::NewRec::AArch64Compiler::Compile_lwc2(CompileFlags cf, MemoryAccessSiz
std::optional<WRegister>(); std::optional<WRegister>();
FlushForLoadStore(address, false, use_fastmem); FlushForLoadStore(address, false, use_fastmem);
const WRegister addr = ComputeLoadStoreAddressArg(cf, address, addr_reg); const WRegister addr = ComputeLoadStoreAddressArg(cf, address, addr_reg);
const WRegister value = GenerateLoad(addr, MemoryAccessSize::Word, false, use_fastmem, [this, action]() { const WRegister value = GenerateLoad(addr, MemoryAccessSize::Word, false, use_fastmem, [this, action = action]() {
return (action == GTERegisterAccessAction::CallHandler && g_settings.gpu_pgxp_enable) ? return (action == GTERegisterAccessAction::CallHandler && g_settings.gpu_pgxp_enable) ?
WRegister(AllocateTempHostReg(HR_CALLEE_SAVED)) : WRegister(AllocateTempHostReg(HR_CALLEE_SAVED)) :
RWRET; RWRET;

View file

@ -1963,7 +1963,7 @@ void CPU::NewRec::RISCV64Compiler::Compile_lwc2(CompileFlags cf, MemoryAccessSiz
g_settings.gpu_pgxp_enable ? std::optional<GPR>(GPR(AllocateTempHostReg(HR_CALLEE_SAVED))) : std::optional<GPR>(); g_settings.gpu_pgxp_enable ? std::optional<GPR>(GPR(AllocateTempHostReg(HR_CALLEE_SAVED))) : std::optional<GPR>();
FlushForLoadStore(address, false, use_fastmem); FlushForLoadStore(address, false, use_fastmem);
const GPR addr = ComputeLoadStoreAddressArg(cf, address, addr_reg); const GPR addr = ComputeLoadStoreAddressArg(cf, address, addr_reg);
const GPR value = GenerateLoad(addr, MemoryAccessSize::Word, false, use_fastmem, [this, action]() { const GPR value = GenerateLoad(addr, MemoryAccessSize::Word, false, use_fastmem, [this, action = action]() {
return (action == GTERegisterAccessAction::CallHandler && g_settings.gpu_pgxp_enable) ? return (action == GTERegisterAccessAction::CallHandler && g_settings.gpu_pgxp_enable) ?
GPR(AllocateTempHostReg(HR_CALLEE_SAVED)) : GPR(AllocateTempHostReg(HR_CALLEE_SAVED)) :
RRET; RRET;

View file

@ -1623,7 +1623,7 @@ void CPU::NewRec::X64Compiler::Compile_lwc2(CompileFlags cf, MemoryAccessSize si
std::optional<Reg32>(); std::optional<Reg32>();
FlushForLoadStore(address, false, use_fastmem); FlushForLoadStore(address, false, use_fastmem);
const Reg32 addr = ComputeLoadStoreAddressArg(cf, address, addr_reg); const Reg32 addr = ComputeLoadStoreAddressArg(cf, address, addr_reg);
const Reg32 value = GenerateLoad(addr, MemoryAccessSize::Word, false, use_fastmem, [this, action]() { const Reg32 value = GenerateLoad(addr, MemoryAccessSize::Word, false, use_fastmem, [this, action = action]() {
return (action == GTERegisterAccessAction::CallHandler && g_settings.gpu_pgxp_enable) ? return (action == GTERegisterAccessAction::CallHandler && g_settings.gpu_pgxp_enable) ?
Reg32(AllocateTempHostReg(HR_CALLEE_SAVED)) : Reg32(AllocateTempHostReg(HR_CALLEE_SAVED)) :
RWRET; RWRET;