mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-22 10:04:39 +00:00
Fix ff1_i32_b64 not accepting vcc as its argument (#3251)
This commit is contained in:
parent
4407ebdd9b
commit
6d6068e0e2
@ -1,6 +1,7 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <magic_enum/magic_enum.hpp>
|
||||
#include "common/assert.h"
|
||||
#include "shader_recompiler/frontend/translate/translate.h"
|
||||
|
||||
@ -680,9 +681,18 @@ void Translator::S_FF1_I32_B32(const GcnInst& inst) {
|
||||
}
|
||||
|
||||
void Translator::S_FF1_I32_B64(const GcnInst& inst) {
|
||||
ASSERT(inst.src[0].field == OperandField::ScalarGPR);
|
||||
const IR::U32 result{
|
||||
ir.BallotFindLsb(ir.Ballot(ir.GetThreadBitScalarReg(IR::ScalarReg(inst.src[0].code))))};
|
||||
const auto src = [&] {
|
||||
switch (inst.src[0].field) {
|
||||
case OperandField::ScalarGPR:
|
||||
return ir.GetThreadBitScalarReg(IR::ScalarReg(inst.src[0].code));
|
||||
case OperandField::VccLo:
|
||||
return ir.GetVcc();
|
||||
default:
|
||||
UNREACHABLE_MSG("unhandled operand type {}", magic_enum::enum_name(inst.src[0].field));
|
||||
}
|
||||
}();
|
||||
const IR::U32 result{ir.BallotFindLsb(ir.Ballot(src))};
|
||||
|
||||
SetDst(inst.dst[0], result);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user